ray_circ_cavity_adapt.cc File Reference

Classes

class  MyEllipse
 
class  RayleighProblem< ELEMENT, TIMESTEPPER >
 

Namespaces

 Global_Parameters
 Namespace for global parameters.
 

Functions

int main (int argc, char *argv[])
 Driver code for Rayleigh channel problem. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code for Rayleigh channel problem.

Convert command line arguments (if any) into flags:

603 {
604 
606  if (argc==1)
607  {
608  cout << "No command line arguments specified -- using defaults."
609  << std::endl;
610  }
611  else if (argc>=2)
612  {
613  cout << "Command line arguments specified:" << std::endl;
614  // Flag for long run
616  }
617 
618  cout << "Long run flag: "
619  << Global_Parameters::Long_run_flag << std::endl;
620 
621 
622  // Set physical parameters:
623 
624  // Womersley number = Reynolds number (St = 1)
627 
628  //Horizontal length of domain
629  double lx = 1.0;
630 
631  //Vertical length of domain
632  double ly = 1.0;
633 
634  // Number of elements in x-direction
635  unsigned nx=5;
636 
637  // Number of elements in y-direction
638  unsigned ny=10;
639 
640  // Loop over run with/without ALE
641  for (unsigned ale_flag=0;ale_flag<2;ale_flag++)
642  {
643 
644  bool use_ale=true;
645  if (ale_flag==1) use_ale=false;
646 
647 
648  // Solve with Crouzeix-Raviart elements
649  {
650  // Set up doc info
651  DocInfo doc_info;
652  doc_info.number()=0;
653  if (ale_flag==0)
654  {
655  doc_info.set_directory("RESLT2_CR");
656  }
657  else
658  {
659  doc_info.set_directory("RESLT2_CR_ALE");
660  }
661 
662  //Set up problem
664  problem(nx,ny,lx,ly,use_ale);
665 
666  // Run the unsteady simulation
667  problem.unsteady_run(doc_info);
668  }
669 
670  // Solve with Taylor-Hood elements
671  {
672  // Set up doc info
673  DocInfo doc_info;
674  doc_info.number()=0;
675  if (ale_flag==0)
676  {
677  doc_info.set_directory("RESLT2_TH");
678  }
679  else
680  {
681  doc_info.set_directory("RESLT2_TH_ALE");
682  }
683 
684  //Set up problem
686  problem(nx,ny,lx,ly,use_ale);
687 
688  // Run the unsteady simulation
689  problem.unsteady_run(doc_info);
690  }
691  }
692 
693 } // end of main
Definition: navier_stokes/rayleigh_channel/rayleigh_channel.cc:121
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
unsigned Long_run_flag
Flag for long/short run: Default = perform long run.
Definition: navier_stokes/rayleigh_channel/rayleigh_channel.cc:52
double ReSt
Womersley number: Product of Reynolds and Strouhal numbers.
Definition: fsi_channel_with_leaflet_precond.cc:225
double Re
reynolds number
Definition: adaptive_hopf.cc:54
const double ly
Definition: ConstraintElementsUnitTest.cpp:34
const double lx
Definition: ConstraintElementsUnitTest.cpp:33
const unsigned nx
Definition: ConstraintElementsUnitTest.cpp:30
const unsigned ny
Definition: ConstraintElementsUnitTest.cpp:31
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References Global_Parameters::Long_run_flag, Mesh_Parameters::lx, Mesh_Parameters::ly, oomph::DocInfo::number(), Mesh_Parameters::nx, Mesh_Parameters::ny, problem, Global_Parameters::Re, Global_Parameters::ReSt, and oomph::DocInfo::set_directory().