spherical_couette.cc File Reference

Classes

class  TorqueCalculationElement< ELEMENT >
 
class  RefineableSphericalCouetteProblem< ELEMENT >
 Driven cavity problem in rectangular domain - time dependent version. More...
 

Namespaces

 Global_Physical_Variables
 Global variables.
 

Functions

int main ()
 Driver for RefineableSphericalCouette test problem using a. More...
 

Function Documentation

◆ main()

int main ( )

Driver for RefineableSphericalCouette test problem using a.

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

506 {
507  // Label for output
508  DocInfo doc_info;
509 
510  // Set output directory
511  doc_info.set_directory("RESLT");
512 
513  // ---------------
514  // end of Set up doc info
515 
516 
517  // Doing QCrouzeixRaviartElements
518  {
519  // Build the problem with QCrouzeixRaviartElements
522  problem;
523  cout << "Doing QCrouzeixRaviartElement" << std::endl;
524 
525  // Open a trace file
526  ofstream trace_file;
527  char filename[100];
528  sprintf(filename,"%s/trace.dat",doc_info.directory().c_str());
529  trace_file.open(filename);
530 
531  // Over-ride the maximum and minimum permitted errors
532  problem.mesh_pt()->max_permitted_error() = 1.0e-3; //Default = 1.0e-3
533  problem.mesh_pt()->min_permitted_error() = 1.0e-5; //Default = 1.0e-5
534 
535  // Over-ride the maximum and minimum permitted refinement levels
536  problem.mesh_pt()->max_refinement_level() = 4;//maximum_ref_level;
537  problem.mesh_pt()->min_refinement_level() = 1;//minimum_ref_level;
538 
539  //Set the boundary conditions
540  problem.set_boundary_conditions();
541 
542  //Set the maximum adaptation
543  unsigned max_adapt = 10;
544 
545  for(unsigned i=0;i<5;i++)
546  {
547  // Solve the problem
548  problem.steady_newton_solve(max_adapt);
549 
550  //Scale the torque to be consistent with the non-dimensionalisation
551  //in Dennis, Singh & Ingham (1980) and many others
552  double torque = 3.0*problem.compute_torque()/4.0;
553  std::cout << "Torque is "
554  << torque
555  << "\n";
556 
557  problem.doc_solution(doc_info,trace_file);
558 
559  trace_file << Global_Physical_Variables::Re << " "
560  << " " << torque
561  << std::endl;
562 
564  }
565 
566  // Close trace file
567  trace_file.close();
568 
569  } // end of QCrouzeixRaviartElements
570 
571 
572 } // end_of_main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Driven cavity problem in rectangular domain - time dependent version.
Definition: spherical_couette.cc:162
Definition: oomph_utilities.h:499
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
Definition: refineable_spherical_navier_stokes_elements.h:568
double Re
Reynolds number.
Definition: fibre.cc:55
string filename
Definition: MergeRestartFiles.py:39
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::DocInfo::directory(), MergeRestartFiles::filename, i, problem, Global_Physical_Variables::Re, and oomph::DocInfo::set_directory().