curved_pipe.cc File Reference
#include "generic.h"
#include "navier_stokes.h"
#include "meshes/tube_mesh.h"

Classes

class  MyCurvedCylinder
 
class  SteadyCurvedTubeProblem< ELEMENT >
 Entry flow problem in tapered tube domain. More...
 

Namespaces

 Global_Physical_Variables
 Global variables.
 

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// Driver for 3D entry flow into a curved tube. If there are any command line arguments, we regard this as a validation run and perform only a single adaptation

319 {
320 
321  // Store command line arguments
322  CommandLineArgs::setup(argc,argv);
323 
324  // Allow (up to) two rounds of fully automatic adapation in response to
325  //-----------------------------------------------------------------------
326  // error estimate
327  //---------------
328  unsigned max_adapt;
329  double max_error_target,min_error_target;
330 
331  // Set max number of adaptations in black-box Newton solver and
332  // error targets for adaptation
333  if (CommandLineArgs::Argc==1)
334  {
335  // Up to two adaptations
336  max_adapt=2;
337 
338  // Error targets for adaptive refinement
339  max_error_target=0.001;
340  min_error_target=0.00001;
341  }
342  // Validation run: Only one adaptation. Relax error targets
343  // for faster solution
344  else
345  {
346  // Validation run: Just one round of adaptation
347  max_adapt=1;
348 
349  // Error targets for adaptive refinement
350  max_error_target=0.02;
351  min_error_target=0.002;
352  }
353  // end max_adapt setup
354 
355 
356  // Set up doc info
357  DocInfo doc_info;
358 
359  // Do Taylor-Hood elements
360  //------------------------
361  {
362  // Set output directory
363  doc_info.set_directory("RESLT_TH");
364 
365  // Step number
366  doc_info.number()=0;
367 
368  // Build problem
370  problem(doc_info,min_error_target,max_error_target);
371 
372  cout << " Doing Taylor-Hood elements " << std::endl;
373 
374  // Solve the problem
375  problem.newton_solve(max_adapt);
376  // Doc solution after solving
377  problem.doc_solution();
378  }
379 
380  // Do Crouzeix-Raviart elements
381  //------------------------
382  {
383  // Set output directory
384  doc_info.set_directory("RESLT_CR");
385 
386  // Step number
387  doc_info.number()=0;
388 
389  // Build problem
391  problem(doc_info,min_error_target,max_error_target);
392 
393  cout << " Doing Crouzeix-Raviart elements " << std::endl;
394 
395  // Solve the problem
396  problem.newton_solve(max_adapt);
397  // Doc solution after solving
398  problem.doc_solution();
399  }
400 
401 } // end_of_main
Entry flow problem in tapered tube domain.
Definition: curved_pipe.cc:100
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
int Argc
Number of arguments + 1.
Definition: oomph_utilities.cc:407
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::CommandLineArgs::Argc, oomph::DocInfo::number(), problem, oomph::DocInfo::set_directory(), and Flag_definition::setup().