spherical_shell_convection.cc File Reference

Classes

class  RefineableSphereConvectionProblem< ELEMENT >
 Convection in a spherical shell. More...
 

Namespaces

 Global_Physical_Variables
 Global variables.
 

Functions

int main (int argc, char **argv)
 Driver for RefineableSphereConvection test problem using a. More...
 

Variables

double Global_Physical_Variables::Ra = 10.0
 Rayleigh number. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver for RefineableSphereConvection test problem using a.

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////

353 {
354  //Set gravity
355  Global_Physical_Variables::G.resize(3,0.0);
357 
358  // Label for output
359  DocInfo doc_info;
360 
361  // Set output directory
362  doc_info.set_directory("RESLT_adapt");
363 
364  // ---------------
365  // end of Set up doc info
366 
367  // Build the problem with QCrouzeixRaviartElements
370  problem;
371 
372  // Over-ride the maximum and minimum permitted errors
373  problem.mesh_pt()->max_permitted_error() = 1.0e-3; //Default = 1.0e-3
374  problem.mesh_pt()->min_permitted_error() = 1.0e-5; //Default = 1.0e-5
375 
376  // Over-ride the maximum and minimum permitted refinement levels
377  problem.mesh_pt()->max_refinement_level() = 4;//maximum_ref_level;
378  problem.mesh_pt()->min_refinement_level() = 1;//minimum_ref_level;
379 
380  //Set the boundary conditions
381  problem.set_boundary_conditions(0.0);
382 
383  //Set the maximum adaptation
384  unsigned max_adapt = 2;
385 
386  // Solve the problem
387  problem.steady_newton_solve(max_adapt);
388  problem.doc_solution(doc_info);
389 
390  //Crank up the Rayleigh number and kick it
392 
393  //Set the timestep
394 
395  //Set the timestep
396  double dt = 1.0;
397 
398  //Initialise the value of the timestep and set an impulsive start
399  problem.assign_initial_values_impulsive(dt);
400 
401  //Set the number of timesteps to our default value
402  unsigned n_steps = 100; //This is enough to get to steady state
403 
404  //If we have a command line argument, perform fewer steps
405  if(argc > 1) {n_steps = 5;}
406 
407  //Perform n_steps timesteps
408  for(unsigned i=0;i<n_steps;++i)
409  {
410  problem.unsteady_newton_solve(dt);
411  problem.doc_solution(doc_info);
412  }
413 
414 
415 
416 } // end_of_main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Convection in a spherical shell.
Definition: spherical_shell_convection.cc:71
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
Definition: spherical_buoyant_navier_stokes.h:62
double Ra
Rayleigh number.
Definition: spherical_shell_convection.cc:59
Vector< double > G(3)
Direction of gravity.
Definition: spherical_shell_convection.cc:62
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References Global_Physical_Variables::G, i, problem, Global_Physical_Variables::Ra, and oomph::DocInfo::set_directory().