unstructured_adaptive_2d_fsi.cc File Reference
#include "generic.h"
#include "navier_stokes.h"
#include "solid.h"
#include "constitutive.h"
#include "meshes/triangle_mesh.h"

Classes

class  UnstructuredFSIProblem< FLUID_ELEMENT, SOLID_ELEMENT >
 Unstructured 3D FSI problem. More...
 

Namespaces

 Global_Physical_Variables
 Global variables.
 

Functions

int main (int argc, char **argv)
 Demonstrate how to solve an unstructured solid problem. More...
 

Variables

double Global_Physical_Variables::Mesh_Nu = 0.1
 Mesh poisson ratio. More...
 
ConstitutiveLawGlobal_Physical_Variables::Mesh_constitutive_law_pt =0
 Pointer to constitutive law for the mesh. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Demonstrate how to solve an unstructured solid problem.

923 {
924 
925  // Store command line arguments
926  CommandLineArgs::setup(argc,argv);
927 
928  // Define possible command line arguments and parse the ones that
929  // were actually specified
930 
931  // Validation?
933 
934  // Parse command line
936 
937  // Doc what has actually been specified on the command line
939 
940  DocInfo doc_info;
941 
942  // Output directory
943  doc_info.set_directory("RESLT");
944 
945  //Create a trace file
946  std::ofstream trace("RESLT/trace.dat");
947 
948  // Create generalised Hookean constitutive equations
951 
952  // Create generalised Hookean constitutive equations for the mesh as well
955 
956  //Set up the problem
961 
962 //Output initial configuration
963 problem.doc_solution(doc_info);
964 doc_info.number()++;
965 
966 // Solve the problem
967 problem.newton_solve();
968 
969 //Output solution
970 problem.doc_solution(doc_info);
971 doc_info.number()++;
972 
973 //Calculate the strain energy of the solid and dissipation in the
974 //fluid as global output measures of the solution for validation purposes
975 problem.output_strain_and_dissipation(trace);
976 
977 //Number of steps to be taken
978 unsigned n_step = 10;
979 //Reduce the number of steps if validating
981  {
982  n_step=3;
983  }
984 
985 //Now Crank up interaction
986 for(unsigned i=0;i<n_step;i++)
987  {
989  problem.newton_solve(1);
990 
991  //Reset the lagrangian nodal coordinates in the fluid mesh
992  //(Obviously we shouldn't do this in the solid mesh)
993  problem.Fluid_mesh_pt->set_lagrangian_nodal_coordinates();
994  //Output solution
995  problem.doc_solution(doc_info);
996  doc_info.number()++;
997 
998  //Calculate the strain energy of the solid and dissipation in the
999  //fluid as global output measures of the solution for validation purposes
1000  problem.output_strain_and_dissipation(trace);
1001  }
1002 
1003 trace.close();
1004 } // end main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Unstructured 3D FSI problem.
Definition: unsteady_vmtk_fsi.cc:108
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: constitutive_laws.h:699
PVDElementWithContinuousPressure upgraded to become projectable.
Definition: solid_elements.h:734
Taylor Hood upgraded to become projectable.
Definition: navier_stokes_elements.h:2914
Definition: pseudosolid_node_update_elements.h:58
Definition: solid_elements.h:1756
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
double Mesh_Nu
Mesh poisson ratio.
Definition: unstructured_adaptive_2d_fsi.cc:95
double Nu
Poisson's ratio.
Definition: TwenteMeshGluing.cpp:71
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
Definition: TwenteMeshGluing.cpp:65
double Q
Ratio of scales.
Definition: elastic_bretherton.cc:131
ConstitutiveLaw * Mesh_constitutive_law_pt
Pointer to constitutive law for the mesh.
Definition: unstructured_adaptive_2d_fsi.cc:98
bool command_line_flag_has_been_set(const std::string &flag)
Definition: oomph_utilities.cc:501
void specify_command_line_flag(const std::string &command_line_flag, const std::string &doc)
Specify possible argument-free command line flag.
Definition: oomph_utilities.cc:451
void parse_and_assign(int argc, char *argv[], const bool &throw_on_unrecognised_args)
Definition: oomph_utilities.cc:760
void doc_specified_flags()
Document specified command line flags.
Definition: oomph_utilities.cc:610
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References oomph::CommandLineArgs::command_line_flag_has_been_set(), Global_Physical_Variables::Constitutive_law_pt, oomph::CommandLineArgs::doc_specified_flags(), i, Global_Physical_Variables::Mesh_constitutive_law_pt, Global_Physical_Variables::Mesh_Nu, Global_Physical_Variables::Nu, oomph::DocInfo::number(), oomph::CommandLineArgs::parse_and_assign(), problem, Global_Physical_Variables::Q, oomph::DocInfo::set_directory(), Flag_definition::setup(), and oomph::CommandLineArgs::specify_command_line_flag().