axisym_linear_elasticity/cylinder/cylinder.cc File Reference
#include <fenv.h>
#include "generic.h"
#include "axisym_linear_elasticity.h"
#include "meshes/rectangular_quadmesh.h"

Classes

class  AxisymmetricLinearElasticityProblem< ELEMENT, TIMESTEPPER >
 

Namespaces

 Global_Parameters
 Namespace for global parameters.
 

Functions

void Global_Parameters::boundary_traction (const double &time, const Vector< double > &x, const Vector< double > &n, Vector< double > &result)
 The traction function at r=Rmin: (t_r, t_z, t_theta) More...
 
void Global_Parameters::body_force (const double &time, const Vector< double > &x, Vector< double > &result)
 
void Global_Parameters::exact_solution_th (const Vector< double > &x, Vector< double > &u)
 
double Global_Parameters::u_r (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the r-component of displacement. More...
 
double Global_Parameters::u_z (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the z-component of displacement. More...
 
double Global_Parameters::u_theta (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the theta-component of displacement. More...
 
double Global_Parameters::d_u_r_dt (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the r-component of velocity. More...
 
double Global_Parameters::d_u_z_dt (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the z-component of velocity. More...
 
double Global_Parameters::d_u_theta_dt (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the theta-component of velocity. More...
 
double Global_Parameters::d2_u_r_dt2 (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the r-component of acceleration. More...
 
double Global_Parameters::d2_u_z_dt2 (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the z-component of acceleration. More...
 
double Global_Parameters::d2_u_theta_dt2 (const double &time, const Vector< double > &x)
 Calculate the time dependent form of the theta-component of acceleration. More...
 
void Global_Parameters::exact_solution (const double &time, const Vector< double > &x, Vector< double > &u)
 
int main (int argc, char *argv[])
 Driver code. More...
 

Variables

double Global_Parameters::Nu = 0.3
 Define Poisson's ratio Nu. More...
 
double Global_Parameters::E = 1.0
 Define the non-dimensional Young's modulus. More...
 
double Global_Parameters::Lambda = E*Nu/(1.0+Nu)/(1.0-2.0*Nu)
 Lame parameters. More...
 
double Global_Parameters::Mu = E/2.0/(1.0+Nu)
 
double Global_Parameters::Omega_sq = 0.5
 Square of the frequency of the time dependence. More...
 
unsigned Global_Parameters::Nr = 5
 Number of elements in r-direction. More...
 
unsigned Global_Parameters::Nz = 10
 Number of elements in z-direction. More...
 
double Global_Parameters::Lr = 1.0
 Length of domain in r direction. More...
 
double Global_Parameters::Lz = 2.0
 Length of domain in z-direction. More...
 
double Global_Parameters::Rmin = 0.1
 Set up min r coordinate. More...
 
double Global_Parameters::Zmin = 0.3
 Set up min z coordinate. More...
 
double Global_Parameters::Rmax = Rmin+Lr
 Set up max r coordinate. More...
 
double Global_Parameters::Zmax = Zmin+Lz
 Set up max z coordinate. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code.

715 {
716  // Store command line arguments
717  CommandLineArgs::setup(argc,argv);
718 
719  // Define possible command line arguments and parse the ones that
720  // were actually specified
721 
722  // Validation?
724 
725  // Parse command line
727 
728  // Doc what has actually been specified on the command line
730 
731  // Set up doc info
732  DocInfo doc_info;
733 
734  // Set output directory
735  doc_info.set_directory("RESLT");
736 
737  // Time dependent problem instance
740 
741  // Set the initial time to t=0
742  problem.time_pt()->time()=0.0;
743 
744  // Set and initialise timestep
745  double dt=0;
746 
747  // If we're validating, use a larger timestep so that we can do fewer steps
748  // before reaching interesting behaviour
750  {
751  dt=0.1;
752  }
753  else // Otherwise use a small timestep
754  {
755  dt=0.01;
756  }
757  problem.time_pt()->initialise_dt(dt);
758 
759  // Set the initial conditions
760  problem.set_initial_conditions();
761 
762  // Doc the initial conditions and increment the doc_info number
763  problem.doc_solution(doc_info);
764  doc_info.number()++;
765 
766  // Find the number of timesteps to perform
767  unsigned nstep=0;
768 
769  // If we're validating, only do a few timesteps; otherwise do a whole period
771  {
772  nstep=5;
773  }
774  else // Otherwise calculate based on timestep
775  {
776  // Solve for one full period
777  double t_max=2*MathematicalConstants::Pi;
778 
779  nstep=unsigned(t_max/dt);
780  } //end_of_calculate_number_of_timesteps
781 
782  // Do the timestepping
783  for(unsigned istep=0;istep<nstep;istep++)
784  {
785  // Solve for this timestep
786  problem.unsteady_newton_solve(dt);
787 
788  // Doc the solution and increment doc_info number
789  problem.doc_solution(doc_info);
790  doc_info.number()++;
791  }
792 } // end_of_main
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:228
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: timesteppers.h:912
Definition: axisym_linear_elasticity_elements.h:541
double Pi
Definition: two_d_biharmonic.cc:235
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
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(), oomph::CommandLineArgs::doc_specified_flags(), oomph::DocInfo::number(), oomph::CommandLineArgs::parse_and_assign(), BiharmonicTestFunctions2::Pi, problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), and oomph::CommandLineArgs::specify_command_line_flag().