navier_stokes/rayleigh_channel/rayleigh_channel.cc File Reference
#include "generic.h"
#include "navier_stokes.h"
#include "meshes/rectangular_quadmesh.h"

Classes

class  RayleighProblem< ELEMENT, TIMESTEPPER >
 

Namespaces

 Global_Parameters
 Namespace for global parameters.
 
 ExactSoln
 Namespace for exact solution.
 

Functions

void ExactSoln::get_exact_u (const double &t, const Vector< double > &x, Vector< double > &u)
 Exact solution of the problem as a vector. More...
 
void ExactSoln::get_exact_u (const double &t, const double &y, double &u)
 Exact solution of the problem as a scalar. More...
 
int main (int argc, char *argv[])
 Driver code for Rayleigh channel problem. More...
 

Variables

unsigned Global_Parameters::Long_run_flag =1
 Flag for long/short run: Default = perform long run. More...
 
unsigned Global_Parameters::Impulsive_start_flag =0
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code for Rayleigh channel problem.

Convert command line arguments (if any) into flags:

Flag for impulsive start

497 {
498 
500  if (argc==1)
501  {
502  cout << "No command line arguments specified -- using defaults."
503  << std::endl;
504  }
505  else if (argc==3)
506  {
507  cout << "Two command line arguments specified:" << std::endl;
508  // Flag for long run
509  Global_Parameters::Long_run_flag=atoi(argv[1]);
512  }
513  else
514  {
515  std::string error_message =
516  "Wrong number of command line arguments. Specify none or two.\n";
517  error_message +=
518  "Arg1: Long_run_flag [0/1]\n";
519  error_message +=
520  "Arg2: Impulsive_start_flag [0/1]\n";
521 
522  throw OomphLibError(error_message,
525  }
526  cout << "Long run flag: "
527  << Global_Parameters::Long_run_flag << std::endl;
528  cout << "Impulsive start flag: "
530 
531 
532  // Set physical parameters:
533 
534  // Womersley number = Reynolds number (St = 1)
537 
538  //Horizontal length of domain
539  double lx = 1.0;
540 
541  //Vertical length of domain
542  double ly = 1.0;
543 
544  // Number of elements in x-direction
545  unsigned nx=5;
546 
547  // Number of elements in y-direction
548  unsigned ny=10;
549 
550  // Solve with Crouzeix-Raviart elements
551  {
552  // Set up doc info
553  DocInfo doc_info;
554  doc_info.number()=0;
555  doc_info.set_directory("RESLT_CR");
556 
557  //Set up problem
559 
560  // Run the unsteady simulation
561  problem.unsteady_run(doc_info);
562  }
563 
564 
565 
566  // Solve with Taylor-Hood elements
567  {
568  // Set up doc info
569  DocInfo doc_info;
570  doc_info.number()=0;
571  doc_info.set_directory("RESLT_TH");
572 
573  //Set up problem
575 
576  // Run the unsteady simulation
577  problem.unsteady_run(doc_info);
578  }
579 
580 } // 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
Definition: oomph_definitions.h:222
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
unsigned Impulsive_start_flag
Definition: navier_stokes/rayleigh_channel/rayleigh_channel.cc:56
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
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

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