3d_static_cap_elastic.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  AxialSolidQuarterTubeMesh< ELEMENT, INTERFACE_ELEMENT >
 
class  SolidFreeSurfaceRotationProblem< 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[])
 

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

608 {
609 
610  // Store command line arguments
611  CommandLineArgs::setup(argc,argv);
612 
613  // Allow (up to) five rounds of fully automatic adapation in response to
614  //-----------------------------------------------------------------------
615  // error estimate
616  //---------------
617  //unsigned max_adapt;
618  double max_error_target,min_error_target;
619 
620  using namespace Global_Physical_Variables;
621 
622  // Set max number of adaptations in black-box Newton solver and
623  // error targets for adaptation
624  if (CommandLineArgs::Argc==1)
625  {
626  // Up to five adaptations
627  //max_adapt=5;
628 
629  // Error targets for adaptive refinement
630  max_error_target=0.005;
631  min_error_target=0.0005;
632  }
633  // Validation run: Only one adaptation. Relax error targets
634  // to ensure that not all elements are refined so we're getting
635  // some hanging nodes.
636  else
637  {
638  // Validation run: Just one round of adaptation
639  //max_adapt=1;
640 
641  // Error targets for adaptive refinement
642  max_error_target=0.02;
643  min_error_target=0.002;
644  }
645  // end max_adapt setup
646 
647 
648  unsigned n_angles = 1;
649 
650  // Set up doc info
651  DocInfo doc_info;
652 
653 
654  // Do Taylor-Hood elements
655  //------------------------
656  {
657  // Set output directory
658  doc_info.set_directory("RESLT_TH_internal_elastic");
659 
660  // Step number
661  doc_info.number()=0;
662 
663  // Build problem
668  problem(doc_info,min_error_target,max_error_target,1);
669 
670  cout << " Doing Taylor Hood elements (internal hijack) " << std::endl;
671 
672  //Hand set the coordinates to the lagrangian coordinates
673  //This is required because the refinement gets things a bit wrong
674  // (Amazingly) must talk to Matthias about it
675  problem.set_positions_from_lagrangian_coordinates();
676 
677  // Solve the problem (DO NOT ADAPT)
678  problem.newton_solve();
679  // Doc solution after solving
680  problem.doc_solution();
681  // Increment label for output files
682  problem.Doc_info.number()++;
683 
684  //Decrease the contact angle
685  for(unsigned i=0;i<n_angles;i++)
686  {
687  Angle -= 0.1;
688 
689  problem.newton_solve();
690 
691  // Doc solution after solving
692  problem.doc_solution();
693 
694  // Increment label for output files
695  problem.Doc_info.number()++;
696  }
697  }
698 
699  // Do Taylor-Hood elements
700  //------------------------
701  {
702  // Set output directory
703  doc_info.set_directory("RESLT_TH_external_elastic");
704 
705  // Step number
706  doc_info.number()=0;
707 
708  // Build problem
713  problem(doc_info,min_error_target,max_error_target,0);
714 
715  cout << " Doing Taylor Hood elements (external hijack) " << std::endl;
716 
717  //Hand set the coordinates to the lagrangian coordinates
718  //This is required because the refinement gets things a bit wrong
719  // (Amazingly) must talk to Matthias about it
720  problem.set_positions_from_lagrangian_coordinates();
721 
722 
723  // Solve the problem (DO NOT ADAPT)
724  problem.newton_solve();
725  // Doc solution after solving
726  problem.doc_solution();
727  // Increment label for output files
728  problem.Doc_info.number()++;
729 
730  //Decrease the contact angle
731  for(unsigned i=0;i<n_angles;i++)
732  {
733  Angle -= 0.1;
734 
735  problem.newton_solve();
736 
737  // Doc solution after solving
738  problem.doc_solution();
739 
740  // Increment label for output files
741  problem.Doc_info.number()++;
742  }
743  }
744 
745 
746 
747  // Do Crouzeix Raviart elements
748  //------------------------
749  {
750  // Set output directory
751  doc_info.set_directory("RESLT_CR_internal_elastic");
752 
753  // Step number
754  doc_info.number()=0;
755 
756  // Build problem
761  problem(doc_info,min_error_target,max_error_target,2);
762 
763  cout << " Doing Crouzeix Raviart elements (internal hijack) " << std::endl;
764 
765  //Hand set the coordinates to the lagrangian coordinates
766  //This is required because the refinement gets things a bit wrong
767  // (Amazingly) must talk to Matthias about it
768  problem.set_positions_from_lagrangian_coordinates();
769 
770  // Solve the problem (DO NOT ADAPT)
771  problem.newton_solve();
772  // Doc solution after solving
773  problem.doc_solution();
774  // Increment label for output files
775  problem.Doc_info.number()++;
776 
777  //Decrease the contact angle
778  for(unsigned i=0;i<n_angles;i++)
779  {
780  Angle -= 0.1;
781 
782  problem.newton_solve();
783 
784  // Doc solution after solving
785  problem.doc_solution();
786 
787  // Increment label for output files
788  problem.Doc_info.number()++;
789  }
790  }
791 
792  // Do Taylor-Hood elements
793  //------------------------
794  {
795  // Set output directory
796  doc_info.set_directory("RESLT_CR_external_elastic");
797 
798  // Step number
799  doc_info.number()=0;
800 
801  // Build problem
806  problem(doc_info,min_error_target,max_error_target,0);
807 
808  cout << " Doing Crouzeix Raviart elements (external hijack) " << std::endl;
809 
810  //Hand set the coordinates to the lagrangian coordinates
811  //This is required because the refinement gets things a bit wrong
812  // (Amazingly) must talk to Matthias about it
813  problem.set_positions_from_lagrangian_coordinates();
814 
815  // Solve the problem (DO NOT ADAPT)
816  problem.newton_solve();
817  // Doc solution after solving
818  problem.doc_solution();
819  // Increment label for output files
820  problem.Doc_info.number()++;
821 
822  //Decrease the contact angle
823  for(unsigned i=0;i<n_angles;i++)
824  {
825  Angle -= 0.1;
826 
827  problem.newton_solve();
828 
829  // Doc solution after solving
830  problem.doc_solution();
831 
832  // Increment label for output files
833  problem.Doc_info.number()++;
834  }
835  }
836 
837 
838 
839 } // end_of_main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Entry flow problem in quarter tube domain.
Definition: 3d_static_cap_elastic.cc:235
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
Refineable version of the PseudoSolidNodeUpdateELement.
Definition: pseudosolid_node_update_elements.h:585
Refineable version of Crouzeix Raviart elements. Generic class definitions.
Definition: refineable_navier_stokes_elements.h:1109
Class for refineable QPVDElement elements.
Definition: refineable_solid_elements.h:181
Definition: refineable_navier_stokes_elements.h:652
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
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, i, oomph::DocInfo::number(), problem, oomph::DocInfo::set_directory(), and Flag_definition::setup().