multi_domain_b_convect_sph.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.

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

443 {
444  //Multi_domain_functions::Doc_stats=true;
445  //Multi_domain_functions::Doc_full_stats=true;
446 
447  Global_Parameters::G.resize(3);
448  Global_Parameters::G[0] = 0.0;
449  Global_Parameters::G[1] = -1.0;
450  Global_Parameters::G[2] = 0.0;
451 
452  // radius and Length of domain
453  double radius=5.0;
454  double length=10.0;
456 
457 
458  //Create a new ellipse object as the central cylinder
459  HalfEllipse* cylinder_pt =
461 
462  // Create Problem
466  problem(cylinder_pt,radius,length);
467 
468  //Refine the problem a couple of times
469  //problem.refine_uniformly();
470  //problem.refine_uniformly();
471 
472 
473  // Solve adaptively with up to max_adapt rounds of refinement
474  unsigned max_adapt=1;
475 
476  // Output filename
477  char filename[100];
478  // Trace file
479  //std::ofstream trace("trace.dat");
480 
481  //Step up in Reynolds number (and therefore Peclet number)
482  for(unsigned i=0;i<2;i++)
483  {
484  problem.newton_solve(max_adapt);
485 
486  //Open an output file
487  sprintf(filename,"vel_soln_Re%g_Ra%g.dat", Global_Parameters::Re,
489  //Doc result
490  ofstream outfile(filename);
491  problem.nst_mesh_pt()->output(outfile,5);
492  outfile.close();
493 
494  sprintf(filename,"conc_soln_Re%g_Ra%g.dat", Global_Parameters::Re,
496  outfile.open(filename);
497  problem.adv_diff_mesh_pt()->output(outfile,5);
498  outfile.close();
499 
500  Global_Parameters::Ra += 40.0;
501  }
502 
503  //trace.close();
504 }
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
Vector< double > G
Gravity.
Definition: axisym_heat_sphere.cc:65
double Ra
Rayleigh number.
Definition: axisym_heat_sphere.cc:62
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, problem, Global_Parameters::Ra, UniformPSDSelfTest::radius, Global_Parameters::Re, and Global_Parameters::Sphere_centre_z.