unstructured_two_d_curved.cc File Reference

Classes

class  AxiPoroProblem< ELEMENT, TIMESTEPPER >
 Problem class. More...
 

Namespaces

 ProblemParameters
 Namespace for exact solution and problem parameters.
 

Functions

void ProblemParameters::update_dependent_parameters ()
 Helper function to update dependent parameters. More...
 
double ProblemParameters::zero_fct (const double &time, const Vector< double > &x)
 
double ProblemParameters::boundary_displ_0 (const double &time, const Vector< double > &x)
 Imposed boundary displacement in r-direction. More...
 
double ProblemParameters::boundary_displ_1 (const double &time, const Vector< double > &x)
 Imposed boundary displacement in z-direction. More...
 
double ProblemParameters::boundary_veloc_0 (const double &time, const Vector< double > &x)
 Imposed boundary velocity in r-direction. More...
 
double ProblemParameters::boundary_veloc_1 (const double &time, const Vector< double > &x)
 Imposed boundary velocity in z-direction. More...
 
double ProblemParameters::boundary_accel_0 (const double &time, const Vector< double > &x)
 Imposed boundary accel in r-direction. More...
 
double ProblemParameters::boundary_accel_1 (const double &time, const Vector< double > &x)
 Imposed boundary accel in z-direction. More...
 
double ProblemParameters::boundary_flux_0 (const double &time, const Vector< double > &x)
 Imposed boundary flux in r-direction. More...
 
double ProblemParameters::boundary_flux_1 (const double &time, const Vector< double > &x)
 Imposed boundary flux in z-direction. More...
 
double ProblemParameters::boundary_dfluxdt_0 (const double &time, const Vector< double > &x)
 Imposed boundary d/dt flux in r-direction. More...
 
double ProblemParameters::boundary_dfluxdt_1 (const double &time, const Vector< double > &x)
 Imposed boundary d/dt flux in z-direction. More...
 
double ProblemParameters::boundary_d2fluxdt2_0 (const double &time, const Vector< double > &x)
 Imposed boundary d2/dt2 flux in r-direction. More...
 
double ProblemParameters::boundary_d2fluxdt2_1 (const double &time, const Vector< double > &x)
 Imposed boundary d2/dt2 flux in z-direction. More...
 
void ProblemParameters::exact_soln (const double &time, const Vector< double > &x, Vector< double > &soln)
 
void ProblemParameters::Solid_body_force (const double &time, const Vector< double > &x, Vector< double > &b)
 Solid body force. More...
 
void ProblemParameters::Fluid_body_force (const double &time, const Vector< double > &x, Vector< double > &f)
 Fluid body force. More...
 
void ProblemParameters::Mass_source (const double &time, const Vector< double > &x, double &f)
 Source term for continuity. More...
 
double ProblemParameters::pressure_magnitude (const double &time)
 Get time-dep pressure magnitude. More...
 
void ProblemParameters::boundary_pressure (const double &time, const Vector< double > &x, const Vector< double > &n, double &result)
 Pressure around the boundary of the domain. More...
 
void ProblemParameters::boundary_traction (const double &time, const Vector< double > &x, const Vector< double > &n, Vector< double > &traction)
 Boundary traction. More...
 
std::string ProblemParameters::Directory ("RESLT")
 
template<class ELEMENT >
void ProblemParameters::edge_sign_setup (Mesh *mesh_pt)
 
int main (int argc, char **argv)
 Main function. More...
 

Variables

bool ProblemParameters::Steady =false
 Steady flag. More...
 
double ProblemParameters::Dt =0.01
 Timestep. More...
 
double ProblemParameters::Lambda_sq =0.7
 Timescale ratio (non-dim density) More...
 
double ProblemParameters::Permeability =1.0
 Permeability. More...
 
double ProblemParameters::E_mod =1.0
 
double ProblemParameters::Nu =0.3
 Poisson's ratio. More...
 
double ProblemParameters::Alpha =0.5
 Alpha, the Biot parameter. More...
 
double ProblemParameters::Porosity =0.3
 Porosity. More...
 
double ProblemParameters::Density_ratio =0.6
 Ratio of pore fluid density to solid matrix density. More...
 
double ProblemParameters::P =1.0
 
double ProblemParameters::T_tanh =0.25
 Parameter for tanh origin for pressure incrementation. More...
 
double ProblemParameters::Alpha_tanh =100.0
 Steepness parameter for tanh for pressure incrementation. More...
 
double ProblemParameters::Lambda = 0.0
 
double ProblemParameters::Mu = 0.0
 
double ProblemParameters::Rho_f_over_rho = 0.0
 
double ProblemParameters::Domain_radius =1.0
 Radius of the smaller arcs in the curved mesh. More...
 
double ProblemParameters::Inner_radius =0.3
 
double ProblemParameters::Element_area = 0.01
 Target area for initial mesh. More...
 
TimeStepperProblemParameters::Internal_time_stepper_pt =0
 Pointer to timestepper for internal dofs. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Main function.

Set dependent parameters

