interaction/turek_flag/turek_flag.cc File Reference
#include "generic.h"
#include "solid.h"
#include "navier_stokes.h"
#include "multi_physics.h"
#include "meshes/cylinder_with_flag_mesh.h"
#include "meshes/rectangular_quadmesh.h"

Classes

class  TurekProblem< FLUID_ELEMENT, SOLID_ELEMENT >
 Problem class. More...
 

Namespaces

 Global_Parameters
 Namespace for global parameters.
 

Functions

void Global_Parameters::gravity (const double &time, const Vector< double > &xi, Vector< double > &b)
 Non-dimensional gravity as body force. More...
 
double Global_Parameters::flux (const double &t)
 Flux: Pulsatile flow. More...
 
void Global_Parameters::set_parameters (const string &case_id)
 Set parameters for the various test cases. More...
 
int main (int argc, char *argv[])
 Driver. More...
 

Variables

string Global_Parameters::Case_ID ="FSI1"
 Default case ID. More...
 
double Global_Parameters::St =0.5
 Strouhal number (default assignment for FSI1 test case) More...
 
double Global_Parameters::Centre_x =2.0
 x position of centre of cylinder More...
 
double Global_Parameters::Centre_y =2.0
 y position of centre of cylinder More...
 
double Global_Parameters::Radius =0.5
 Radius of cylinder. More...
 
ConstitutiveLawGlobal_Parameters::Constitutive_law_pt =0
 Pointer to constitutive law. More...
 
bool Global_Parameters::Ignore_fluid_loading =false
 Ignore fluid (default assignment for FSI1 test case) More...
 
double Global_Parameters::Gravity =0.0
 Non-dim gravity (default assignment for FSI1 test case) More...
 
double Global_Parameters::Ramp_period =2.0
 Period for ramping up in flux. More...
 
double Global_Parameters::Min_flux =0.0
 Min. flux. More...
 
double Global_Parameters::Max_flux =1.0
 Max. flux. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver.

1081 {
1082  // Store command line arguments
1083  CommandLineArgs::setup(argc,argv);
1084 
1085  // Get case id as string
1086  string case_id="FSI1";
1087  if (CommandLineArgs::Argc==1)
1088  {
1089  oomph_info << "No command line arguments; running self-test FSI1"
1090  << std::endl;
1091  }
1092  else if (CommandLineArgs::Argc==2)
1093  {
1094  case_id=CommandLineArgs::Argv[1];
1095  }
1096  else
1097  {
1098  oomph_info << "Wrong number of command line arguments" << std::endl;
1099  oomph_info << "Enter none (for default) or one (namely the case id"
1100  << std::endl;
1101  oomph_info << "which should be one of: FSI1, FSI2, FSI3, CSM1"
1102  << std::endl;
1103  }
1104  std::cout << "Running case " << case_id << std::endl;
1105 
1106  // Setup parameters for case identified by command line
1107  // argument
1109 
1110  // Prepare output
1111  DocInfo doc_info;
1112  ofstream trace_file;
1113  doc_info.set_directory("RESLT");
1114  trace_file.open("RESLT/trace.dat");
1115 
1116  // Length and height of domain
1117  double length=25.0;
1118  double height=4.1;
1119 
1120  //Set up the problem
1123 
1124  // Default number of timesteps
1125  unsigned nstep=4000;
1126  if (Global_Parameters::Case_ID=="FSI1")
1127  {
1128  std::cout << "Reducing number of steps for FSI1 " << std::endl;
1129  nstep=400;
1130  }
1131 
1132  if (CommandLineArgs::Argc==1)
1133  {
1134  std::cout << "Reducing number of steps for validation " << std::endl;
1135  nstep=2;
1136  }
1137 
1138  //Timestep:
1139  double dt=Global_Parameters::Dt;
1140 
1141  // Initialise timestep
1142  problem.initialise_dt(dt);
1143 
1144  // Impulsive start
1145  problem.assign_initial_values_impulsive(dt);
1146 
1147  // Doc the initial condition
1148  problem.doc_solution(doc_info,trace_file);
1149  doc_info.number()++;
1150 
1151  // Don't re-set the initial conditions when adapting during first
1152  // timestep
1153  bool first = false;
1154 
1155  // Max number of adaptation for time-stepping
1156  unsigned max_adapt=1;
1157 
1158  for(unsigned i=0;i<nstep;i++)
1159  {
1160  // Solve the problem
1161  problem.unsteady_newton_solve(dt,max_adapt,first);
1162 
1163  // Output the solution
1164  problem.doc_solution(doc_info,trace_file);
1165 
1166  // Step number
1167  doc_info.number()++;
1168  }
1169 
1170  trace_file.close();
1171 
1172 }//end of main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Problem class.
Definition: interaction/turek_flag/turek_flag.cc:371
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
Class for refineable QPVDElement elements.
Definition: refineable_solid_elements.h:181
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
string Case_ID
Default case ID.
Definition: interaction/turek_flag/turek_flag.cc:55
void set_parameters(const string &case_id)
Set parameters for the various test cases.
Definition: interaction/turek_flag/turek_flag.cc:143
double Dt
Timestep.
Definition: interaction/pseudo_solid_collapsible_tube/pseudo_solid_collapsible_tube.cc:415
double height(const double &x)
Height of domain.
Definition: simple_spine_channel.cc:429
char ** Argv
Arguments themselves.
Definition: oomph_utilities.cc:410
int Argc
Number of arguments + 1.
Definition: oomph_utilities.cc:407
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::CommandLineArgs::Argc, oomph::CommandLineArgs::Argv, Global_Parameters::Case_ID, Global_Parameters::Dt, Global_Physical_Variables::height(), i, oomph::DocInfo::number(), oomph::oomph_info, problem, oomph::DocInfo::set_directory(), Global_Parameters::set_parameters(), and Flag_definition::setup().