Example codes
and tutorials
The (Not-so) Quick Guide
List of tutorials/demo codes
Single-Physics Problems
Poisson
Adaptivity illustrated for Poisson
Advection-Diffusion
Unsteady heat equation
Linear wave equation
The Young-Laplace equation
Navier-Stokes
Free-surface Navier-Stokes
Axisymmetric Navier-Stokes
Solid mechanics
Beam structures
Shell structures
Multi-physics Problems
Fluid-structure interaction
Boussinesq convection
Steady thermoelasticity
Methods-based example codes and tutorials
Mesh generation
Linear solvers and preconditioners
Visualisation of the results
Parallel processing
How to write a new element
How to write a new refineable element
Default nonlinear solvers -- the sequence of action functions
...
Documentation
FE theory and top-down discussion of the data structure
The (Not-so) Quick Guide
Comprehensive bottom-up discussion of the data structure
List of available structured and unstructured meshes
Linear solvers and preconditioners
Visualisation of the results
Parallel processing
Coding conventions and C++ style
Creating documentation
Optimisation - robustness vs. "raw speed"
Linear vs. nonlinear problems
Storing shape functions
Changing the default "full" integration scheme
Disabling the ALE formulation of unsteady equations
C vs. C++ output
Different sparse assembly techniques and the STL memory pool
Publications
Publications
Talks
Journal publications
Theses
Picture show
Download
Copyright
Download/installation instructions
Download page
FAQ & Contact
FAQ
Change log
Bugs and other known problems
Completeness of the library & our "To-Do List"
Contact the developers
Get involved

 


Beta release!

Please note that the library has not been "officially" released. While we continue to work on the documentation, these web pages are likely to contain broken links and documents in draft form. Please send an email to

oomph-lib AT maths DOT man DOT ac DOT uk

if you wish to be informed of the library's "official" release.

oomph::PVDEquationsWithPressure< DIM > Class Template Reference

#include <solid_elements.h>

Inheritance diagram for oomph::PVDEquationsWithPressure< DIM >:

oomph::PVDEquationsBase< DIM > oomph::SolidFiniteElement oomph::FiniteElement oomph::GeneralisedElement oomph::GeomObject oomph::QPVDElementWithContinuousPressure< DIM > oomph::QPVDElementWithPressure< DIM > oomph::RefineablePVDEquationsWithPressure< DIM > oomph::RefineableQPVDElementWithContinuousPressure< DIM > oomph::RefineableQPVDElementWithPressure< DIM > oomph::RefineableQPVDElementWithContinuousPressure< DIM > oomph::RefineableQPVDElementWithPressure< DIM > List of all members.

Detailed Description

template<unsigned DIM>
class oomph::PVDEquationsWithPressure< DIM >

A class for elements that solve the equations of solid mechanics, based on the principle of virtual displacements, with a contitutive equation that involves a pressure. This formulation is required in the case of incompressible materials, in which the additional constraint that volume must be conserved is applied. In this case, the Incompressible flag must be set to true. If the Incompressible flag is not set to true, we use the nearly-incompressible formulation of the constitutive equations.

Definition at line 608 of file solid_elements.h.


Public Member Functions

 PVDEquationsWithPressure ()
 Constructor, by default the element is NOT incompressible.
void get_stress (const Vector< double > &s, DenseMatrix< double > &sigma)
 Return the 2nd Piola Kirchoff stress tensor, as calculated from the constitutive law at specified local coordinate.
bool & incompressible ()
 Return the boolean incompressible.
virtual unsigned npres_solid () const =0
 Return the number of solid pressure degrees of freedom.
virtual double solid_p (const unsigned &l)=0
 Return the lth solid pressure.
virtual void set_solid_p (const unsigned &l, const double &p_value)=0
 Set the lth solid pressure to p_value.