1318 {
1319 
1320  // Store command line arguments
1321  CommandLineArgs::setup(argc,argv);
1322 
1323  // Define possible command line arguments and parse the ones that
1324  // were actually specified
1325 
1326  // Output directory
1329 
1330  // Validation?
1332 
1333  // Target element area for triangle
1336 
1337  // Steady solve?
1339 
1340  // Biot parameter
1343 
1344  // Density ratio (fluid to solid)
1347 
1348  // Intertia parameter
1351 
1352  // Timestep
1355 
1356  // Steepness parameter for tanh increment of pressure load
1359 
1360  // "Time" for tanh increment of pressure load
1363 
1364  // Precalculate n_steps based on defaults
1365  unsigned n_steps=unsigned(1.0/ProblemParameters::Dt);
1366 
1367  // Override n_steps if provided
1369  &n_steps);
1370 
1371  // Max number of adaptations per Newton solve
1372  unsigned max_adapt=0;
1374  &max_adapt);
1375 
1376  // Parse command line
1378 
1379  // Doc what has actually been specified on the command line
1381 
1382  // Don't override the value of Lambda^2 set on the command line
1384  {
1385  // And if it's steady
1387  {
1388  // Switch on steady flag
1390 
1391  // Disable inertia
1393  }
1394  else // Unsteady
1395  {
1396  // Disable steady flag
1398 
1399  // Set default inertia parameter value
1401  }
1402  }
1403 
1406 
1407 #ifdef ADAPTIVE
1408 
1409  // The problem instance
1412 
1413 #else
1414 
1415  // The problem instance
1417 
1418 #endif
1419 
1420  // Doc initial configuration
1421  problem.doc_solution(0);
1422 
1423  // If we're doing a steady solve
1425  {
1426  // Set time to 1 so that the exact solution reduces to the steady solution
1427  problem.time_pt()->time()=1.0;
1428 
1429  // Set the BCs
1430  problem.set_boundary_values();
1431 
1432  // Do the steady solve
1433  problem.steady_newton_solve();
1434 
1435  // Doc the solution
1436  problem.doc_solution(1);
1437  }
1438  else
1439  {
1440  // Set the initial time to t=0
1441  problem.time_pt()->time()=0.0;
1442 
1443  // Initialise the timestep
1444  problem.initialise_dt(ProblemParameters::Dt);
1445 
1446  // Set up the initial conditions
1447  problem.set_initial_condition();
1448 
1449 #ifdef ADAPTIVE
1450 
1451  // We're doing the first timestep
1452  bool first=true;
1453 
1454 #endif
1455 
1456  // Loop over timesteps
1457  for(unsigned i=1;i<=n_steps;i++)
1458  {
1459  // Output current time
1460  oomph_info << "Solving at time "
1461  << problem.time_pt()->time()+ProblemParameters::Dt << std::endl;
1462 
1463 
1464 #ifdef ADAPTIVE
1465 
1466  // Solve the problem with the adaptive Newton's method, allowing
1467  // up to max_adapt mesh adaptations after every solve.
1468  problem.unsteady_newton_solve(ProblemParameters::Dt,max_adapt,first);
1469 
1470  // Now we've done the first timestep...
1471  first=false;
1472 
1473 #else
1474 
1475  // Do the unsteady solve
1476  problem.unsteady_newton_solve(ProblemParameters::Dt);
1477 
1478 #endif
1479 
1480  // Doc the solution
1481  problem.doc_solution(i);
1482  }
1483  }
1484 
1485  return 0;
1486 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Problem class.
Definition: unstructured_two_d_curved.cc:541
Definition: timesteppers.h:912
Axisymmetric poro elasticity upgraded to become projectable.
Definition: axisym_poroelasticity_elements.h:1399
Definition: Taxisym_poroelasticity_elements.h:51
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
double T_tanh
Parameter for tanh origin for pressure incrementation.
Definition: unstructured_two_d_curved.cc:81
double Alpha
Alpha, the Biot parameter.
Definition: unstructured_two_d_curved.cc:68
double Density_ratio
Ratio of pore fluid density to solid matrix density.
Definition: unstructured_two_d_curved.cc:74
string Directory
Output directory.
Definition: oscillating_sphere.cc:59
double Alpha_tanh
Steepness parameter for tanh for pressure incrementation.
Definition: unstructured_two_d_curved.cc:84
double Element_area
Target area for initial mesh.
Definition: unstructured_two_d_curved.cc:474
void update_dependent_parameters()
Helper function to update dependent parameters.
Definition: unstructured_two_d_curved.cc:97
double Lambda_sq
Timescale ratio (non-dim density)
Definition: unstructured_two_d_curved.cc:54
double Dt
Timestep.
Definition: unstructured_two_d_curved.cc:51
bool Steady
Steady flag.
Definition: unstructured_two_d_curved.cc:48
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

References ProblemParameters::Alpha, ProblemParameters::Alpha_tanh, oomph::CommandLineArgs::command_line_flag_has_been_set(), ProblemParameters::Density_ratio, ProblemParameters::Directory, oomph::CommandLineArgs::doc_specified_flags(), ProblemParameters::Dt, e(), ProblemParameters::Element_area, i, ProblemParameters::Lambda_sq, oomph::oomph_info, oomph::CommandLineArgs::parse_and_assign(), problem, oomph::CommandLineArgs::setup(), oomph::CommandLineArgs::specify_command_line_flag(), ProblemParameters::Steady, ProblemParameters::T_tanh, and ProblemParameters::update_dependent_parameters().