turek_flag_non_fsi.cc File Reference

Classes

class  Flag_definition::TopOfFlag
 GeomObject that defines the upper boundary of the flag. More...
 
class  Flag_definition::BottomOfFlag
 GeomObject that defines the lower boundary of the flag. More...
 
class  Flag_definition::TipOfFlag
 GeomObject that defines the tip of the flag. More...
 
class  TurekNonFSIProblem< ELEMENT >
 Flow around a cylinder with flag. More...
 

Namespaces

 Global_Parameters
 Namespace for global parameters.
 
 Flag_definition
 Namespace for definition of flag boundaries.
 

Functions

Vector< doubleFlag_definition::upper_tip (const double &t)
 Time-dependent vector to upper tip of the "flag". More...
 
Vector< doubleFlag_definition::lower_tip (const double &t)
 Time-dependent vector to bottom tip of the "flag". More...
 
void Flag_definition::setup (Time *time_pt)
 Create all GeomObjects needed to define the cylinder and the flag. More...
 
int main (int argc, char *argv[])
 

Variables

double Flag_definition::Period =10.0
 Period of prescribed flag oscillation. More...
 
double Flag_definition::H =0.2
 Height of flag. More...
 
double Flag_definition::L =3.5
 Length of flag. More...
 
double Flag_definition::Centre_x =2.0
 x position of centre of cylinder More...
 
double Flag_definition::Centre_y =2.0
 y position of centre of cylinder More...
 
double Flag_definition::Radius =0.5
 Radius of cylinder. More...
 
double Flag_definition::Amplitude =0.33
 Amplitude of tip deflection. More...
 
TimeFlag_definition::Time_pt =0
 Pointer to the global time object. More...
 
TopOfFlag * Flag_definition::Top_flag_pt =0
 Pointer to GeomObject that bounds the upper edge of the flag. More...
 
BottomOfFlag * Flag_definition::Bottom_flag_pt =0
 Pointer to GeomObject that bounds the bottom edge of the flag. More...
 
TipOfFlag * Flag_definition::Tip_flag_pt =0
 Pointer to GeomObject that bounds the tip edge of the flag. More...
 
CircleFlag_definition::Cylinder_pt =0
 

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

Initialise timestep

Output intial guess for steady Newton solve

Output steady solution = initial condition for subsequent unsteady solve

Reduce the max number of adaptations for time-dependent simulation

577 {
578 
579  // Store command line arguments
580  CommandLineArgs::setup(argc,argv);
581 
582  // Set up doc info
583  DocInfo doc_info;
584  doc_info.set_directory("RESLT");
585  doc_info.number()=0;
586 
587  // Length and height of domain
588  double length=25.0;
589  double height=4.1;
590 
591 #ifdef USE_MACRO_ELEMENTS
592 
593  // Create Problem with Domain/MacroElement-based node update
595  problem(length,height);
596 
597 #else
598 
599  // Create Problem with AlgebraicMesh-based node update
602  problem(length, height);
603 
604 #endif
605 
606 
607 // Number of timesteps per period
608  unsigned nsteps_per_period=40;
609 
610  // Number of periods
611  unsigned nperiod=3;
612 
613  // Number of timesteps (reduced for validation)
614  unsigned nstep=nsteps_per_period*nperiod;
615  if (CommandLineArgs::Argc>1)
616  {
617  nstep=2;
618  // Also reduce the Reynolds number to reduce the mesh refinement
620  }
621 
622  //Timestep:
623  double dt=Flag_definition::Period/double(nsteps_per_period);
624 
626  problem.initialise_dt(dt);
627 
628  // Solve adaptively with up to max_adapt rounds of refinement (fewer if
629  // run during self-test)
630  unsigned max_adapt=3;
631  if (CommandLineArgs::Argc>1)
632  {
633  max_adapt=1;
634  }
635 
637  problem.doc_solution(doc_info);
638  doc_info.number()++;
639 
640  // Do steady solve first -- this also sets the history values
641  // to those corresponding to an impulsive start from the
642  // steady solution
643  problem.steady_newton_solve(max_adapt);
644 
646  problem.doc_solution(doc_info);
647  doc_info.number()++;
648 
650  max_adapt=1;
651 
652  // We don't want to re-assign the initial condition after the mesh
653  // adaptation
654  bool first=false;
655 
656 // Timestepping loop
657  for (unsigned istep=0;istep<nstep;istep++)
658  {
659  // Solve the problem
660  problem.unsteady_newton_solve(dt,max_adapt,first);
661 
662  // Output the solution
663  problem.doc_solution(doc_info);
664 
665  // Step number
666  doc_info.number()++;
667  }
668 
669 }//end of main
Flow around a cylinder with flag.
Definition: turek_flag_non_fsi.cc:312
Definition: algebraic_elements.h:540
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
double Period
Period of prescribed flag oscillation.
Definition: turek_flag_non_fsi.cc:70
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
double Re
reynolds number
Definition: adaptive_hopf.cc:54
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429
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, Global_Physical_Variables::height(), oomph::DocInfo::number(), Flag_definition::Period, problem, Global_Parameters::Re, oomph::DocInfo::set_directory(), and Flag_definition::setup().