navier_stokes/three_d_entry_flow/three_d_entry_flow.cc File Reference
#include "generic.h"
#include "navier_stokes.h"
#include "meshes/quarter_tube_mesh.h"

Classes

class  EntryFlowProblem< ELEMENT >
 Entry flow problem in quarter 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 quarter tube. If there are any command line arguments, we regard this as a validation run and perform only a single adaptation

304 {
305 
306  // Store command line arguments
307  CommandLineArgs::setup(argc,argv);
308 
309  // Allow (up to) five rounds of fully automatic adapation in response to
310  //-----------------------------------------------------------------------
311  // error estimate
312  //---------------
313  unsigned max_adapt;
314  double max_error_target,min_error_target;
315 
316  // Set max number of adaptations in black-box Newton solver and
317  // error targets for adaptation
318  if (CommandLineArgs::Argc==1)
319  {
320  // Up to five adaptations
321  max_adapt=5;
322 
323  // Error targets for adaptive refinement
324  max_error_target=0.005;
325  min_error_target=0.0005;
326  }
327  // Validation run: Only one adaptation. Relax error targets
328  // to ensure that not all elements are refined so we're getting
329  // some hanging nodes.
330  else
331  {
332  // Validation run: Just one round of adaptation
333  max_adapt=1;
334 
335  // Error targets for adaptive refinement
336  max_error_target=0.02;
337  min_error_target=0.002;
338  }
339  // end max_adapt setup
340 
341 
342  // Set up doc info
343  DocInfo doc_info;
344 
345  // Do Taylor-Hood elements
346  //------------------------
347  {
348  // Set output directory
349  doc_info.set_directory("RESLT_TH");
350 
351  // Step number
352  doc_info.number()=0;
353 
354  // Build problem
356  problem(doc_info,min_error_target,max_error_target);
357 
358  cout << " Doing Taylor-Hood elements " << std::endl;
359 
360 
361  // Doc solution after solving
362  problem.doc_solution();
363 
364  // Solve the problem
365  problem.newton_solve(max_adapt);
366  }
367 
368 
369  // Do Crouzeix-Raviart elements
370  //-----------------------------
371  {
372  // Set output directory
373  doc_info.set_directory("RESLT_CR");
374 
375  // Step number
376  doc_info.number()=0;
377 
378  // Build problem
380  problem(doc_info,min_error_target,max_error_target);
381 
382  cout << " Doing Crouzeix-Raviart elements " << std::endl;
383 
384  // Solve the problem
385  problem.newton_solve(max_adapt);
386  }
387 
388 } // end_of_main
Entry flow problem in quarter tube domain.
Definition: mpi/distribution/three_d_entry_flow/three_d_entry_flow.cc:54
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().