virtual int solid_p_nodal_index () const
 Return the index at which the solid pressure is stored if it is stored at the nodes. If not stored at the nodes this will return a negative number.
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Fill in the residuals.
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Fill in contribution to Jacobian (either by FD or analytically, for the positional variables; control this via evaluate_jacobian_by_fd(). Note: Jacobian entries arising from derivatives w.r.t. pressure terms are always computed analytically.
double interpolated_solid_p (const Vector< double > &s)
 Return the interpolated_solid_pressure.
void output (std::ostream &outfile)
 Output: x,y,[z],xi0,xi1,[xi2],p,gamma.
void output (std::ostream &outfile, const unsigned &n_plot)
 Output: x,y,[z],xi0,xi1,[xi2],p,gamma.
void output (FILE *file_pt)
 C-style output: x,y,[z],xi0,xi1,[xi2],p,gamma.
void output (FILE *file_pt, const unsigned &n_plot)
 C-stsyle output: x,y,[z],xi0,xi1,[xi2],p,gamma.

Protected Member Functions

virtual int solid_p_local_eqn (const unsigned &i)=0
 Access function that returns local eqn number information for the solid pressure.
void get_stress (const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma_dev, DenseMatrix< double > &Gcontra, double &gen_dil, double &inv_kappa)
 Return the deviatoric part of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitutive law in the nearly incompresible formulation. Also return the contravariant deformed metric tensor, the generalised dilatation, and the inverse of the bulk modulus.
virtual void solid_pshape (const Vector< double > &s, Shape &psi) const =0
 Return the solid pressure shape functions.
void solid_pshape_at_knot (const unsigned &ipt, Shape &psi) const
 Return the stored solid shape functions at the knots.
virtual void fill_in_generic_residual_contribution_pvd_with_pressure (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
 Returns the residuals for the discretised principle of virtual displacements, formulated in the incompressible/ near-incompressible case.
  • If flag==0, compute only the residual vector.
  • If flag==1, compute residual vector and fully analytical Jacobian
  • If flag==2, also compute the pressure-related entries in the Jacobian (all others need to be done by finite differencing.

void get_stress (const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma_dev, DenseMatrix< double > &Gcontra, double &detG)
 Return the deviatoric part of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitutive law in the incompresible formulation. Also return the contravariant deformed metric tensor, and the determinant of the deformed covariant metric tensor (likely to be needed in the incompressibility constraint).

Protected Attributes

bool Incompressible
 Boolean to determine whether the solid is incompressible or not.

Static Private Attributes

static int Solid_pressure_not_stored_at_node = -100
 Static "magic" number that indicates that the solid pressure is not stored at a node.

Constructor & Destructor Documentation

template<unsigned DIM>
oomph::PVDEquationsWithPressure< DIM >::PVDEquationsWithPressure (  )  [inline]

Constructor, by default the element is NOT incompressible.

Definition at line 619 of file solid_elements.h.


Member Function Documentation

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
) [inline, virtual]

Fill in contribution to Jacobian (either by FD or analytically, for the positional variables; control this via evaluate_jacobian_by_fd(). Note: Jacobian entries arising from derivatives w.r.t. pressure terms are always computed analytically.

Reimplemented from oomph::SolidFiniteElement.

Definition at line 656 of file solid_elements.h.

References oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), oomph::SolidFiniteElement::fill_in_jacobian_from_solid_position_by_fd(), and OOMPH_EXCEPTION_LOCATION.

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_residuals ( Vector< double > &  residuals  )  [inline, virtual]

Fill in the residuals.

Reimplemented from oomph::GeneralisedElement.

Definition at line 644 of file solid_elements.h.

References oomph::GeneralisedElement::Dummy_matrix, and oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure().

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian,
const unsigned &  flag 
) [protected, virtual]

Returns the residuals for the discretised principle of virtual displacements, formulated in the incompressible/ near-incompressible case.

Fill in element's contribution to the elemental residual vector and/or Jacobian matrix. flag=0: compute only residual vector flag=1: compute both, fully analytically flag=2: compute both, using FD for the derivatives w.r.t. to the discrete displacment dofs.

Reimplemented in oomph::RefineablePVDEquationsWithPressure< DIM >.

Definition at line 1108 of file solid_elements.cc.

References oomph::PVDEquationsBase< DIM >::body_force(), oomph::GeneralisedElement::Default_fd_jacobian_step, oomph::FiniteElement::dnodal_position_gen_dt(), oomph::SolidFiniteElement::dshape_lagrangian_at_knot(), oomph::PVDEquationsBase< DIM >::get_isotropic_growth(), oomph::SolidFiniteElement::get_residuals_for_solid_ic(), oomph::PVDEquationsWithPressure< DIM >::get_stress(), oomph::PVDEquationsWithPressure< DIM >::Incompressible, oomph::FiniteElement::integral_pt(), oomph::PVDEquationsWithPressure< DIM >::interpolated_solid_p(), oomph::SolidFiniteElement::interpolated_xi(), oomph::PVDEquationsBase< DIM >::lambda_sq(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::node_pt(), oomph::PVDEquationsWithPressure< DIM >::npres_solid(), oomph::DenseMatrix< T >::nrow(), oomph::Integral::nweight(), oomph::RankFourTensor< T >::offset(), oomph::RankFiveTensor< T >::offset(), oomph::DShape::offset(), OOMPH_EXCEPTION_LOCATION, oomph::Node::position_time_stepper_pt(), oomph::RankFourTensor< T >::raw_direct_access(), oomph::RankFiveTensor< T >::raw_direct_access(), oomph::DShape::raw_direct_access(), oomph::PVDEquationsWithPressure< DIM >::solid_p(), oomph::PVDEquationsWithPressure< DIM >::solid_p_local_eqn(), oomph::PVDEquationsWithPressure< DIM >::solid_pshape_at_knot(), oomph::QuadTreeNames::W, oomph::Integral::weight(), and oomph::TimeStepper::weight().

Referenced by oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_jacobian(), and oomph::PVDEquationsWithPressure< DIM >::fill_in_contribution_to_residuals().

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::get_stress ( const DenseMatrix< double > &  g,
const DenseMatrix< double > &  G,
DenseMatrix< double > &  sigma_dev,
DenseMatrix< double > &  Gcontra,
double &  detG 
) [inline, protected]

Return the deviatoric part of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitutive law in the incompresible formulation. Also return the contravariant deformed metric tensor, and the determinant of the deformed covariant metric tensor (likely to be needed in the incompressibility constraint).

Definition at line 816 of file solid_elements.h.

References oomph::PVDEquationsBase< DIM >::Constitutive_law_pt, and OOMPH_EXCEPTION_LOCATION.

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::get_stress ( const DenseMatrix< double > &  g,
const DenseMatrix< double > &  G,
DenseMatrix< double > &  sigma_dev,
DenseMatrix< double > &  Gcontra,
double &  gen_dil,
double &  inv_kappa 
) [inline, protected]

Return the deviatoric part of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitutive law in the nearly incompresible formulation. Also return the contravariant deformed metric tensor, the generalised dilatation, and the inverse of the bulk modulus.

Definition at line 752 of file solid_elements.h.

References oomph::PVDEquationsBase< DIM >::Constitutive_law_pt, and OOMPH_EXCEPTION_LOCATION.

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::get_stress ( const Vector< double > &  s,
DenseMatrix< double > &  sigma 
) [virtual]

Return the 2nd Piola Kirchoff stress tensor, as calculated from the constitutive law at specified local coordinate.

Compute the contravariant second Piola Kirchoff stress at a given local coordinate. Note: this replicates a lot of code that is already coontained in get_residuals() but without sacrificing efficiency (re-computing the shape functions several times) or creating helper functions with horrendous interfaces (to pass all the functions which shouldn't be recomputed) about this is unavoidable.

Implements oomph::PVDEquationsBase< DIM >.

Definition at line 2118 of file solid_elements.cc.

References oomph::PVDEquationsBase< DIM >::get_isotropic_growth(), oomph::PVDEquationsWithPressure< DIM >::Incompressible, oomph::PVDEquationsWithPressure< DIM >::interpolated_solid_p(), oomph::SolidFiniteElement::interpolated_xi(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::PVDEquationsWithPressure< DIM >::npres_solid(), oomph::PVDEquationsWithPressure< DIM >::solid_p(), and oomph::PVDEquationsWithPressure< DIM >::solid_pshape().

Referenced by oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), and oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure().

template<unsigned DIM>
bool& oomph::PVDEquationsWithPressure< DIM >::incompressible (  )  [inline]

Return the boolean incompressible.

Definition at line 626 of file solid_elements.h.

References oomph::PVDEquationsWithPressure< DIM >::Incompressible.

Referenced by oomph::RefineablePVDEquationsWithPressure< DIM >::further_build().

template<unsigned DIM>
double oomph::PVDEquationsWithPressure< DIM >::interpolated_solid_p ( const Vector< double > &  s  )  [inline]

Return the interpolated_solid_pressure.

Definition at line 700 of file solid_elements.h.

References oomph::PVDEquationsWithPressure< DIM >::npres_solid(), oomph::PVDEquationsWithPressure< DIM >::solid_p(), and oomph::PVDEquationsWithPressure< DIM >::solid_pshape().

Referenced by oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), oomph::RefineableQPVDElementWithPressure< DIM >::further_build(), oomph::RefineableQPVDElementWithContinuousPressure< DIM >::get_interpolated_values(), oomph::PVDEquationsWithPressure< DIM >::get_stress(), and oomph::PVDEquationsWithPressure< DIM >::output().

template<unsigned DIM>
virtual unsigned oomph::PVDEquationsWithPressure< DIM >::npres_solid (  )  const [pure virtual]

Return the number of solid pressure degrees of freedom.

Implemented in oomph::QPVDElementWithPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

Referenced by oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), oomph::PVDEquationsWithPressure< DIM >::get_stress(), and oomph::PVDEquationsWithPressure< DIM >::interpolated_solid_p().

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::output ( FILE *  file_pt,
const unsigned &  n_plot 
) [virtual]

C-stsyle output: x,y,[z],xi0,xi1,[xi2],p,gamma.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QPVDElementWithPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

Definition at line 1984 of file solid_elements.cc.

References oomph::PVDEquationsBase< DIM >::get_isotropic_growth(), oomph::PVDEquationsWithPressure< DIM >::interpolated_solid_p(), oomph::FiniteElement::interpolated_x(), oomph::SolidFiniteElement::interpolated_xi(), and OOMPH_EXCEPTION_LOCATION.

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::output ( FILE *  file_pt  )  [inline, virtual]

C-style output: x,y,[z],xi0,xi1,[xi2],p,gamma.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QPVDElementWithPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

Definition at line 731 of file solid_elements.h.

References oomph::PVDEquationsWithPressure< DIM >::output().

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::output ( std::ostream &  outfile,
const unsigned &  n_plot 
) [virtual]

Output: x,y,[z],xi0,xi1,[xi2],p,gamma.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QPVDElementWithPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

Definition at line 1876 of file solid_elements.cc.

References oomph::PVDEquationsBase< DIM >::get_isotropic_growth(), oomph::PVDEquationsWithPressure< DIM >::interpolated_solid_p(), oomph::FiniteElement::interpolated_x(), oomph::SolidFiniteElement::interpolated_xi(), and OOMPH_EXCEPTION_LOCATION.

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::output ( std::ostream &  outfile  )  [inline, virtual]

Output: x,y,[z],xi0,xi1,[xi2],p,gamma.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::QPVDElementWithPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

Definition at line 720 of file solid_elements.h.

Referenced by oomph::PVDEquationsWithPressure< DIM >::output().

template<unsigned DIM>
virtual void oomph::PVDEquationsWithPressure< DIM >::set_solid_p ( const unsigned &  l,
const double &  p_value 
) [pure virtual]

Set the lth solid pressure to p_value.

Implemented in oomph::QPVDElementWithPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

template<unsigned DIM>
virtual double oomph::PVDEquationsWithPressure< DIM >::solid_p ( const unsigned &  l  )  [pure virtual]

Return the lth solid pressure.

Implemented in oomph::QPVDElementWithPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

Referenced by oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), oomph::PVDEquationsWithPressure< DIM >::get_stress(), and oomph::PVDEquationsWithPressure< DIM >::interpolated_solid_p().

