axisym_heat_sphere.cc File Reference
#include "generic.h"
#include "half_rectangle_with_hole_mesh.h"
#include "axisym_buoyant_navier_stokes.h"
#include "assert.h"

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

Variables

double Global_Parameters::Pr = 0.73
 Prandtl number. More...
 
double Global_Parameters::Pe = Re*Pr
 Peclet number. More...
 
double Global_Parameters::Ra = 0.0
 Rayleigh number. More...
 
Vector< doubleGlobal_Parameters::G
 Gravity. More...
 
double Global_Parameters::Sphere_centre_z = 0.0
 Location of the centre of the sphere on the axis. More...
 

Function Documentation

◆ main()

int main ( )

Driver.

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

560 {
561  Global_Parameters::G.resize(3);
562  Global_Parameters::G[0] = 0.0;
563  Global_Parameters::G[1] = -1.0;
564  Global_Parameters::G[2] = 0.0;
565 
566  // radius and Length of domain
567  double radius=50.0;
568  double length=100.0;
570 
571  //Create a new ellipse object as the central cylinder
572  HalfEllipse* cylinder_pt =
574 
575  // Create Problem
578  problem(cylinder_pt,radius,length);
579 
580  // Solve adaptively with up to max_adapt rounds of refinement
581  unsigned max_adapt=1;
582 
583  // Output filename
584  char filename[100];
585  // Trace file
586  std::ofstream trace("trace.dat");
587 
588  //Step up in Reynolds number (and therefore Peclet number)
589  for(unsigned i=0;i<2;i++)
590  {
591  problem.newton_solve(max_adapt);
592 
593  //Open an output file
594  sprintf(filename,"soln_Re%g.dat", Global_Parameters::Re);
595  //Doc result
596  ofstream outfile(filename);
597  problem.mesh_pt()->output(outfile,5);
598  outfile.close();
599 
600  //Compute drag and mass transfer
601  Vector<double> drag(2); double nusselt = 0.0; double area = 0.0;
602  problem.compute_drag_nusselt(drag,nusselt, area);
603 
605  << " " << Global_Parameters::Pe << " "
606  << drag[0] << " " << drag[1] << " " << 2.0*nusselt << std::endl;
607 
608  Global_Parameters::Re += 10.0;
610  }
611 
612  trace.close();
613 }
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 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.