interaction/fsi_channel_with_leaflet/fsi_channel_with_leaflet.cc File Reference

Classes

class  UndeformedLeaflet
 GeomObject: Undeformed straight, vertical leaflet. More...
 
class  FSIChannelWithLeafletProblem< ELEMENT >
 FSI leaflet in channel. More...
 

Namespaces

 Global_Physical_Variables
 Global variables.
 

Functions

double Global_Physical_Variables::flux (const double &t)
 
int main (int argc, char *argv[])
 

Variables

double Global_Physical_Variables::Period =2.0
 Period for fluctuations in flux. More...
 
double Global_Physical_Variables::Min_flux =1.0
 Min. flux. More...
 
double Global_Physical_Variables::Max_flux =2.0
 Max. flux. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code – pass a command line argument if you want to run the code in validation mode where it only performs a few steps

757 {
758  // Store command line arguments
759  CommandLineArgs::setup(argc,argv);
760 
761  //Parameters for the leaflet: x-position of root and height
762  double x_0 = 1.0;
763  double hleaflet=0.5;
764 
765  // Number of elements in various regions of mesh
766  unsigned nleft=6;
767  unsigned nright=18;
768  unsigned ny1=3;
769  unsigned ny2=3;
770 
771  // Dimensions of fluid mesh: length to the left and right of leaflet
772  // and total height
773  double lleft =1.0;
774  double lright=3.0;
775  double htot=1.0;
776 
777  //Build the problem
780  problem(lleft,lright,hleaflet,
781  htot,nleft,nright,ny1,ny2,x_0);
782 
783  // Set up doc info
784  DocInfo doc_info;
785  doc_info.set_directory("RESLT");
786 
787  // Trace file
788  ofstream trace;
789  char filename[100];
790  sprintf(filename,"%s/trace.dat",doc_info.directory().c_str());
791  trace.open(filename);
792 
793 
794  // Number of timesteps (reduced for validation)
795  unsigned nstep=200;
796  if (CommandLineArgs::Argc>1)
797  {
798  nstep=2;
799  }
800 
801  //Timestep:
802  double dt=0.05;
803 
804  // Initialise timestep
805  problem.initialise_dt(dt);
806 
807  // Doc initial guess for steady solve
808  problem.doc_solution(doc_info,trace);
809  doc_info.number()++;
810 
811 
812  // Initial loop to increment the Reynolds number in sequence of steady solves
813  //---------------------------------------------------------------------------
814  unsigned n_increment=4;
815  // Just to one step for validation run
816  if (CommandLineArgs::Argc>1)
817  {
818  n_increment=1;
819  }
820 
821  // Set max. number of adaptations
822  unsigned max_adapt=3;
823 
825  for (unsigned i=0;i<n_increment;i++)
826  {
827  // Increase Re and ReSt (for St=1)
830 
831  // Solve the steady problem
832  std::cout << "Computing a steady solution for Re="
833  << Global_Physical_Variables::Re << std::endl;
834  problem.steady_newton_solve(max_adapt);
835  problem.doc_solution(doc_info,trace);
836  doc_info.number()++;
837  } // reached final Reynolds number
838 
839 
840 
841  // Proper time-dependent run
842  //--------------------------
843 
844  // Limit the number of adaptations during unsteady run to one per timestep
845  max_adapt=1;
846 
847  // Don't re-set the initial conditions when adapting the mesh
848  bool first = false;
849 
850  // Timestepping loop
851  for (unsigned istep=0;istep<nstep;istep++)
852  {
853  // Solve the problem
854  problem.unsteady_newton_solve(dt,max_adapt,first);
855 
856  // Output the solution
857  problem.doc_solution(doc_info,trace);
858 
859  // Step number
860  doc_info.number()++;
861 
862  }
863 
864 }//end of main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
FSI leaflet in channel.
Definition: interaction/fsi_channel_with_leaflet/fsi_channel_with_leaflet.cc:165
Definition: algebraic_elements.h:540
Definition: oomph_utilities.h:499
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
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
double ReSt
Womersley number.
Definition: rayleigh_instability.cc:56
double Re
Reynolds number.
Definition: fibre.cc:55
string filename
Definition: MergeRestartFiles.py:39
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::directory(), MergeRestartFiles::filename, i, oomph::DocInfo::number(), problem, Global_Physical_Variables::Re, Global_Physical_Variables::ReSt, oomph::DocInfo::set_directory(), and Flag_definition::setup().