multi_domain_axisym_heat_sphere.cc File Reference

Classes

class  FlowAroundHalfCylinderProblem< ELEMENT >
 Flow around a cylinder in rectangular domain. More...
 

Namespaces

 Global_Parameters
 Namespace for global parameters.
 

Functions

int main ()
 Driver. More...
 

Function Documentation

◆ main()

int main ( )

Driver.

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

436 {
437  //Multi_domain_functions::Doc_stats=true;
438  //Multi_domain_functions::Doc_full_stats=true;
439 
440  Global_Parameters::G.resize(3);
441  Global_Parameters::G[0] = 0.0;
442  Global_Parameters::G[1] = -1.0;
443  Global_Parameters::G[2] = 0.0;
444 
445  // radius and Length of domain
446  double radius=50.0;
447  double length=100.0;
449 
450 
451  //Create a new ellipse object as the central cylinder
452  HalfEllipse* cylinder_pt =
454 
455  // Create Problem
459  problem(cylinder_pt,radius,length);
460 
461  //Refine the problem a couple of times
462  //problem.refine_uniformly();
463  //problem.refine_uniformly();
464 
465 
466  // Solve adaptively with up to max_adapt rounds of refinement
467  unsigned max_adapt=1;
468 
469  // Output filename
470  char filename[100];
471  // Trace file
472  std::ofstream trace("trace.dat");
473 
474  //Step up in Reynolds number (and therefore Peclet number)
475  for(unsigned i=0;i<2;i++)
476  {
477  problem.newton_solve(max_adapt);
478 
479  //Open an output file
480  sprintf(filename,"vel_soln_Re%g.dat", Global_Parameters::Re);
481  //Doc result
482  ofstream outfile(filename);
483  problem.nst_mesh_pt()->output(outfile,5);
484  outfile.close();
485 
486  sprintf(filename,"conc_soln_Re%g.dat", Global_Parameters::Re);
487  outfile.open(filename);
488  problem.adv_diff_mesh_pt()->output(outfile,5);
489  outfile.close();
490 
491  Global_Parameters::Re += 10.0;
493  }
494 
495  trace.close();
496 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Flow around a cylinder in rectangular domain.
Definition: axisym_heat_sphere.cc:225
Definition: axisym_heat_sphere/multi_domain_axisym_boussinesq_elements.h:364
Definition: axisym_heat_sphere/multi_domain_axisym_boussinesq_elements.h:55
My own Ellipse class.
Definition: axisym_heat_sphere/half_rectangle_with_hole_mesh.h:40
double Pr
Prandtl number.
Definition: axisym_heat_sphere.cc:56
double Pe
Peclet number.
Definition: axisym_heat_sphere.cc:59
Vector< double > G
Gravity.
Definition: axisym_heat_sphere.cc:65
double Sphere_centre_z
Location of the centre of the sphere on the axis.
Definition: axisym_heat_sphere.cc:68
double Re
reynolds number
Definition: adaptive_hopf.cc:54
string filename
Definition: MergeRestartFiles.py:39
radius
Definition: UniformPSDSelfTest.py:15
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References MergeRestartFiles::filename, Global_Parameters::G, i, Global_Parameters::Pe, Global_Parameters::Pr, problem, UniformPSDSelfTest::radius, Global_Parameters::Re, and Global_Parameters::Sphere_centre_z.