adaptive_drop_in_channel.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  DropInChannelProblem< 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

double Problem_Parameter::Viscosity_ratio = 10.0
 Viscosity ratio of the droplet to the surrounding fluid. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver code for moving block problem.

1304 {
1305 
1306  // Store command line arguments
1307  CommandLineArgs::setup(argc,argv);
1308 
1309  // Define possible command line arguments and parse the ones that
1310  // were actually specified
1311 
1312  // Validation?
1314 
1315  // Parse command line
1317 
1318  // Doc what has actually been specified on the command line
1320 
1321  // Create generalised Hookean constitutive equations
1324 
1325  // Open trace file
1326  Problem_Parameter::Trace_file.open("RESLT/trace.dat");
1327 
1328  // Open norm file
1329  Problem_Parameter::Norm_file.open("RESLT/norm.dat");
1330 
1331 
1332  // Create problem in initial configuration
1335 
1336  // Before starting the time-integration we want to "inflate" it to form
1337  // a proper circular drop. We do this by setting the inflow to zero
1338  // and doing a steady solve (with one adaptation)
1340 
1341  problem.steady_newton_solve(1);
1342 
1343  //Set the Capillary number to 10 and resolve
1344  Problem_Parameter::Ca = 10.0;
1345  problem.steady_newton_solve();
1346 
1347  // If all went well, this should show us a nice circular drop
1348  // in a stationary fluid
1349  problem.doc_solution();
1350 
1351  // Switch off volume constraint
1352  problem.remove_volume_constraint();
1353 
1354 
1355  // Initialise timestepper
1356  double dt=0.025;
1357  problem.initialise_dt(dt);
1358 
1359  // Perform impulsive start from current state
1360  problem.assign_initial_values_impulsive();
1361 
1362  // Output initial conditions
1363  problem.doc_solution();
1364 
1365  // Now switch on the inflow and re-assign the boundary conditions
1366  // (Call to complete_problem_setup() is a bit expensive given that we
1367  // we only want to set the inflow velocity but who cares -- it's just
1368  // a one off.
1370  problem.complete_problem_setup();
1371 
1372  // Solve problem on fixed mesh
1373  unsigned nstep=6;
1375  {
1376  nstep=2;
1377  oomph_info << "Remeshing after every second step during validation\n";
1378  }
1379  for (unsigned i=0;i<nstep;i++)
1380  {
1381  // Solve the problem
1382  problem.unsteady_newton_solve(dt);
1383  problem.doc_solution();
1384  } // done solution on fixed mesh
1385 
1386 
1387  // Now do a proper loop, doing nstep timesteps before adapting/remeshing
1388  // and repeating the lot ncycle times
1389  unsigned ncycle=1000;
1391  {
1392  ncycle=1;
1393  oomph_info << "Only doing one cycle during validation\n";
1394  }
1395 
1396 
1397  // Do the cycles
1398  for(unsigned j=0;j<ncycle;j++)
1399  {
1400  // Allow up to one level of refinement for next solve
1401  unsigned max_adapt=1;
1402 
1403  //Solve problem a few times
1404  for (unsigned i=0;i<nstep;i++)
1405  {
1406  // Solve the problem
1407  problem.unsteady_newton_solve(dt,max_adapt,false);
1408 
1409 
1410  // Build the label for doc and output solution
1411  std::stringstream label;
1412  label << "Adaptation " <<j << " Step "<< i;
1413  problem.doc_solution(label.str());
1414 
1415  // No more refinement for the next nstep steps
1416  max_adapt=0;
1417  }
1418  }
1419 
1420 
1421 } //End of main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Problem class to simulate viscous drop propagating along 2D channel.
Definition: adaptive_drop_in_channel.cc:409
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
ofstream Norm_file
Definition: refineable_two_layer_interface.cc:341
ofstream Trace_file
Trace file.
Definition: refineable_two_layer_interface.cc:335
double Inflow_veloc_magnitude
Definition: adaptive_bubble_in_channel.cc:392
ConstitutiveLaw * Constitutive_law_pt
Constitutive law used to determine the mesh deformation.
Definition: jeffery_orbit.cc:82
double Nu
Pseudo-solid (mesh) Poisson ratio.
Definition: jeffery_orbit.cc:75
double Ca
Capillary number.
Definition: refineable_two_layer_interface.cc:314
label
Definition: UniformPSDSelfTest.py:24
bool command_line_flag_has_been_set(const std::string &flag)
Definition: oomph_utilities.cc:501
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
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References Problem_Parameter::Ca, oomph::CommandLineArgs::command_line_flag_has_been_set(), Problem_Parameter::Constitutive_law_pt, oomph::CommandLineArgs::doc_specified_flags(), i, Problem_Parameter::Inflow_veloc_magnitude, j, UniformPSDSelfTest::label, Problem_Parameter::Norm_file, Problem_Parameter::Nu, oomph::oomph_info, oomph::CommandLineArgs::parse_and_assign(), problem, Flag_definition::setup(), oomph::CommandLineArgs::specify_command_line_flag(), and Problem_Parameter::Trace_file.