33 #ifndef OOMPH_CONSTITUTIVE_LAWS_HEADER 34 #define OOMPH_CONSTITUTIVE_LAWS_HEADER 38 #include <oomph-lib-config.h> 42 #include "../generic/oomph_utilities.h" 43 #include "../generic/matrices.h" 67 "The strain-energy function as a function of the strain-tensor,\n";
69 "gamma, is not implemented for this strain energy function.\n";
72 OOMPH_CURRENT_FUNCTION,
73 OOMPH_EXCEPTION_LOCATION);
82 "The strain-energy function as a function of the strain\n ";
84 "invariants, I1, I2, I3, is not implemented for this strain\n ";
85 error_message +=
"energy function\n";
88 OOMPH_CURRENT_FUNCTION,
89 OOMPH_EXCEPTION_LOCATION);
101 "Sorry, the FD setup of dW/dgamma hasn't been implemented yet",
102 OOMPH_CURRENT_FUNCTION,
103 OOMPH_EXCEPTION_LOCATION);
114 double FD_Jstep = 1.0e-8;
115 double energy =
W(I);
118 for(
unsigned i=0;
i<3;
i++)
121 double I_prev = I[
i];
125 double energy_new =
W(I);
127 dWdI[
i] = (energy_new - energy) / FD_Jstep;
164 C1_pt(c1_pt), C2_pt(c2_pt) {}
175 {
return (*C1_pt)*(I[0]-3.0) + (*C2_pt)*(I[1]-3.0);}
235 E_pt(new double(1.0)), Must_delete_e(true) {}
242 E_pt(e_pt), Must_delete_e(false) {}
248 if (Must_delete_e)
delete E_pt;
259 double G=(*E_pt)/(2.0*(1.0+(*Nu_pt)));
260 return 0.5*((*C1_pt)*(I[0]-3.0) + (G-(*C1_pt))*(I[1]-3.0)
261 + ((*C1_pt) - 2.0*G)*(I[2]-1.0)
262 + (1.0-(*Nu_pt))*G*(I[2]-1.0)*(I[2]-1.0)/
263 (2.0*(1.0-2.0*(*Nu_pt))));
271 double G=(*E_pt)/(2.0*(1.0+(*Nu_pt)));
272 dWdI[0] = 0.5*(*C1_pt);
273 dWdI[1] = 0.5*(G - (*C1_pt));
274 dWdI[2] = 0.5*((*C1_pt) - 2.0*G + 2.0*(1.0-(*Nu_pt))*G*(I[2]-1.0)/
275 (2.0*(1.0-2.0*(*Nu_pt))));
533 virtual void calculate_second_piola_kirchhoff_stress(
549 virtual void calculate_d_second_piola_kirchhoff_stress_dG(
571 "Incompressible formulation not implemented for this constitutive law",
572 OOMPH_CURRENT_FUNCTION,
573 OOMPH_EXCEPTION_LOCATION);
589 virtual void calculate_d_second_piola_kirchhoff_stress_dG(
593 const double &interpolated_solid_p,
609 double& gen_dil,
double& inv_kappa)
612 "Near-incompressible formulation not implemented for constitutive law",
613 OOMPH_CURRENT_FUNCTION,
614 OOMPH_EXCEPTION_LOCATION);
627 virtual void calculate_d_second_piola_kirchhoff_stress_dG(
630 const double &gen_dil,
631 const double &inv_kappa,
632 const double &interpolated_solid_p,
635 const bool &symmetrize_tensor=
true);
723 Must_delete_e(false) {}
731 Must_delete_e(true) {}
737 if (Must_delete_e)
delete E_pt;
744 void calculate_second_piola_kirchhoff_stress(
759 void calculate_second_piola_kirchhoff_stress(
773 void calculate_second_piola_kirchhoff_stress(
776 double& gen_dil,
double& inv_kappa);
822 ConstitutiveLaw(), Strain_energy_function_pt(strain_energy_function_pt) {}
829 void calculate_second_piola_kirchhoff_stress(
844 void calculate_second_piola_kirchhoff_stress(
858 void calculate_second_piola_kirchhoff_stress(
861 double& gen_dil,
double& inv_kappa);
virtual bool requires_incompressibility_constraint()=0
Pure virtual function in which the user must declare if the constitutive equation requires an incompr...
virtual double W(const DenseMatrix< double > &gamma)
Return the strain energy in terms of the strain tensor.
double * E_pt
Young's modulus.
virtual ~GeneralisedHookean()
Virtual destructor.
double * C1_pt
Mooney-Rivlin parameter.
GeneralisedMooneyRivlin(double *nu_pt, double *c1_pt, double *e_pt)
Constructor takes the pointers to the constitutive parameters: Poisson's ratio, the Mooney-Rivlin par...
IsotropicStrainEnergyFunctionConstitutiveLaw(StrainEnergyFunction *const &strain_energy_function_pt)
Constructor takes a pointer to the strain energy function.
GeneralisedHookean(double *nu_pt)
double W(const DenseMatrix< double > &gamma)
Return the strain energy in terms of strain tensor.
virtual void derivatives(Vector< double > &I, Vector< double > &dWdI)
Return the derivatives of the strain energy function with respect to the strain invariants. Default version is to use finite differences.
Generalisation of Mooney Rivlin constitutive law to compressible media as suggested on p...
StrainEnergyFunction()
Constructor takes no arguments.
GeneralisedHookean(double *nu_pt, double *e_pt)
virtual void calculate_second_piola_kirchhoff_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma_dev, DenseMatrix< double > &G_contra, double &Gdet)
Calculate the deviatoric part of the contravariant 2nd Piola Kirchhoff stress tensor ...
double * E_pt
Young's modulus.
StrainEnergyFunction * Strain_energy_function_pt
Pointer to the strain energy function.
double W(const DenseMatrix< double > &gamma)
Return the strain energy in terms of strain tensor.
virtual ~StrainEnergyFunction()
Empty virtual destructor.
double * C2_pt
Pointer to second Mooney Rivlin constant.
bool Must_delete_e
Boolean flag to indicate if storage for elastic modulus must be deleted in destructor.
bool requires_incompressibility_constraint()
Pure virtual function in which the user must declare if the constitutive equation requires an incompr...
double * C1_pt
Pointer to first Mooney Rivlin constant.
virtual ~ConstitutiveLaw()
Empty virtual destructor.
const std::complex< double > I(0.0, 1.0)
The imaginary unit.
Base class for strain energy functions to be used in solid mechanics computations.
bool requires_incompressibility_constraint()
State if the constitutive equation requires an incompressible formulation in which the volume constra...
ConstitutiveLaw()
Empty constructor.
double * Nu_pt
Poisson ratio.
void derivatives(Vector< double > &I, Vector< double > &dWdI)
Return the derivatives of the strain energy function with respect to the strain invariants.
MooneyRivlin strain-energy function. with constitutive parameters C1 and C2: where incompressibility...
double * Nu_pt
Poisson's ratio.
virtual void derivative(const DenseMatrix< double > &gamma, DenseMatrix< double > &dWdgamma)
Return the derivatives of the strain energy function with respect to the components of the strain ten...
double W(const Vector< double > &I)
Return the strain energy in terms of the strain invariants.
virtual ~GeneralisedMooneyRivlin()
Virtual destructor.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
bool requires_incompressibility_constraint()
Pure virtual function in which the user must declare if the constitutive equation requires an incompr...
void derivatives(Vector< double > &I, Vector< double > &dWdI)
Return the derivatives of the strain energy function with respect to the strain invariants.
virtual double W(const Vector< double > &I)
Return the strain energy in terms of the strain invariants.
GeneralisedMooneyRivlin(double *nu_pt, double *c1_pt)
Constructor takes the pointers to the constitutive parameters: Poisson's ratio, the Mooney-Rivlin par...
MooneyRivlin(double *c1_pt, double *c2_pt)
Constructor takes the pointer to the value of the constants.
virtual void calculate_second_piola_kirchhoff_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma_dev, DenseMatrix< double > &Gcontra, double &gen_dil, double &inv_kappa)
Calculate the deviatoric part of the contravariant 2nd Piola Kirchoff stress tensor. Also return the contravariant deformed metric tensor, the generalised dilatation, and the inverse of the bulk modulus . This form is appropriate for near-incompressible materials for which where the "pressure" is determined from .
virtual ~MooneyRivlin()
Empty Virtual destructor.
bool Must_delete_e
Boolean flag to indicate if storage for elastic modulus must be deleted in destructor.
bool requires_incompressibility_constraint()
Pure virtual function in which the writer must declare if the constitutive equation requires an incom...
double W(const Vector< double > &I)
Return the strain energy in terms of the strain invariants.