b_convection_sphere.cc File Reference

Classes

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

Namespaces

 Global_Parameters
 Namespace for global parameters.
 
 StokesFlowExactWind
 

Functions

void StokesFlowExactWind::get_wind (const Vector< double > &x, Vector< double > &wind)
 Wind that represents a constantly translating sphere. More...
 
int main ()
 Driver. More...
 

Function Documentation

◆ main()

int main ( )

Driver.

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

563 {
564  Global_Parameters::G.resize(3);
565  Global_Parameters::G[0] = 0.0;
566  Global_Parameters::G[1] = -1.0;
567  Global_Parameters::G[2] = 0.0;
568 
569  // radius and Length of domain
570  double radius=5.0;
571  double length=10.0;
573 
574  //Create a new ellipse object as the central cylinder
575  HalfEllipse* cylinder_pt =
577 
578  // Create Problem
581  problem(cylinder_pt,radius,length);
582 
583  // Solve adaptively with up to max_adapt rounds of refinement
584  unsigned max_adapt=1;
585 
586  // Output filename
587  char filename[100];
588  // Trace file
589  std::ofstream trace("trace.dat");
590 
591  //Step up in the Rayleigh number
592  for(unsigned i=0;i<2;i++)
593  {
594  problem.newton_solve(max_adapt);
595 
596  //Open an output file
597  sprintf(filename,"soln_Re%g_Ra%g.dat", Global_Parameters::Re,
599  //Doc result
600  ofstream outfile(filename);
601  problem.mesh_pt()->output(outfile,5);
602  outfile.close();
603 
604  //Compute drag and mass transfer
605  Vector<double> drag(2); double nusselt = 0.0; double area = 0.0;
606  problem.compute_drag_nusselt(drag,nusselt, area);
607 
609  << " " << Global_Parameters::Pe << " "
610  << drag[0] << " " << drag[1] << " " << 2.0*nusselt << std::endl;
611 
612  //Global_Parameters::Re += 10.0;
613  //Global_Parameters::Pe = Global_Parameters::Pr*Global_Parameters::Re;
614  Global_Parameters::Ra += 40.0;
615  }
616 
617  trace.close();
618 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Flow around a cylinder in rectangular domain.
Definition: axisym_heat_sphere.cc:225
My own Ellipse class.
Definition: axisym_heat_sphere/half_rectangle_with_hole_mesh.h:40
Definition: axisym_heat_sphere/axisym_buoyant_navier_stokes.h:64
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 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, Global_Parameters::Pe, Global_Parameters::Pr, problem, Global_Parameters::Ra, UniformPSDSelfTest::radius, Global_Parameters::Re, and Global_Parameters::Sphere_centre_z.