#include "Oomph/SolidProblem.h"
#include "Math/Helpers.h"

## Classes

class  Beam
Defines a SolidProblem of element type RefineableQDPVDElement<3,2>. Add functionality to write output. More...

int main ()

## ◆ main()

 int main ( )

Simulates a cubic rod (20mm x 2mm x 2mm) of density 2500 kg/m^3, elastic modulus 100 MPa, fixed on left side, bent by gravity

72 {
73  // Solve the problem
74  Beam problem;
76  problem.setElasticModulus(1e8);
77  problem.setDensity(2500);
78  problem.setSolidCubicMesh(20, 2, 2, 0, 0.2, 0, 0.02, 0, 0.02);
79  problem.pinBoundary(Beam::Boundary::X_MIN);
80  problem.setBodyForceAsGravity();
81  problem.setNewtonSolverTolerance(3e-8);
82  problem.prepareForSolve();
83  problem.linear_solver_pt()->disable_doc_time();
84  //problem.disable_info_in_newton_solve();
85  //set time scale of oscillation
86  //https://vlab.amrita.edu/?sub=3&brch=175&sim=1080&cnt=1
87  double b = 0.02, d = 0.02, l = 0.2;
88  double inertia = b*d*d*d/12;
89  double omega = 1.875*1.875*sqrt(problem.getElasticModulus()*inertia/(problem.getDensity()*b*d*std::pow(l,4)));
90  double timeScale = 2*constants::pi/omega; //0.06
91  // simulate two oscillations, check energy balance
93  return 0;
94 }
Defines a SolidProblem of element type RefineableQDPVDElement<3,2>. Add functionality to write output...
Definition: SolidBeam.cpp:31
void setElasticModulus(double elasticModulus)
set function for elasticModulus_
Definition: SolidProblem.h:153
void setName(const std::string &name)
set function for name_
Definition: SolidProblem.h:140
void prepareForSolve()
Definition: SolidProblem.h:322
void setSolidCubicMesh(const unsigned &nx, const unsigned &ny, const unsigned &nz, const double &xMin, const double &xMax, const double &yMin, const double &yMax, const double &zMin, const double &zMax)
Definition: SolidProblem.h:546
void pinBoundary(unsigned b)
Definition: SolidProblem.h:227
void solveUnsteady(double timeMax, double dt, unsigned saveCount=10)
Definition: SolidProblem.h:431
void setDensity(double density)
set function for density_
Definition: SolidProblem.h:192
void setBodyForceAsGravity(double gravity=9.8)
set function for body_force_pt
Definition: SolidProblem.h:205
void setNewtonSolverTolerance(double Newton_solver_tolerance)
set function for Newton_solver_tolerance
Definition: SolidProblem.h:257
double getDensity() const
get function for density_
Definition: SolidProblem.h:199
double getElasticModulus() const
get function for elasticModulus_
Definition: SolidProblem.h:160
double timeScale
Time scale.
Definition: VCoupledElement.h:34
const Mdouble pi
Definition: ExtendedMath.h:45