template<unsigned DIM>
virtual int oomph::PVDEquationsWithPressure< DIM >::solid_p_local_eqn ( const unsigned &  i  )  [protected, pure virtual]

Access function that returns local eqn number information for the solid pressure.

Implemented in oomph::QPVDElementWithPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

Referenced by oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), and oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure().

template<unsigned DIM>
virtual int oomph::PVDEquationsWithPressure< DIM >::solid_p_nodal_index (  )  const [inline, virtual]

Return the index at which the solid pressure is stored if it is stored at the nodes. If not stored at the nodes this will return a negative number.

Reimplemented in oomph::QPVDElementWithContinuousPressure< DIM >.

Definition at line 640 of file solid_elements.h.

References oomph::PVDEquationsWithPressure< DIM >::Solid_pressure_not_stored_at_node.

Referenced by oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure().

template<unsigned DIM>
virtual void oomph::PVDEquationsWithPressure< DIM >::solid_pshape ( const Vector< double > &  s,
Shape psi 
) const [protected, pure virtual]

Return the solid pressure shape functions.

Implemented in oomph::QPVDElementWithPressure< DIM >, oomph::QPVDElementWithContinuousPressure< DIM >, oomph::QPVDElementWithPressure< DIM >, oomph::QPVDElementWithPressure< DIM >, oomph::QPVDElementWithContinuousPressure< DIM >, and oomph::QPVDElementWithContinuousPressure< DIM >.

