3d_static_cap.cc File Reference
#include "generic.h"
#include "navier_stokes.h"
#include "fluid_interface.h"
#include "constitutive.h"
#include "solid.h"
#include "meshes/quarter_tube_mesh.h"

Classes

class  AxialSpineQuarterTubeMesh< ELEMENT, INTERFACE_ELEMENT >
 
class  FreeSurfaceRotationProblem< ELEMENT >
 Entry flow problem in quarter tube domain. More...
 

Namespaces

 Global_Physical_Variables
 Global variables.
 
 WallFunction
 

Functions

void WallFunction::normal (const Vector< double > &x, Vector< double > &normal)
 
int main (int argc, char *argv[])
 

Variables

Vector< doubleGlobal_Physical_Variables::G (3) = 1.0
 Direction of gravity. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver for 3D entry flow into a quarter tube. If there are any command line arguments, we regard this as a validation run and perform only a single adaptation

737 {
738 
739  // Store command line arguments
740  CommandLineArgs::setup(argc,argv);
741 
742  // Allow (up to) five rounds of fully automatic adapation in response to
743  //-----------------------------------------------------------------------
744  // error estimate
745  //---------------
746  //unsigned max_adapt;
747  double max_error_target,min_error_target;
748 
749  using namespace Global_Physical_Variables;
750 
751  G[0] = 0.0; G[1] = 0.0; G[2] = -1.0;
752 
753 
754  // Set max number of adaptations in black-box Newton solver and
755  // error targets for adaptation
756  if (CommandLineArgs::Argc==1)
757  {
758  // Up to five adaptations
759  //max_adapt=5;
760 
761  // Error targets for adaptive refinement
762  max_error_target=0.005;
763  min_error_target=0.0005;
764  }
765  // Validation run: Only one adaptation. Relax error targets
766  // to ensure that not all elements are refined so we're getting
767  // some hanging nodes.
768  else
769  {
770  // Validation run: Just one round of adaptation
771  //max_adapt=1;
772 
773  // Error targets for adaptive refinement
774  max_error_target=0.02;
775  min_error_target=0.002;
776  }
777  // end max_adapt setup
778 
779 
780  unsigned n_angles = 1;
781 
782  // Set up doc info
783  DocInfo doc_info;
784 
785  // Do Taylor-Hood elements
786  //------------------------
787  {
788  // Set output directory
789  doc_info.set_directory("RESLT_TH_internal");
790 
791  // Step number
792  doc_info.number()=0;
793 
794  // Build problem
797  problem(doc_info,min_error_target,max_error_target,1);
798 
799  cout << " Doing Taylor-Hood elements (internal hijack) " << std::endl;
800 
801  // Doc solution after solving
802  problem.doc_solution();
803 
804  // Solve the problem (DO NOT ADAPT)
805  problem.newton_solve();
806 
807  //Decrease the contact angle
808  for(unsigned i=0;i<n_angles;i++)
809  {
810  Angle -= 0.1;
811  problem.newton_solve();
812  }
813  }
814 
815 
816  // Do Taylor-Hood elements
817  //------------------------
818  {
819  // Set output directory
820  doc_info.set_directory("RESLT_TH_external");
821 
822  // Step number
823  doc_info.number()=0;
824 
825  // Build problem
828  problem(doc_info,min_error_target,max_error_target,0);
829 
830  cout << " Doing Taylor-Hood elements (external hijack)" << std::endl;
831 
832  // Doc solution after solving
833  problem.doc_solution();
834 
835  // Solve the problem (DO NOT ADAPT)
836  problem.newton_solve();
837 
838  for(unsigned i=0;i<n_angles;i++)
839  {
840  Angle -= 0.1;
841  problem.newton_solve();
842  }
843  }
844 
845 
846  // Do Crouzeix-Raviart elements
847  //-----------------------------
848  {
849  // Set output directory
850  doc_info.set_directory("RESLT_CR_internal");
851 
852  // Step number
853  doc_info.number()=0;
854 
855  // Build problem
858  problem(doc_info,min_error_target,max_error_target,2);
859 
860  cout << " Doing Crouzeix-Raviart elements (internal hijack) " << std::endl;
861 
862  // Solve the problem DO NOT ADAPT
863  problem.newton_solve();
864 
865  for(unsigned i=0;i<n_angles;i++)
866  {
867  Angle -= 0.1;
868  problem.newton_solve();
869  }
870 
871  }
872 
873  // Do Crouzeix-Raviart elements
874  //-----------------------------
875  {
876  // Set output directory
877  doc_info.set_directory("RESLT_CR_external");
878 
879  // Step number
880  doc_info.number()=0;
881 
882  // Build problem
885  problem(doc_info,min_error_target,max_error_target,0);
886 
887  cout << " Doing Crouzeix-Raviart elements (external hijack) " << std::endl;
888 
889  // Solve the problem DO NOT ADAPT
890  problem.newton_solve();
891 
892  for(unsigned i=0;i<n_angles;i++)
893  {
894  Angle -= 0.1;
895  problem.newton_solve();
896  }
897 
898  }
899 
900 
901 } // end_of_main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Entry flow problem in quarter tube domain.
Definition: free_surface_rotation.cc:389
Definition: oomph_utilities.h:499
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
Definition: hijacked_elements.h:132
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
Global variables.
Definition: TwenteMeshGluing.cpp:60
double Angle
The contact angle.
Definition: marangoni_convection_box.cc:564
Vector< double > G(3)
Direction of gravity.
Definition: spherical_shell_convection.cc:62
int Argc
Number of arguments + 1.
Definition: oomph_utilities.cc:407
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References Global_Physical_Variables::Angle, oomph::CommandLineArgs::Argc, G, i, oomph::DocInfo::number(), problem, oomph::DocInfo::set_directory(), and Flag_definition::setup().