refineable_two_layer_interface.cc File Reference
#include "generic.h"
#include "navier_stokes.h"
#include "solid.h"
#include "constitutive.h"
#include "fluid_interface.h"
#include "meshes/triangle_mesh.h"

Classes

class  oomph::MyCrouzeixRaviartElement
 Overload CrouzeixRaviart element to modify output. More...
 
class  oomph::FaceGeometry< MyCrouzeixRaviartElement >
 
class  oomph::FaceGeometry< FaceGeometry< MyCrouzeixRaviartElement > >
 
class  TwoLayerInterfaceProblem< ELEMENT >
 Problem class to simulate viscous drop propagating along 2D channel. More...
 

Namespaces

 oomph
 DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
 
 Problem_Parameter
 Namespace for Problem Parameter.
 

Functions

int main (int argc, char **argv)
 Driver code for moving block problem. More...
 

Variables

DocInfo Problem_Parameter::Doc_info
 Doc info. More...
 
double Problem_Parameter::ReSt = 5.0
 Womersley number (Reynolds x Strouhal) More...
 
double Problem_Parameter::ReInvFr = 5.0
 Product of Reynolds number and inverse of Froude number. More...
 
double Problem_Parameter::Viscosity_Ratio = 0.1
 
double Problem_Parameter::Density_Ratio = 0.5
 
double Problem_Parameter::Ca = 0.01
 Capillary number. More...
 
Vector< doubleProblem_Parameter::G (2)
 Direction of gravity. More...
 
double Problem_Parameter::Length = 1.0
 Length of the channel. More...
 
double Problem_Parameter::Height = 2.0
 
double Problem_Parameter::Interface_Height = 0.5
 
ofstream Problem_Parameter::Trace_file
 Trace file. More...
 
ofstream Problem_Parameter::Norm_file
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver code for moving block problem.

1069 {
1070 
1071  // Store command line arguments
1072  CommandLineArgs::setup(argc,argv);
1073 
1074  // Define possible command line arguments and parse the ones that
1075  // were actually specified
1076 
1077  // Validation?
1079 
1080  // Parse command line
1082 
1083  // Doc what has actually been specified on the command line
1085 
1086  // Create generalised Hookean constitutive equations
1089 
1090  Problem_Parameter::G[0] = 0.0;
1091  Problem_Parameter::G[1] = -1.0;
1092 
1093  // Create problem in initial configuration
1096 
1097  // Set value of epsilon
1098  const double epsilon = 0.1;
1099 
1100  // Set number of periods for cosine term
1101  const unsigned n_periods = 1;
1102 
1103  const double dt = 0.0025;
1104 
1105  double t_max = 0.6;
1106 
1107  // Deform the mesh/free surface
1108  problem.deform_interface(epsilon,n_periods);
1109 
1110  // Open trace file
1111  char filename[100];
1112  sprintf(filename,"%s/trace.dat",Problem_Parameter::Doc_info.directory().c_str());
1114 
1115  // Initialise trace file
1116  Problem_Parameter::Trace_file << "time, interface height" << std::endl;
1117 
1118  // Initialise timestep
1119  problem.initialise_dt(dt);
1120 
1121  // Set initial condition
1122  problem.set_initial_condition();
1123 
1124  // Maximum number of spatial adaptations per timestep
1125  unsigned max_adapt = 2;
1126 
1127  // Doc initial solution
1128  problem.doc_solution();
1129 
1130  // Determine number of timesteps
1131  const unsigned n_timestep = unsigned(t_max/dt);
1132 
1133  // Are we on the first timestep? At this point, yes!
1134  bool first_timestep = true;
1135 
1136  // Timestepping loop
1137  for(unsigned t=1;t<=n_timestep;t++)
1138  {
1139  // Output current timestep to screen
1140  cout << "\nTimestep " << t << " of " << n_timestep << std::endl;
1141 
1142  // Take one fixed timestep with spatial adaptivity
1143  problem.unsteady_newton_solve(dt,max_adapt,first_timestep);
1144 
1145  // No longer on first timestep, so set first_timestep flag to false
1146  first_timestep = false;
1147 
1148  // Reset maximum number of adaptations for all future timesteps
1149  max_adapt = 1;
1150 
1151  // Doc solution
1152  problem.doc_solution();
1153 
1154  } // End of timestepping loop
1155 
1156 
1157 } //End of main
Problem class to simulate viscous drop propagating along 2D channel.
Definition: refineable_two_layer_interface.cc:352
Definition: constitutive_laws.h:699
Definition: hijacked_elements.h:132
Overload CrouzeixRaviart element to modify output.
Definition: refineable_two_layer_interface.cc:54
Crouzeix Raviart upgraded to become projectable.
Definition: navier_stokes_elements.h:3128
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
string filename
Definition: MergeRestartFiles.py:39
DocInfo Doc_info
Doc info.
Definition: refineable_two_layer_interface.cc:291
ofstream Trace_file
Trace file.
Definition: refineable_two_layer_interface.cc:335
ConstitutiveLaw * Constitutive_law_pt
Constitutive law used to determine the mesh deformation.
Definition: jeffery_orbit.cc:82
Vector< double > G(2)
Direction of gravity.
double Nu
Pseudo-solid (mesh) Poisson ratio.
Definition: jeffery_orbit.cc:75
void specify_command_line_flag(const std::string &command_line_flag, const std::string &doc)
Specify possible argument-free command line flag.
Definition: oomph_utilities.cc:451
void parse_and_assign(int argc, char *argv[], const bool &throw_on_unrecognised_args)
Definition: oomph_utilities.cc:760
void doc_specified_flags()
Document specified command line flags.
Definition: oomph_utilities.cc:610
double epsilon
Definition: osc_ring_sarah_asymptotics.h:43
t
Definition: plotPSD.py:36
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References Problem_Parameter::Constitutive_law_pt, Problem_Parameter::Doc_info, oomph::CommandLineArgs::doc_specified_flags(), oomph::SarahBL::epsilon, MergeRestartFiles::filename, Problem_Parameter::G, Problem_Parameter::Nu, oomph::CommandLineArgs::parse_and_assign(), problem, Flag_definition::setup(), oomph::CommandLineArgs::specify_command_line_flag(), plotPSD::t, and Problem_Parameter::Trace_file.