150 const double& min_error_target,
151 const double& max_error_target)
164 const double pi = MathematicalConstants::Pi;
167 Vector<double> centreline_limits(2);
168 centreline_limits[0] = 0.0;
169 centreline_limits[1] = pi;
174 Vector<double> theta_positions(4);
175 theta_positions[0] = -0.75*pi;
176 theta_positions[1] = -0.25*pi;
177 theta_positions[2] = 0.25*pi;
178 theta_positions[3] = 0.75*pi;
182 Vector<double> radial_frac(4,0.5);
188 Problem::mesh_pt()=
new RefineableTubeMesh<ELEMENT>(
Volume_pt,
195 Z2ErrorEstimator* error_estimator_pt=
new Z2ErrorEstimator;
196 mesh_pt()->spatial_error_estimator_pt()=error_estimator_pt;
199 mesh_pt()->max_permitted_error()=max_error_target;
200 mesh_pt()->min_permitted_error()=min_error_target;
207 ELEMENT::Gamma[0] = 0.0;
208 ELEMENT::Gamma[1] = 0.0;
209 ELEMENT::Gamma[2] = 0.0;
212 unsigned num_bound =
mesh_pt()->nboundary();
213 for(
unsigned ibound=0;ibound<num_bound;ibound++)
215 unsigned num_nod=
mesh_pt()->nboundary_node(ibound);
216 for (
unsigned inod=0;inod<num_nod;inod++)
221 if((ibound==0) || (ibound==1))
223 mesh_pt()->boundary_node_pt(ibound,inod)->pin(0);
224 mesh_pt()->boundary_node_pt(ibound,inod)->pin(1);
225 mesh_pt()->boundary_node_pt(ibound,inod)->pin(2);
232 unsigned n_element =
mesh_pt()->nelement();
233 for(
unsigned i=0;i<n_element;i++)
236 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(
mesh_pt()->element_pt(i));
243 RefineableNavierStokesEquations<3>::
244 pin_redundant_nodal_pressures(
mesh_pt()->element_pt());
247 cout <<
"Number of equations: " << assign_eqn_numbers() << std::endl;
262 unsigned num_nod= mesh_pt()->nboundary_node(ibound);
263 for (
unsigned inod=0;inod<num_nod;inod++)
266 double x=mesh_pt()->boundary_node_pt(ibound,inod)->x(0) -
268 double z=mesh_pt()->boundary_node_pt(ibound,inod)->x(2);
270 double r=sqrt(x*x+z*z);
273 mesh_pt()->boundary_node_pt(ibound,inod)->
274 set_value(1,(1.0-pow(r,2.0)));
318int main(
int argc,
char* argv[])
322 CommandLineArgs::setup(argc,argv);
329 double max_error_target,min_error_target;
333 if (CommandLineArgs::Argc==1)
339 max_error_target=0.001;
340 min_error_target=0.00001;
350 max_error_target=0.02;
351 min_error_target=0.002;
363 doc_info.set_directory(
"RESLT_TH");
370 problem(doc_info,min_error_target,max_error_target);
372 cout <<
" Doing Taylor-Hood elements " << std::endl;
375 problem.newton_solve(max_adapt);
384 doc_info.set_directory(
"RESLT_CR");
391 problem(doc_info,min_error_target,max_error_target);
393 cout <<
" Doing Crouzeix-Raviart elements " << std::endl;
396 problem.newton_solve(max_adapt);
void position(const unsigned &t, const Vector< double > &xi, Vector< double > &r) const
Return the position of the tube as a function of time (doesn't move as a function of time)
int main(int argc, char *argv[])
Driver for 3D entry flow into a curved tube. If there are any command line arguments,...