Referenced by oomph::PVDEquationsWithPressure< DIM >::get_stress(), oomph::PVDEquationsWithPressure< DIM >::interpolated_solid_p(), and oomph::PVDEquationsWithPressure< DIM >::solid_pshape_at_knot().

template<unsigned DIM>
void oomph::PVDEquationsWithPressure< DIM >::solid_pshape_at_knot ( const unsigned &  ipt,
Shape psi 
) const [inline, protected]

Return the stored solid shape functions at the knots.

Definition at line 782 of file solid_elements.h.

References oomph::FiniteElement::dim(), and oomph::PVDEquationsWithPressure< DIM >::solid_pshape().

Referenced by oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), and oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure().


Member Data Documentation

template<unsigned DIM>
bool oomph::PVDEquationsWithPressure< DIM >::Incompressible [protected]

Boolean to determine whether the solid is incompressible or not.

Definition at line 797 of file solid_elements.h.

Referenced by oomph::PVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), oomph::RefineablePVDEquationsWithPressure< DIM >::fill_in_generic_residual_contribution_pvd_with_pressure(), oomph::RefineablePVDEquationsWithPressure< DIM >::further_build(), oomph::PVDEquationsWithPressure< DIM >::get_stress(), and oomph::PVDEquationsWithPressure< DIM >::incompressible().

template<unsigned DIM>
int oomph::PVDEquationsWithPressure< DIM >::Solid_pressure_not_stored_at_node = -100 [static, private]

Static "magic" number that indicates that the solid pressure is not stored at a node.

"Magic" number that indicates that the solid pressure is not stored at a node. It is a negative number that cannot be -1 because that is used to represent the positional hanging scheme in Hanging_pt objects

Definition at line 614 of file solid_elements.h.

Referenced by oomph::PVDEquationsWithPressure< DIM >::solid_p_nodal_index().


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 11:27:25 2009 by  doxygen 1.4.7