oomph::KirchhoffLoveShellEquations Class Reference

#include <shell_elements.h>

+ Inheritance diagram for oomph::KirchhoffLoveShellEquations:

Public Member Functions

 KirchhoffLoveShellEquations ()
 Constructor: Initialise physical parameter values to defaults. More...
 
virtual void load_vector (const unsigned &intpt, const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
 
void set_prestress_pt (const unsigned &i, const unsigned &j, double *value_pt)
 
double prestress (const unsigned &i, const unsigned &j)
 
void disable_membrane_terms ()
 Set to disable the calculation of membrane terms. More...
 
void enable_membrane_terms ()
 Set to renable the calculation of membrane terms (default) More...
 
const doublenu () const
 Return the Poisson's ratio. More...
 
const doubleh () const
 Return the wall thickness to undeformed radius ratio. More...
 
const doublelambda_sq () const
 Return the timescale ratio (non-dimensional density) More...
 
double *& nu_pt ()
 Return a pointer to the Poisson ratio. More...
 
double *& h_pt ()
 Return a pointer to the non-dim wall thickness. More...
 
double *& lambda_sq_pt ()
 Return a pointer to timescale ratio (nondim density) More...
 
GeomObject *& undeformed_midplane_pt ()
 
void get_normal (const Vector< double > &s, Vector< double > &N)
 Get normal vector. More...
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 Overload the standard fill in residuals contribution. More...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Return the jacobian is calculated by finite differences by default,. More...
 
void get_energy (double &pot_en, double &kin_en)
 Get potential (strain) and kinetic energy of the element. More...
 
std::pair< double, doubleget_strain_and_bend (const Vector< double > &s, DenseDoubleMatrix &strain, DenseDoubleMatrix &bend)
 Get strain and bending tensors. More...
 
double load_rate_of_work ()
 
void output (std::ostream &outfile)
 Generic FiniteElement output function. More...
 
void output (std::ostream &outfile, const unsigned &n_plot)
 Generic FiniteElement output function. More...
 
void output (FILE *file_pt)
 Generic FiniteElement output function. More...
 
void output (FILE *file_pt, const unsigned &n_plot)
 Generic FiniteElement output function. More...
 
- Public Member Functions inherited from oomph::SolidFiniteElement
void set_lagrangian_dimension (const unsigned &lagrangian_dimension)
 
virtual bool has_internal_solid_data ()
 
 SolidFiniteElement ()
 Constructor: Set defaults. More...
 
virtual ~SolidFiniteElement ()
 Destructor to clean up any allocated memory. More...
 
 SolidFiniteElement (const SolidFiniteElement &)=delete
 Broken copy constructor. More...
 
unsigned ngeom_data () const
 Broken assignment operator. More...
 
Datageom_data_pt (const unsigned &j)
 
void identify_geometric_data (std::set< Data * > &geometric_data_pt)
 
double zeta_nodal (const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual void get_x_and_xi (const Vector< double > &s, Vector< double > &x_fe, Vector< double > &x, Vector< double > &xi_fe, Vector< double > &xi) const
 
virtual void set_macro_elem_pt (MacroElement *macro_elem_pt)
 
virtual void set_macro_elem_pt (MacroElement *macro_elem_pt, MacroElement *undeformed_macro_elem_pt)
 
void set_undeformed_macro_elem_pt (MacroElement *undeformed_macro_elem_pt)
 
MacroElementundeformed_macro_elem_pt ()
 Access function to pointer to "undeformed" macro element. More...
 
double dshape_lagrangian (const Vector< double > &s, Shape &psi, DShape &dpsidxi) const
 
virtual double dshape_lagrangian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidxi) const
 
double d2shape_lagrangian (const Vector< double > &s, Shape &psi, DShape &dpsidxi, DShape &d2psidxi) const
 
virtual double d2shape_lagrangian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidxi, DShape &d2psidxi) const
 
unsigned lagrangian_dimension () const
 
unsigned nnodal_lagrangian_type () const
 
Nodeconstruct_node (const unsigned &n)
 Construct the local node n and return a pointer to it. More...
 
Nodeconstruct_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
Nodeconstruct_boundary_node (const unsigned &n)
 
Nodeconstruct_boundary_node (const unsigned &n, TimeStepper *const &time_stepper_pt)
 
virtual void assign_all_generic_local_eqn_numbers (const bool &store_local_dof_pt)
 
void describe_local_dofs (std::ostream &out, const std::string &current_string) const
 
double raw_lagrangian_position (const unsigned &n, const unsigned &i) const
 
double raw_lagrangian_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double lagrangian_position (const unsigned &n, const unsigned &i) const
 Return i-th Lagrangian coordinate at local node n. More...
 
double lagrangian_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual double interpolated_xi (const Vector< double > &s, const unsigned &i) const
 
virtual void interpolated_xi (const Vector< double > &s, Vector< double > &xi) const
 
virtual void interpolated_dxids (const Vector< double > &s, DenseMatrix< double > &dxids) const
 
virtual void J_lagrangian (const Vector< double > &s) const
 
virtual double J_lagrangian_at_knot (const unsigned &ipt) const
 
SolidInitialCondition *& solid_ic_pt ()
 Pointer to object that describes the initial condition. More...
 
void enable_solve_for_consistent_newmark_accel ()
 
void disable_solve_for_consistent_newmark_accel ()
 Set to reset the problem being solved to be the standard problem. More...
 
MultiplierFctPtmultiplier_fct_pt ()
 
MultiplierFctPt multiplier_fct_pt () const
 
virtual void get_residuals_for_solid_ic (Vector< double > &residuals)
 
void fill_in_residuals_for_solid_ic (Vector< double > &residuals)
 
void fill_in_jacobian_for_solid_ic (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_for_newmark_accel (DenseMatrix< double > &jacobian)
 
void compute_norm (double &el_norm)
 
int position_local_eqn (const unsigned &n, const unsigned &k, const unsigned &j) const
 
- Public Member Functions inherited from oomph::FiniteElement
void set_dimension (const unsigned &dim)
 
void set_nodal_dimension (const unsigned &nodal_dim)
 
void set_nnodal_position_type (const unsigned &nposition_type)
 Set the number of types required to interpolate the coordinate. More...
 
void set_n_node (const unsigned &n)
 
int nodal_local_eqn (const unsigned &n, const unsigned &i) const
 
double dJ_eulerian_at_knot (const unsigned &ipt, Shape &psi, DenseMatrix< double > &djacobian_dX) const
 
 FiniteElement ()
 Constructor. More...
 
virtual ~FiniteElement ()
 
 FiniteElement (const FiniteElement &)=delete
 Broken copy constructor. More...
 
virtual bool local_coord_is_valid (const Vector< double > &s)
 Broken assignment operator. More...
 
virtual void move_local_coord_back_into_element (Vector< double > &s) const
 
void get_centre_of_gravity_and_max_radius_in_terms_of_zeta (Vector< double > &cog, double &max_radius) const
 
virtual void local_coordinate_of_node (const unsigned &j, Vector< double > &s) const
 
virtual void local_fraction_of_node (const unsigned &j, Vector< double > &s_fraction)
 
virtual double local_one_d_fraction_of_node (const unsigned &n1d, const unsigned &i)
 
MacroElementmacro_elem_pt ()
 Access function to pointer to macro element. More...
 
void get_x (const Vector< double > &s, Vector< double > &x) const
 
void get_x (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void get_x_from_macro_element (const Vector< double > &s, Vector< double > &x) const
 
virtual void get_x_from_macro_element (const unsigned &t, const Vector< double > &s, Vector< double > &x)
 
virtual void set_integration_scheme (Integral *const &integral_pt)
 Set the spatial integration scheme. More...
 
Integral *const & integral_pt () const
 Return the pointer to the integration scheme (const version) More...
 
virtual void shape (const Vector< double > &s, Shape &psi) const =0
 
virtual void shape_at_knot (const unsigned &ipt, Shape &psi) const
 
virtual void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 
virtual void dshape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids) const
 
virtual void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual void d2shape_local_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsids, DShape &d2psids) const
 
virtual double J_eulerian (const Vector< double > &s) const
 
virtual double J_eulerian_at_knot (const unsigned &ipt) const
 
void check_J_eulerian_at_knots (bool &passed) const
 
void check_jacobian (const double &jacobian) const
 
double dshape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx) const
 
virtual double dshape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsi, DenseMatrix< double > &djacobian_dX, RankFourTensor< double > &d_dpsidx_dX) const
 
double d2shape_eulerian (const Vector< double > &s, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual double d2shape_eulerian_at_knot (const unsigned &ipt, Shape &psi, DShape &dpsidx, DShape &d2psidx) const
 
virtual void assign_nodal_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void describe_nodal_local_dofs (std::ostream &out, const std::string &current_string) const
 
Node *& node_pt (const unsigned &n)
 Return a pointer to the local node n. More...
 
Node *const & node_pt (const unsigned &n) const
 Return a pointer to the local node n (const version) More...
 
unsigned nnode () const
 Return the number of nodes. More...
 
virtual unsigned nnode_1d () const
 
double raw_nodal_position (const unsigned &n, const unsigned &i) const
 
double raw_nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &i) const
 
double raw_dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double raw_dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position (const unsigned &n, const unsigned &i) const
 
double nodal_position (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double dnodal_position_dt (const unsigned &n, const unsigned &i) const
 Return the i-th component of nodal velocity: dx/dt at local node n. More...
 
double dnodal_position_dt (const unsigned &n, const unsigned &j, const unsigned &i) const
 
double nodal_position_gen (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double nodal_position_gen (const unsigned &t, const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &n, const unsigned &k, const unsigned &i) const
 
double dnodal_position_gen_dt (const unsigned &j, const unsigned &n, const unsigned &k, const unsigned &i) const
 
virtual void get_dresidual_dnodal_coordinates (RankThreeTensor< double > &dresidual_dnodal_coordinates)
 
virtual void disable_ALE ()
 
virtual void enable_ALE ()
 
virtual unsigned required_nvalue (const unsigned &n) const
 
unsigned nnodal_position_type () const
 
bool has_hanging_nodes () const
 
unsigned nodal_dimension () const
 Return the required Eulerian dimension of the nodes in this element. More...
 
virtual unsigned nvertex_node () const
 
virtual Nodevertex_node_pt (const unsigned &j) const
 
int get_node_number (Node *const &node_pt) const
 
virtual Nodeget_node_at_local_coordinate (const Vector< double > &s) const
 
double raw_nodal_value (const unsigned &n, const unsigned &i) const
 
double raw_nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &n, const unsigned &i) const
 
double nodal_value (const unsigned &t, const unsigned &n, const unsigned &i) const
 
unsigned dim () const
 
virtual ElementGeometry::ElementGeometry element_geometry () const
 Return the geometry type of the element (either Q or T usually). More...
 
virtual double interpolated_x (const Vector< double > &s, const unsigned &i) const
 Return FE interpolated coordinate x[i] at local coordinate s. More...
 
virtual double interpolated_x (const unsigned &t, const Vector< double > &s, const unsigned &i) const
 
virtual void interpolated_x (const Vector< double > &s, Vector< double > &x) const
 Return FE interpolated position x[] at local coordinate s as Vector. More...
 
virtual void interpolated_x (const unsigned &t, const Vector< double > &s, Vector< double > &x) const
 
virtual double interpolated_dxdt (const Vector< double > &s, const unsigned &i, const unsigned &t)
 
virtual void interpolated_dxdt (const Vector< double > &s, const unsigned &t, Vector< double > &dxdt)
 
void position (const Vector< double > &zeta, Vector< double > &r) const
 
void position (const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
 
void dposition_dt (const Vector< double > &zeta, const unsigned &t, Vector< double > &drdt)
 
void interpolated_zeta (const Vector< double > &s, Vector< double > &zeta) const
 
void locate_zeta (const Vector< double > &zeta, GeomObject *&geom_object_pt, Vector< double > &s, const bool &use_coordinate_as_initial_guess=false)
 
virtual void node_update ()
 
virtual void identify_field_data_for_interactions (std::set< std::pair< Data *, unsigned >> &paired_field_data)
 
virtual double s_min () const
 Min value of local coordinate. More...
 
virtual double s_max () const
 Max. value of local coordinate. More...
 
double size () const
 
virtual double compute_physical_size () const
 
virtual void point_output_data (const Vector< double > &s, Vector< double > &data)
 
void point_output (std::ostream &outfile, const Vector< double > &s)
 
virtual unsigned nplot_points_paraview (const unsigned &nplot) const
 
virtual unsigned nsub_elements_paraview (const unsigned &nplot) const
 
void output_paraview (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_output_offset_information (std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
 
virtual void write_paraview_type (std::ofstream &file_out, const unsigned &nplot) const
 
virtual void write_paraview_offsets (std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
 
virtual unsigned nscalar_paraview () const
 
virtual void scalar_value_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
 
virtual void scalar_value_fct_paraview (std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
 
virtual std::string scalar_name_paraview (const unsigned &i) const
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
 Output an exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
 Output a time-dependent exact solution over the element. More...
 
virtual void output_fct (std::ostream &outfile, const unsigned &n_plot, const double &time, const SolutionFunctorBase &exact_soln) const
 Output a time-dependent exact solution over the element. More...
 
virtual void get_s_plot (const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
 
virtual std::string tecplot_zone_string (const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (std::ostream &outfile, const unsigned &nplot) const
 
virtual void write_tecplot_zone_footer (FILE *file_pt, const unsigned &nplot) const
 
virtual unsigned nplot_points (const unsigned &nplot) const
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 Calculate the norm of the error and that of the exact solution. More...
 
virtual void compute_error (FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_error (std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, Vector< double > &error, Vector< double > &norm)
 
virtual void compute_abs_error (std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error)
 
void integrate_fct (FiniteElement::SteadyExactSolutionFctPt integrand_fct_pt, Vector< double > &integral)
 Integrate Vector-valued function over element. More...
 
void integrate_fct (FiniteElement::UnsteadyExactSolutionFctPt integrand_fct_pt, const double &time, Vector< double > &integral)
 Integrate Vector-valued time-dep function over element. More...
 
virtual void build_face_element (const int &face_index, FaceElement *face_element_pt)
 
virtual unsigned self_test ()
 
virtual unsigned get_bulk_node_number (const int &face_index, const unsigned &i) const
 
virtual int face_outer_unit_normal_sign (const int &face_index) const
 Get the sign of the outer unit normal on the face given by face_index. More...
 
virtual unsigned nnode_on_face () const
 
void face_node_number_error_check (const unsigned &i) const
 Range check for face node numbers. More...
 
virtual CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt (const int &face_index) const
 
virtual BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt (const int &face_index) const
 
- Public Member Functions inherited from oomph::GeneralisedElement
 GeneralisedElement ()
 Constructor: Initialise all pointers and all values to zero. More...
 
virtual ~GeneralisedElement ()
 Virtual destructor to clean up any memory allocated by the object. More...
 
 GeneralisedElement (const GeneralisedElement &)=delete
 Broken copy constructor. More...
 
void operator= (const GeneralisedElement &)=delete
 Broken assignment operator. More...
 
Data *& internal_data_pt (const unsigned &i)
 Return a pointer to i-th internal data object. More...
 
Data *const & internal_data_pt (const unsigned &i) const
 Return a pointer to i-th internal data object (const version) More...
 
Data *& external_data_pt (const unsigned &i)
 Return a pointer to i-th external data object. More...
 
Data *const & external_data_pt (const unsigned &i) const
 Return a pointer to i-th external data object (const version) More...
 
unsigned long eqn_number (const unsigned &ieqn_local) const
 
int local_eqn_number (const unsigned long &ieqn_global) const
 
unsigned add_external_data (Data *const &data_pt, const bool &fd=true)
 
bool external_data_fd (const unsigned &i) const
 
void exclude_external_data_fd (const unsigned &i)
 
void include_external_data_fd (const unsigned &i)
 
void flush_external_data ()
 Flush all external data. More...
 
void flush_external_data (Data *const &data_pt)
 Flush the object addressed by data_pt from the external data array. More...
 
unsigned ninternal_data () const
 Return the number of internal data objects. More...
 
unsigned nexternal_data () const
 Return the number of external data objects. More...
 
unsigned ndof () const
 Return the number of equations/dofs in the element. More...
 
void dof_vector (const unsigned &t, Vector< double > &dof)
 Return the vector of dof values at time level t. More...
 
void dof_pt_vector (Vector< double * > &dof_pt)
 Return the vector of pointers to dof values. More...
 
void set_internal_data_time_stepper (const unsigned &i, TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
 
void assign_internal_eqn_numbers (unsigned long &global_number, Vector< double * > &Dof_pt)
 
void describe_dofs (std::ostream &out, const std::string &current_string) const
 
void add_internal_value_pt_to_map (std::map< unsigned, double * > &map_of_value_pt)
 
virtual void assign_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void complete_setup_of_dependencies ()
 
virtual void get_residuals (Vector< double > &residuals)
 
virtual void get_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
virtual void get_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void get_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void get_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void get_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void get_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void get_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void get_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void get_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 
virtual void compute_norm (Vector< double > &norm)
 
virtual unsigned ndof_types () const
 
virtual void get_dof_numbers_for_unknowns (std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
 
- Public Member Functions inherited from oomph::GeomObject
 GeomObject ()
 Default constructor. More...
 
 GeomObject (const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim, TimeStepper *time_stepper_pt)
 
 GeomObject (const GeomObject &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const GeomObject &)=delete
 Broken assignment operator. More...
 
virtual ~GeomObject ()
 (Empty) destructor More...
 
unsigned nlagrangian () const
 Access function to # of Lagrangian coordinates. More...
 
unsigned ndim () const
 Access function to # of Eulerian coordinates. More...
 
void set_nlagrangian_and_ndim (const unsigned &n_lagrangian, const unsigned &n_dim)
 Set # of Lagrangian and Eulerian coordinates. More...
 
TimeStepper *& time_stepper_pt ()
 
TimeSteppertime_stepper_pt () const
 
virtual void position (const double &t, const Vector< double > &zeta, Vector< double > &r) const
 
virtual void dposition (const Vector< double > &zeta, DenseMatrix< double > &drdzeta) const
 
virtual void d2position (const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void d2position (const Vector< double > &zeta, Vector< double > &r, DenseMatrix< double > &drdzeta, RankThreeTensor< double > &ddrdzeta) const
 

Public Attributes

void(*&)(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &loadload_vector_fct_pt ()
 Access to the load vector function pointer. More...
 

Protected Member Functions

double calculate_contravariant (double A[2][2], double Aup[2][2])
 Invert a DIM by DIM matrix. More...
 
void fill_in_contribution_to_residuals_shell (Vector< double > &residuals)
 Return the residuals for the equations of KL shell theory. More...
 
virtual void load_vector_for_rate_of_work_computation (const unsigned &intpt, const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
 
- Protected Member Functions inherited from oomph::SolidFiniteElement
void fill_in_generic_jacobian_for_solid_ic (Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
 
void set_nnodal_lagrangian_type (const unsigned &nlagrangian_type)
 
virtual double local_to_lagrangian_mapping (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
double local_to_lagrangian_mapping (const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_lagrangian_mapping_diagonal (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual void assign_solid_local_eqn_numbers (const bool &store_local_dof)
 Assign local equation numbers for the solid equations in the element. More...
 
void describe_solid_local_dofs (std::ostream &out, const std::string &current_string) const
 Classifies dofs locally for solid specific aspects. More...
 
virtual void fill_in_jacobian_from_solid_position_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_from_solid_position_by_fd (DenseMatrix< double > &jacobian)
 
virtual void update_before_solid_position_fd ()
 
virtual void reset_after_solid_position_fd ()
 
virtual void update_in_solid_position_fd (const unsigned &i)
 
virtual void reset_in_solid_position_fd (const unsigned &i)
 
- Protected Member Functions inherited from oomph::FiniteElement
virtual void assemble_local_to_eulerian_jacobian (const DShape &dpsids, DenseMatrix< double > &jacobian) const
 
virtual void assemble_local_to_eulerian_jacobian2 (const DShape &d2psids, DenseMatrix< double > &jacobian2) const
 
virtual void assemble_eulerian_base_vectors (const DShape &dpsids, DenseMatrix< double > &interpolated_G) const
 
template<unsigned DIM>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double invert_jacobian_mapping (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
double local_to_eulerian_mapping (const DShape &dpsids, DenseMatrix< double > &inverse_jacobian) const
 
virtual double local_to_eulerian_mapping_diagonal (const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
virtual void dJ_eulerian_dnodal_coordinates (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<unsigned DIM>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
virtual void d_dshape_eulerian_dnodal_coordinates (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<unsigned DIM>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
virtual void transform_derivatives (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
void transform_derivatives_diagonal (const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
 
virtual void transform_second_derivatives (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<unsigned DIM>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
virtual void fill_in_jacobian_from_nodal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
void fill_in_jacobian_from_nodal_by_fd (DenseMatrix< double > &jacobian)
 
virtual void update_before_nodal_fd ()
 
virtual void reset_after_nodal_fd ()
 
virtual void update_in_nodal_fd (const unsigned &i)
 
virtual void reset_in_nodal_fd (const unsigned &i)
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Zero-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 One-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 Two-d specialisation of function to calculate inverse of jacobian mapping. More...
 
template<>
double invert_jacobian (const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void dJ_eulerian_dnodal_coordinates_templated_helper (const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void d_dshape_eulerian_dnodal_coordinates_templated_helper (const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_template (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
template<>
void transform_second_derivatives_diagonal (const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
 
- Protected Member Functions inherited from oomph::GeneralisedElement
unsigned add_internal_data (Data *const &data_pt, const bool &fd=true)
 
bool internal_data_fd (const unsigned &i) const
 
void exclude_internal_data_fd (const unsigned &i)
 
void include_internal_data_fd (const unsigned &i)
 
void clear_global_eqn_numbers ()
 
void add_global_eqn_numbers (std::deque< unsigned long > const &global_eqn_numbers, std::deque< double * > const &global_dof_pt)
 
virtual void assign_internal_and_external_local_eqn_numbers (const bool &store_local_dof_pt)
 
virtual void assign_additional_local_eqn_numbers ()
 
int internal_local_eqn (const unsigned &i, const unsigned &j) const
 
int external_local_eqn (const unsigned &i, const unsigned &j)
 
void fill_in_jacobian_from_internal_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_internal_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
void fill_in_jacobian_from_external_by_fd (DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
 
virtual void update_before_internal_fd ()
 
virtual void reset_after_internal_fd ()
 
virtual void update_in_internal_fd (const unsigned &i)
 
virtual void reset_in_internal_fd (const unsigned &i)
 
virtual void update_before_external_fd ()
 
virtual void reset_after_external_fd ()
 
virtual void update_in_external_fd (const unsigned &i)
 
virtual void reset_in_external_fd (const unsigned &i)
 
virtual void fill_in_contribution_to_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_jacobian_and_mass_matrix (Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
 
virtual void fill_in_contribution_to_dresiduals_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam)
 
virtual void fill_in_contribution_to_djacobian_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
 
virtual void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter (double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
 
virtual void fill_in_contribution_to_hessian_vector_products (Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
 
virtual void fill_in_contribution_to_inner_products (Vector< std::pair< unsigned, unsigned >> const &history_index, Vector< double > &inner_product)
 
virtual void fill_in_contribution_to_inner_product_vectors (Vector< unsigned > const &history_index, Vector< Vector< double >> &inner_product_vector)
 

Static Protected Member Functions

static void Zero_traction_fct (const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
 Default load function (zero traction) More...
 

Protected Attributes

void(* Load_vector_fct_pt )(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
 
GeomObjectUndeformed_midplane_pt
 
- Protected Attributes inherited from oomph::SolidFiniteElement
MacroElementUndeformed_macro_elem_pt
 Pointer to the element's "undeformed" macro element (NULL by default) More...
 
SolidInitialConditionSolid_ic_pt
 Pointer to object that specifies the initial condition. More...
 
bool Solve_for_consistent_newmark_accel_flag
 
- Protected Attributes inherited from oomph::FiniteElement
MacroElementMacro_elem_pt
 Pointer to the element's macro element (NULL by default) More...
 
- Protected Attributes inherited from oomph::GeomObject
unsigned NLagrangian
 Number of Lagrangian (intrinsic) coordinates. More...
 
unsigned Ndim
 Number of Eulerian coordinates. More...
 
TimeStepperGeom_object_time_stepper_pt
 

Private Attributes

bool Ignore_membrane_terms
 Boolean flag to ignore membrane terms. More...
 
doubleNu_pt
 Pointer to Poisson's ratio. More...
 
doubleH_pt
 Pointer to dimensionless wall thickness. More...
 
doubleLambda_sq_pt
 Pointer to timescale ratio (non-dimensional density) More...
 
DenseMatrix< double * > Prestress_pt
 

Static Private Attributes

static double Default_nu_value = 0.49
 Static default value for the Poisson's ratio. More...
 
static double Default_lambda_sq_value = 1.0
 Static default value for the timescale ratio (1.0 for natural scaling) More...
 
static double Default_h_value = 0.05
 Static default value for the thickness ratio. More...
 
static double Zero_prestress = 0.0
 Static default for prestress (set to zero) More...
 

Additional Inherited Members

- Public Types inherited from oomph::SolidFiniteElement
typedef double(* MultiplierFctPt) (const Vector< double > &xi)
 
- Public Types inherited from oomph::FiniteElement
typedef void(* SteadyExactSolutionFctPt) (const Vector< double > &, Vector< double > &)
 
typedef void(* UnsteadyExactSolutionFctPt) (const double &, const Vector< double > &, Vector< double > &)
 
- Static Public Attributes inherited from oomph::FiniteElement
static double Tolerance_for_singular_jacobian = 1.0e-16
 Tolerance below which the jacobian is considered singular. More...
 
static bool Accept_negative_jacobian = false
 
static bool Suppress_output_while_checking_for_inverted_elements
 
- Static Public Attributes inherited from oomph::GeneralisedElement
static bool Suppress_warning_about_repeated_internal_data
 
static bool Suppress_warning_about_repeated_external_data = true
 
static double Default_fd_jacobian_step = 1.0e-8
 
- Static Protected Attributes inherited from oomph::FiniteElement
static const unsigned Default_Initial_Nvalue = 0
 Default value for the number of values at a node. More...
 
static const double Node_location_tolerance = 1.0e-14
 
static const unsigned N2deriv [] = {0, 1, 3, 6}
 
- Static Protected Attributes inherited from oomph::GeneralisedElement
static DenseMatrix< doubleDummy_matrix
 
static std::deque< double * > Dof_pt_deque
 

Detailed Description

A class for elements that solves the equations of Kirchhoff Love shell thin-shell theory

Constructor & Destructor Documentation

◆ KirchhoffLoveShellEquations()

oomph::KirchhoffLoveShellEquations::KirchhoffLoveShellEquations ( )
inline

Constructor: Initialise physical parameter values to defaults.

137  {
138  // Set the default values of physical parameters
142 
143  // Don't ignore membrane terms
144  Ignore_membrane_terms = false;
145 
146  // Default load is zero traction
148 
149  // Default prestress is zero
150  Prestress_pt.resize(2, 2);
151  Prestress_pt(0, 0) = &Zero_prestress;
152  Prestress_pt(1, 0) = &Zero_prestress;
153  Prestress_pt(0, 1) = &Zero_prestress;
154  Prestress_pt(1, 1) = &Zero_prestress;
155  }
void resize(const unsigned long &n)
Definition: matrices.h:498
static void Zero_traction_fct(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
Default load function (zero traction)
Definition: shell_elements.cc:50
bool Ignore_membrane_terms
Boolean flag to ignore membrane terms.
Definition: shell_elements.h:61
double * H_pt
Pointer to dimensionless wall thickness.
Definition: shell_elements.h:67
static double Default_lambda_sq_value
Static default value for the timescale ratio (1.0 for natural scaling)
Definition: shell_elements.h:55
DenseMatrix< double * > Prestress_pt
Definition: shell_elements.h:74
double * Lambda_sq_pt
Pointer to timescale ratio (non-dimensional density)
Definition: shell_elements.h:70
static double Zero_prestress
Static default for prestress (set to zero)
Definition: shell_elements.h:77
double * Nu_pt
Pointer to Poisson's ratio.
Definition: shell_elements.h:64
static double Default_h_value
Static default value for the thickness ratio.
Definition: shell_elements.h:58
void(* Load_vector_fct_pt)(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
Definition: shell_elements.h:94
static double Default_nu_value
Static default value for the Poisson's ratio.
Definition: shell_elements.h:52
GeomObject * Undeformed_midplane_pt
Definition: shell_elements.h:102

References Default_h_value, Default_lambda_sq_value, Default_nu_value, H_pt, Ignore_membrane_terms, Lambda_sq_pt, Load_vector_fct_pt, Nu_pt, Prestress_pt, oomph::DenseMatrix< T >::resize(), Zero_prestress, and Zero_traction_fct().

Member Function Documentation

◆ calculate_contravariant()

double oomph::KirchhoffLoveShellEquations::calculate_contravariant ( double  A[2][2],
double  Aup[2][2] 
)
inlineprotected

Invert a DIM by DIM matrix.

Matrix inversion for 2 dimensions.

323  {
324  // Calculate determinant
325  double det = A[0][0] * A[1][1] - A[0][1] * A[1][0];
326 
327  // Calculate entries of the inverse
328  Aup[0][0] = A[1][1] / det;
329  Aup[0][1] = -A[0][1] / det;
330  Aup[1][0] = -A[1][0] / det;
331  Aup[1][1] = A[0][0] / det;
332 
333  // Return determinant
334  return (det);
335  }
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47

Referenced by fill_in_contribution_to_residuals_shell(), get_energy(), and get_strain_and_bend().

◆ disable_membrane_terms()

void oomph::KirchhoffLoveShellEquations::disable_membrane_terms ( )
inline

Set to disable the calculation of membrane terms.

202  {
203  Ignore_membrane_terms = true;
204  }

References Ignore_membrane_terms.

◆ enable_membrane_terms()

void oomph::KirchhoffLoveShellEquations::enable_membrane_terms ( )
inline

Set to renable the calculation of membrane terms (default)

208  {
209  Ignore_membrane_terms = false;
210  }

References Ignore_membrane_terms.

◆ fill_in_contribution_to_jacobian()

void oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_jacobian ( Vector< double > &  residuals,
DenseMatrix< double > &  jacobian 
)
virtual

Return the jacobian is calculated by finite differences by default,.

Reimplemented from oomph::SolidFiniteElement.

Reimplemented in oomph::FSIDiagHermiteShellElement.

746  {
747  // Call the element's residuals vector
749 
750  // Solve for the consistent acceleration in Newmark scheme?
752  {
754  return;
755  }
756 
757  // Allocate storage for the full residuals of the element
758  unsigned n_dof = ndof();
759  Vector<double> full_residuals(n_dof);
760 
761  // Call the full residuals
762  get_residuals(full_residuals);
763 
764  // Get the solid entries in the jacobian using finite differences
766  full_residuals, jacobian);
767 
768  // Get the entries from the external data, usually load terms
770  jacobian);
771  }
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
virtual void get_residuals(Vector< double > &residuals)
Definition: elements.h:980
void fill_in_jacobian_from_external_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1199
void fill_in_contribution_to_residuals_shell(Vector< double > &residuals)
Return the residuals for the equations of KL shell theory.
Definition: shell_elements.cc:357
bool Solve_for_consistent_newmark_accel_flag
Definition: elements.h:4302
virtual void fill_in_jacobian_from_solid_position_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.cc:6985
void fill_in_jacobian_for_newmark_accel(DenseMatrix< double > &jacobian)
Definition: elements.cc:7227

References fill_in_contribution_to_residuals_shell(), oomph::SolidFiniteElement::fill_in_jacobian_for_newmark_accel(), oomph::GeneralisedElement::fill_in_jacobian_from_external_by_fd(), oomph::SolidFiniteElement::fill_in_jacobian_from_solid_position_by_fd(), oomph::GeneralisedElement::get_residuals(), oomph::GeneralisedElement::ndof(), and oomph::SolidFiniteElement::Solve_for_consistent_newmark_accel_flag.

Referenced by oomph::FSIDiagHermiteShellElement::fill_in_contribution_to_jacobian().

◆ fill_in_contribution_to_residuals()

void oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_residuals ( Vector< double > &  residuals)
inlinevirtual

Overload the standard fill in residuals contribution.

Reimplemented from oomph::GeneralisedElement.

260  {
261  // Simply call the shell residuals
263  }

References fill_in_contribution_to_residuals_shell().

◆ fill_in_contribution_to_residuals_shell()

void oomph::KirchhoffLoveShellEquations::fill_in_contribution_to_residuals_shell ( Vector< double > &  residuals)
protected

Return the residuals for the equations of KL shell theory.

Helper function to Return the residuals for the equations of KL shell theory. This is used to prevent a call of fill_in_contribution_to_residuals in the function fill_in_contribution_to_jacobian that can lead to virtual inheritance woes if this element is ever used as part of a multi-physics element.

359  {
360  // Set the dimension of the coordinates
361  const unsigned n_dim = 3;
362 
363  // Set the number of lagrangian coordinates
364  const unsigned n_lagrangian = 2;
365 
366  // Find out how many nodes there are
367  const unsigned n_node = nnode();
368 
369  // Find out how many positional dofs there are
370  const unsigned n_position_type = nnodal_position_type();
371 
372  // Set up memory for the shape functions
373  Shape psi(n_node, n_position_type);
374  DShape dpsidxi(n_node, n_position_type, n_lagrangian);
375 
376  // Could/Should we make this more general?
377  DShape d2psidxi(n_node, n_position_type, 3);
378 
379  // Set the value of n_intpt
380  const unsigned n_intpt = integral_pt()->nweight();
381 
382  // Get Physical Variables from Element
383  // External pressure, Poisson ratio , and non-dim thickness h
384  const double nu_cached = nu();
385  const double h_cached = h();
386  const double lambda_sq_cached = lambda_sq();
387 
388  // Integers used to store the local equation numbers
389  int local_eqn = 0;
390 
391  const double bending_scale = (1.0 / 12.0) * h_cached * h_cached;
392 
393  // Loop over the integration points
394  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
395  {
396  // Get the integral weight
397  double w = integral_pt()->weight(ipt);
398 
399  // Call the derivatives of the shape functions:
400  // d2psidxi(i,0) = \f$ \partial^2 \psi_j / \partial^2 \xi_0^2 \f$
401  // d2psidxi(i,1) = \f$ \partial^2 \psi_j / \partial^2 \xi_1^2 \f$
402  // d2psidxi(i,2) = \f$ \partial^2 \psi_j/\partial \xi_0 \partial \xi_1 \f$
403  double J = d2shape_lagrangian_at_knot(ipt, psi, dpsidxi, d2psidxi);
404 
405  // Premultiply the weights and the Jacobian
406  double W = w * J;
407 
408  // Calculate local values of lagrangian position and
409  // the derivative of global position wrt lagrangian coordinates
410  Vector<double> interpolated_xi(2, 0.0), interpolated_x(3, 0.0);
411  Vector<double> accel(3, 0.0);
412  DenseMatrix<double> interpolated_A(2, 3);
413  DenseMatrix<double> interpolated_dAdxi(3);
414 
415  // Initialise to zero
416  for (unsigned i = 0; i < n_dim; i++)
417  {
418  for (unsigned j = 0; j < n_lagrangian; j++)
419  {
420  interpolated_A(j, i) = 0.0;
421  }
422  for (unsigned j = 0; j < 3; j++)
423  {
424  interpolated_dAdxi(i, j) = 0.0;
425  }
426  }
427 
428  // Calculate displacements and derivatives
429  for (unsigned l = 0; l < n_node; l++)
430  {
431  // Loop over positional dofs
432  for (unsigned k = 0; k < n_position_type; k++)
433  {
434  // Loop over lagrangian coordinate directions
435  for (unsigned i = 0; i < n_lagrangian; i++)
436  {
437  interpolated_xi[i] +=
438  raw_lagrangian_position_gen(l, k, i) * psi(l, k);
439  }
440 
441  // Loop over displacement components (deformed position)
442  for (unsigned i = 0; i < n_dim; i++)
443  {
444  double x_value = raw_nodal_position_gen(l, k, i);
445 
446  // Calculate interpolated (deformed) position
447  interpolated_x[i] += x_value * psi(l, k);
448 
449  // Calculate the acceleration
450  accel[i] += raw_dnodal_position_gen_dt(2, l, k, i) * psi(l, k);
451 
452  // Loop over derivative directions
453  for (unsigned j = 0; j < n_lagrangian; j++)
454  {
455  interpolated_A(j, i) += x_value * dpsidxi(l, k, j);
456  }
457  // Loop over the second derivative directions
458  for (unsigned j = 0; j < 3; j++)
459  {
460  interpolated_dAdxi(j, i) += x_value * d2psidxi(l, k, j);
461  }
462  }
463  }
464  }
465 
466  // Get the values of the undeformed parameters
467  Vector<double> interpolated_R(3);
468  DenseMatrix<double> interpolated_a(2, 3);
469  RankThreeTensor<double> dadxi(2, 2, 3);
470 
471  // Read out the undeformed position from the geometric object
473  interpolated_xi, interpolated_R, interpolated_a, dadxi);
474 
475  // Copy the values of the second derivatives into a slightly
476  // different data structure, where the mixed derivatives [0][1] and [1][0]
477  // are given by the single index [2]
478  DenseMatrix<double> interpolated_dadxi(3);
479  for (unsigned i = 0; i < 3; i++)
480  {
481  interpolated_dadxi(0, i) = dadxi(0, 0, i);
482  interpolated_dadxi(1, i) = dadxi(1, 1, i);
483  interpolated_dadxi(2, i) = dadxi(0, 1, i);
484  }
485 
486  // Declare and calculate the undeformed and deformed metric tensor,
487  // the strain tensor
488  double a[2][2], A[2][2], aup[2][2], Aup[2][2], gamma[2][2];
489 
490  // Assign values of A and gamma
491  for (unsigned al = 0; al < 2; al++)
492  {
493  for (unsigned be = 0; be < 2; be++)
494  {
495  // Initialise a(al,be) and A(al,be) to zero
496  a[al][be] = 0.0;
497  A[al][be] = 0.0;
498  // Now calculate the dot product
499  for (unsigned k = 0; k < 3; k++)
500  {
501  a[al][be] += interpolated_a(al, k) * interpolated_a(be, k);
502  A[al][be] += interpolated_A(al, k) * interpolated_A(be, k);
503  }
504  // Calculate strain tensor
505  gamma[al][be] = 0.5 * (A[al][be] - a[al][be]);
506  }
507  }
508 
509  // Calculate the contravariant metric tensor
510  double adet = calculate_contravariant(a, aup);
511  double Adet = calculate_contravariant(A, Aup);
512 
513  // Square roots are expensive, so let's do them once here
514  double sqrt_adet = sqrt(adet);
515  double sqrt_Adet = sqrt(Adet);
516 
517  // Calculate the normal Vectors
518  Vector<double> n(3), N(3);
519  n[0] = (interpolated_a(0, 1) * interpolated_a(1, 2) -
520  interpolated_a(0, 2) * interpolated_a(1, 1)) /
521  sqrt_adet;
522  n[1] = (interpolated_a(0, 2) * interpolated_a(1, 0) -
523  interpolated_a(0, 0) * interpolated_a(1, 2)) /
524  sqrt_adet;
525  n[2] = (interpolated_a(0, 0) * interpolated_a(1, 1) -
526  interpolated_a(0, 1) * interpolated_a(1, 0)) /
527  sqrt_adet;
528  N[0] = (interpolated_A(0, 1) * interpolated_A(1, 2) -
529  interpolated_A(0, 2) * interpolated_A(1, 1)) /
530  sqrt_Adet;
531  N[1] = (interpolated_A(0, 2) * interpolated_A(1, 0) -
532  interpolated_A(0, 0) * interpolated_A(1, 2)) /
533  sqrt_Adet;
534  N[2] = (interpolated_A(0, 0) * interpolated_A(1, 1) -
535  interpolated_A(0, 1) * interpolated_A(1, 0)) /
536  sqrt_Adet;
537 
538 
539  // Calculate the curvature tensors
540  double b[2][2], B[2][2];
541 
542  b[0][0] = n[0] * interpolated_dadxi(0, 0) +
543  n[1] * interpolated_dadxi(0, 1) +
544  n[2] * interpolated_dadxi(0, 2);
545 
546  // Off-diagonal terms are the same
547  b[0][1] = b[1][0] = n[0] * interpolated_dadxi(2, 0) +
548  n[1] * interpolated_dadxi(2, 1) +
549  n[2] * interpolated_dadxi(2, 2);
550 
551  b[1][1] = n[0] * interpolated_dadxi(1, 0) +
552  n[1] * interpolated_dadxi(1, 1) +
553  n[2] * interpolated_dadxi(1, 2);
554 
555  // Deformed curvature tensor
556  B[0][0] = N[0] * interpolated_dAdxi(0, 0) +
557  N[1] * interpolated_dAdxi(0, 1) +
558  N[2] * interpolated_dAdxi(0, 2);
559 
560  // Off-diagonal terms are the same
561  B[0][1] = B[1][0] = N[0] * interpolated_dAdxi(2, 0) +
562  N[1] * interpolated_dAdxi(2, 1) +
563  N[2] * interpolated_dAdxi(2, 2);
564 
565  B[1][1] = N[0] * interpolated_dAdxi(1, 0) +
566  N[1] * interpolated_dAdxi(1, 1) +
567  N[2] * interpolated_dAdxi(1, 2);
568 
569  // Set up the change of curvature tensor
570  double kappa[2][2];
571 
572  for (unsigned i = 0; i < 2; i++)
573  {
574  for (unsigned j = 0; j < 2; j++)
575  {
576  kappa[i][j] = b[i][j] - B[i][j];
577  }
578  }
579 
580  // Calculate the plane stress stiffness tensor
581  double Et[2][2][2][2];
582 
583  // Premultiply some constants
584  // NOTE C2 has 1.0-Nu in the denominator
585  // double C1 = 1.0/(2.0*(1.0+nu_cached)), C2
586  // = 2.0*nu_cached/(1.0-nu_cached);
587 
588  // Some constants
589  double C1 = 0.5 * (1.0 - nu_cached);
590  double C2 = nu_cached;
591 
592  // Loop over first index
593  for (unsigned i = 0; i < 2; i++)
594  {
595  for (unsigned j = 0; j < 2; j++)
596  {
597  for (unsigned k = 0; k < 2; k++)
598  {
599  for (unsigned l = 0; l < 2; l++)
600  {
601  // Et[i][j][k][l] = C1*(aup[i][k]*aup[j][l] + aup[i][l]*aup[j][k]
602  // + C2*aup[i][j]*aup[k][l]);
603  Et[i][j][k][l] =
604  C1 * (aup[i][k] * aup[j][l] + aup[i][l] * aup[j][k]) +
605  C2 * aup[i][j] * aup[k][l];
606  }
607  }
608  }
609  }
610 
611  // Define the load Vector
612  Vector<double> f(3);
613  // Determine the load
615 
616  // Scale the load by the bending stiffness scale
617  // for(unsigned i=0;i<3;i++){f[i] *=
618  // bending_scale/(1.0-nu_cached*nu_cached);}
619 
620  // Allocate storage for variations of the the normal vector
621  double normal_var[3][3];
622 
623  //=====EQUATIONS OF ELASTICITY FROM PRINCIPLE OF VIRTUAL
624  // DISPLACEMENTS========
625 
626  // Little tensor to handle the mixed derivative terms
627  unsigned mix[2][2] = {{0, 2}, {2, 1}};
628 
629  // Loop over the number of nodes
630  for (unsigned l = 0; l < n_node; l++)
631  {
632  // Loop over the type of degree of freedom
633  for (unsigned k = 0; k < n_position_type; k++)
634  {
635  // Setup components of variations in the normal vector
636  normal_var[0][0] = 0.0;
637  normal_var[0][1] = (-interpolated_A(1, 2) * dpsidxi(l, k, 0) +
638  interpolated_A(0, 2) * dpsidxi(l, k, 1)) /
639  sqrt_Adet;
640  normal_var[0][2] = (interpolated_A(1, 1) * dpsidxi(l, k, 0) -
641  interpolated_A(0, 1) * dpsidxi(l, k, 1)) /
642  sqrt_Adet;
643 
644  normal_var[1][0] = (interpolated_A(1, 2) * dpsidxi(l, k, 0) -
645  interpolated_A(0, 2) * dpsidxi(l, k, 1)) /
646  sqrt_Adet;
647  normal_var[1][1] = 0.0;
648  normal_var[1][2] = (-interpolated_A(1, 0) * dpsidxi(l, k, 0) +
649  interpolated_A(0, 0) * dpsidxi(l, k, 1)) /
650  sqrt_Adet;
651 
652  normal_var[2][0] = (-interpolated_A(1, 1) * dpsidxi(l, k, 0) +
653  interpolated_A(0, 1) * dpsidxi(l, k, 1)) /
654  sqrt_Adet;
655  normal_var[2][1] = (interpolated_A(1, 0) * dpsidxi(l, k, 0) -
656  interpolated_A(0, 0) * dpsidxi(l, k, 1)) /
657  sqrt_Adet;
658  normal_var[2][2] = 0.0;
659 
660  // Loop over the coordinate direction
661  for (unsigned i = 0; i < 3; i++)
662  {
663  // Get the local equation number
664  local_eqn = position_local_eqn(l, k, i);
665 
666  // If it's not a boundary condition
667  if (local_eqn >= 0)
668  {
669  // Temporary to hold a common part of the bending terms
670  double bending_dot_product_multiplier =
671  ((A[1][1] * interpolated_A(0, i) -
672  A[1][0] * interpolated_A(1, i)) *
673  dpsidxi(l, k, 0) +
674  (A[0][0] * interpolated_A(1, i) -
675  A[0][1] * interpolated_A(0, i)) *
676  dpsidxi(l, k, 1)) /
677  Adet;
678 
679  // Combine the cross and dot product bending terms
680  for (unsigned i2 = 0; i2 < 3; i2++)
681  {
682  normal_var[i][i2] -= N[i2] * bending_dot_product_multiplier;
683  }
684 
685  // Add in external forcing
686  residuals[local_eqn] -=
687  f[i] / h_cached * psi(l, k) * W * sqrt_Adet;
688 
689  // Storage for all residual terms that are multipled by the
690  // Jacobian and area of the undeformed shell
691  // Start with the acceleration term
692  double other_residual_terms =
693  lambda_sq_cached * accel[i] * psi(l, k);
694 
695  // Now need the loops over the Greek indicies
696  for (unsigned al = 0; al < 2; al++)
697  {
698  for (unsigned be = 0; be < 2; be++)
699  {
700  // Membrane prestress
701  other_residual_terms += *Prestress_pt(al, be) *
702  interpolated_A(al, i) *
703  dpsidxi(l, k, be);
704 
705  // Remaining terms
706  for (unsigned ga = 0; ga < 2; ga++)
707  {
708  for (unsigned de = 0; de < 2; de++)
709  {
711  {
712  // Pure membrane term
713  other_residual_terms +=
714  Et[al][be][ga][de] * gamma[al][be] *
715  interpolated_A(ga, i) * dpsidxi(l, k, de);
716  }
717 
718  // Bending terms
719  other_residual_terms -=
720  bending_scale * Et[al][be][ga][de] * kappa[al][be] *
721  (N[i] * d2psidxi(l, k, mix[ga][de])
722  // Cross and dot product terms
723  +
724  normal_var[i][0] * interpolated_dAdxi(mix[ga][de], 0) +
725  normal_var[i][1] * interpolated_dAdxi(mix[ga][de], 1) +
726  normal_var[i][2] * interpolated_dAdxi(mix[ga][de], 2));
727  }
728  }
729  }
730  }
731 
732  residuals[local_eqn] += other_residual_terms * W * sqrt_adet;
733  }
734  }
735  }
736  }
737 
738  } // End of loop over the integration points
739  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Scalar * b
Definition: benchVecAdd.cpp:17
unsigned nnodal_position_type() const
Definition: elements.h:2463
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
double raw_dnodal_position_gen_dt(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:2294
double raw_nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:2272
virtual void d2position(const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
Definition: geom_objects.h:341
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
const double & nu() const
Return the Poisson's ratio.
Definition: shell_elements.h:213
double calculate_contravariant(double A[2][2], double Aup[2][2])
Invert a DIM by DIM matrix.
Definition: shell_elements.h:321
const double & lambda_sq() const
Return the timescale ratio (non-dimensional density)
Definition: shell_elements.h:225
virtual void load_vector(const unsigned &intpt, const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
Definition: shell_elements.h:172
const double & h() const
Return the wall thickness to undeformed radius ratio.
Definition: shell_elements.h:219
Definition: matrices.h:74
double raw_lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:3897
virtual double d2shape_lagrangian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidxi, DShape &d2psidxi) const
Definition: elements.cc:6832
int position_local_eqn(const unsigned &n, const unsigned &k, const unsigned &j) const
Definition: elements.h:4137
virtual double interpolated_xi(const Vector< double > &s, const unsigned &i) const
Definition: elements.cc:7104
@ N
Definition: constructor.cpp:22
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
const Scalar * a
Definition: level2_cplx_impl.h:32
char char char int int * k
Definition: level2_impl.h:374
double C1
"Mooney Rivlin" coefficient for generalised Mooney Rivlin law
Definition: TwenteMeshGluing.cpp:74
double C2
"Mooney Rivlin" coefficient for generalised Mooney Rivlin law
Definition: mpi/distribution/airy_cantilever/airy_cantilever2.cc:156
Mdouble gamma(Mdouble gamma_in)
This is the gamma function returns the true value for the half integer value.
Definition: ExtendedMath.cc:116
@ W
Definition: quadtree.h:63
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References a, b, Global_Physical_Variables::C1, Global_Physical_Variables::C2, calculate_contravariant(), oomph::GeomObject::d2position(), oomph::SolidFiniteElement::d2shape_lagrangian_at_knot(), f(), mathsFunc::gamma(), h(), i, Ignore_membrane_terms, oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), oomph::SolidFiniteElement::interpolated_xi(), J, j, k, lambda_sq(), load_vector(), n, N, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), nu(), oomph::Integral::nweight(), oomph::SolidFiniteElement::position_local_eqn(), Prestress_pt, oomph::FiniteElement::raw_dnodal_position_gen_dt(), oomph::SolidFiniteElement::raw_lagrangian_position_gen(), oomph::FiniteElement::raw_nodal_position_gen(), sqrt(), Undeformed_midplane_pt, w, oomph::QuadTreeNames::W, and oomph::Integral::weight().

Referenced by fill_in_contribution_to_jacobian(), and fill_in_contribution_to_residuals().

◆ get_energy()

void oomph::KirchhoffLoveShellEquations::get_energy ( double pot_en,
double kin_en 
)

Get potential (strain) and kinetic energy of the element.

Compute the potential (strain) and kinetic energy of the element.

778  {
779  // Initialise
780  pot_en = 0.0;
781  kin_en = 0.0;
782 
783  // Set the dimension of the coordinates
784  const unsigned n_dim = Undeformed_midplane_pt->ndim();
785 
786  // Set the number of lagrangian coordinates
787  const unsigned n_lagrangian = Undeformed_midplane_pt->nlagrangian();
788 
789  // Find out how many nodes there are
790  const unsigned n_node = nnode();
791 
792  // Find out how many positional dofs there are
793  const unsigned n_position_type = nnodal_position_type();
794 
795  // Set up memory for the shape functions
796  Shape psi(n_node, n_position_type);
797  DShape dpsidxi(n_node, n_position_type, n_lagrangian);
798  DShape d2psidxi(n_node, n_position_type, 3);
799 
800  // Set the value of n_intpt
801  const unsigned n_intpt = integral_pt()->nweight();
802 
803  // Get Physical Variables from Element
804  // External pressure, Poisson ratio , and non-dim thickness h
805  const double nu_cached = nu();
806  const double h_cached = h();
807  const double lambda_sq_cached = lambda_sq();
808 
809 #ifdef PARANOID
810  // Check for non-zero prestress
811  if ((prestress(0, 0) != 0) || (prestress(1, 0) != 0) ||
812  (prestress(1, 1) != 0))
813  {
814  std::string error_message =
815  "Warning: Not sure if the energy is computed correctly\n";
816  error_message += " for nonzero prestress\n";
817 
818  oomph_info << error_message << std::endl;
819 
820  // throw OomphLibWarning(error_message,
821  // "KirchhoffLoveShellEquations::get_energy()",
822  // OOMPH_EXCEPTION_LOCATION);
823  }
824 #endif
825 
826  // Setup storage for various quantities
827  Vector<double> veloc(n_dim);
828  Vector<double> interpolated_xi(n_lagrangian);
829  DenseMatrix<double> interpolated_A(n_lagrangian, n_dim);
830  DenseMatrix<double> interpolated_dAdxi(3);
831 
832  const double bending_scale = (1.0 / 12.0) * h_cached * h_cached;
833 
834  // Loop over the integration points
835  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
836  {
837  // Get the integral weight
838  double w = integral_pt()->weight(ipt);
839 
840  // Call the derivatives of the shape functions:
841  double J = d2shape_lagrangian_at_knot(ipt, psi, dpsidxi, d2psidxi);
842 
843  // Premultiply the weights and the Jacobian
844  double W = w * J;
845 
846  // Initialise values to zero
847  for (unsigned i = 0; i < n_dim; i++)
848  {
849  veloc[i] = 0.0;
850  for (unsigned j = 0; j < n_lagrangian; j++)
851  {
852  interpolated_A(j, i) = 0.0;
853  }
854  for (unsigned j = 0; j < 3; j++)
855  {
856  interpolated_dAdxi(i, j) = 0.0;
857  }
858  }
859  for (unsigned j = 0; j < n_lagrangian; j++)
860  {
861  interpolated_xi[j] = 0.0;
862  }
863 
864  // Calculate velocity and derivatives
865  for (unsigned l = 0; l < n_node; l++)
866  {
867  // Loop over positional dofs
868  for (unsigned k = 0; k < n_position_type; k++)
869  {
870  // Loop over lagrangian coordinate directions
871  for (unsigned i = 0; i < n_lagrangian; i++)
872  {
873  interpolated_xi[i] += lagrangian_position_gen(l, k, i) * psi(l, k);
874  }
875 
876  // Loop over displacement components
877  for (unsigned i = 0; i < n_dim; i++)
878  {
879  veloc[i] += dnodal_position_gen_dt(1, l, k, i) * psi(l, k);
880 
881  double x_value = nodal_position_gen(l, k, i);
882 
883  // Loop over derivative directions
884  for (unsigned j = 0; j < n_lagrangian; j++)
885  {
886  interpolated_A(j, i) += x_value * dpsidxi(l, k, j);
887  }
888  // Loop over the second derivative directions
889  for (unsigned j = 0; j < 3; j++)
890  {
891  interpolated_dAdxi(j, i) += x_value * d2psidxi(l, k, j);
892  }
893  }
894  }
895  }
896 
897  // Get square of veloc
898  double veloc_sq = 0;
899  for (unsigned i = 0; i < n_dim; i++)
900  {
901  veloc_sq += veloc[i] * veloc[i];
902  }
903 
904  // Get the values of the undeformed parameters
905  Vector<double> interpolated_r(n_dim);
906  DenseMatrix<double> interpolated_a(n_lagrangian, n_dim);
907  RankThreeTensor<double> dadxi(n_lagrangian, n_lagrangian, n_dim);
908 
909  // Read out the undeformed position from the geometric object
911  interpolated_xi, interpolated_r, interpolated_a, dadxi);
912 
913  // Copy the values of the second derivatives into a slightly
914  // different data structure, where the mixed derivatives [0][1] and [1][0]
915  // are given by the single index [2]
916  DenseMatrix<double> interpolated_dadxi(3);
917  for (unsigned i = 0; i < 3; i++)
918  {
919  interpolated_dadxi(0, i) = dadxi(0, 0, i);
920  interpolated_dadxi(1, i) = dadxi(1, 1, i);
921  interpolated_dadxi(2, i) = dadxi(0, 1, i);
922  }
923 
924  // Declare and calculate the undeformed and deformed metric tensor,
925  // the strain tensor
926  double a[2][2], A[2][2], aup[2][2], Aup[2][2], gamma[2][2];
927 
928  // Assign values of A and gamma
929  for (unsigned al = 0; al < 2; al++)
930  {
931  for (unsigned be = 0; be < 2; be++)
932  {
933  // Initialise a(al,be) and A(al,be) to zero
934  a[al][be] = 0.0;
935  A[al][be] = 0.0;
936  // Now calculate the dot product
937  for (unsigned k = 0; k < n_dim; k++)
938  {
939  a[al][be] += interpolated_a(al, k) * interpolated_a(be, k);
940  A[al][be] += interpolated_A(al, k) * interpolated_A(be, k);
941  }
942  // Calculate strain tensor
943  gamma[al][be] = 0.5 * (A[al][be] - a[al][be]);
944  }
945  }
946 
947  // Calculate the contravariant metric tensor
948  double adet = calculate_contravariant(a, aup);
949  double Adet = calculate_contravariant(A, Aup);
950 
951  // Square roots are expensive, so let's do them once here
952  double sqrt_adet = sqrt(adet);
953  double sqrt_Adet = sqrt(Adet);
954 
955  // Calculate the normal Vectors
956  Vector<double> n(3), N(3);
957  n[0] = (interpolated_a(0, 1) * interpolated_a(1, 2) -
958  interpolated_a(0, 2) * interpolated_a(1, 1)) /
959  sqrt_adet;
960  n[1] = (interpolated_a(0, 2) * interpolated_a(1, 0) -
961  interpolated_a(0, 0) * interpolated_a(1, 2)) /
962  sqrt_adet;
963  n[2] = (interpolated_a(0, 0) * interpolated_a(1, 1) -
964  interpolated_a(0, 1) * interpolated_a(1, 0)) /
965  sqrt_adet;
966  N[0] = (interpolated_A(0, 1) * interpolated_A(1, 2) -
967  interpolated_A(0, 2) * interpolated_A(1, 1)) /
968  sqrt_Adet;
969  N[1] = (interpolated_A(0, 2) * interpolated_A(1, 0) -
970  interpolated_A(0, 0) * interpolated_A(1, 2)) /
971  sqrt_Adet;
972  N[2] = (interpolated_A(0, 0) * interpolated_A(1, 1) -
973  interpolated_A(0, 1) * interpolated_A(1, 0)) /
974  sqrt_Adet;
975 
976 
977  // Calculate the curvature tensors
978  double b[2][2], B[2][2];
979 
980  b[0][0] = n[0] * interpolated_dadxi(0, 0) +
981  n[1] * interpolated_dadxi(0, 1) +
982  n[2] * interpolated_dadxi(0, 2);
983 
984  // Off-diagonal terms are the same
985  b[0][1] = b[1][0] = n[0] * interpolated_dadxi(2, 0) +
986  n[1] * interpolated_dadxi(2, 1) +
987  n[2] * interpolated_dadxi(2, 2);
988 
989  b[1][1] = n[0] * interpolated_dadxi(1, 0) +
990  n[1] * interpolated_dadxi(1, 1) +
991  n[2] * interpolated_dadxi(1, 2);
992 
993  // Deformed curvature tensor
994  B[0][0] = N[0] * interpolated_dAdxi(0, 0) +
995  N[1] * interpolated_dAdxi(0, 1) +
996  N[2] * interpolated_dAdxi(0, 2);
997 
998  // Off-diagonal terms are the same
999  B[0][1] = B[1][0] = N[0] * interpolated_dAdxi(2, 0) +
1000  N[1] * interpolated_dAdxi(2, 1) +
1001  N[2] * interpolated_dAdxi(2, 2);
1002 
1003  B[1][1] = N[0] * interpolated_dAdxi(1, 0) +
1004  N[1] * interpolated_dAdxi(1, 1) +
1005  N[2] * interpolated_dAdxi(1, 2);
1006 
1007  // Set up the change of curvature tensor
1008  double kappa[2][2];
1009 
1010  for (unsigned i = 0; i < 2; i++)
1011  {
1012  for (unsigned j = 0; j < 2; j++)
1013  {
1014  kappa[i][j] = b[i][j] - B[i][j];
1015  }
1016  }
1017 
1018  // Calculate the plane stress stiffness tensor
1019  double Et[2][2][2][2];
1020 
1021  // Some constants
1022  double C1 = 0.5 * (1.0 - nu_cached);
1023  double C2 = nu_cached;
1024 
1025  // Loop over first index
1026  for (unsigned i = 0; i < 2; i++)
1027  {
1028  for (unsigned j = 0; j < 2; j++)
1029  {
1030  for (unsigned k = 0; k < 2; k++)
1031  {
1032  for (unsigned l = 0; l < 2; l++)
1033  {
1034  Et[i][j][k][l] =
1035  C1 * (aup[i][k] * aup[j][l] + aup[i][l] * aup[j][k]) +
1036  C2 * aup[i][j] * aup[k][l];
1037  }
1038  }
1039  }
1040  }
1041 
1042  // Add contributions to potential energy
1043  double pot_en_cont = 0.0;
1044 
1045  for (unsigned i = 0; i < 2; i++)
1046  {
1047  for (unsigned j = 0; j < 2; j++)
1048  {
1049  for (unsigned k = 0; k < 2; k++)
1050  {
1051  for (unsigned l = 0; l < 2; l++)
1052  {
1053  pot_en_cont +=
1054  Et[i][j][k][l] * (gamma[i][j] * gamma[k][l] +
1055  bending_scale * kappa[i][j] * kappa[k][l]);
1056  }
1057  }
1058  }
1059  }
1060  pot_en += pot_en_cont * 0.5 * W * sqrt_adet;
1061 
1062  // Add contribution to kinetic energy
1063  kin_en += 0.5 * lambda_sq_cached * veloc_sq * W * sqrt_adet;
1064 
1065  } // End of loop over the integration points
1066  }
double dnodal_position_gen_dt(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:2369
double nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:2349
unsigned ndim() const
Access function to # of Eulerian coordinates.
Definition: geom_objects.h:177
unsigned nlagrangian() const
Access function to # of Lagrangian coordinates.
Definition: geom_objects.h:171
double prestress(const unsigned &i, const unsigned &j)
Definition: shell_elements.h:195
double lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:3912
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References a, b, Global_Physical_Variables::C1, Global_Physical_Variables::C2, calculate_contravariant(), oomph::GeomObject::d2position(), oomph::SolidFiniteElement::d2shape_lagrangian_at_knot(), oomph::FiniteElement::dnodal_position_gen_dt(), mathsFunc::gamma(), h(), i, oomph::FiniteElement::integral_pt(), oomph::SolidFiniteElement::interpolated_xi(), J, j, k, oomph::SolidFiniteElement::lagrangian_position_gen(), lambda_sq(), n, N, oomph::GeomObject::ndim(), oomph::GeomObject::nlagrangian(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_position_gen(), nu(), oomph::Integral::nweight(), oomph::oomph_info, prestress(), sqrt(), oomph::Global_string_for_annotation::string(), Undeformed_midplane_pt, w, oomph::QuadTreeNames::W, and oomph::Integral::weight().

◆ get_normal()

void oomph::KirchhoffLoveShellEquations::get_normal ( const Vector< double > &  s,
Vector< double > &  N 
)

Get normal vector.

Get normal to the shell.

74  {
75  // Set the dimension of the coordinates
76  const unsigned n_dim = 3;
77 
78  // Set the number of lagrangian coordinates
79  const unsigned n_lagrangian = 2;
80 
81  // Find out how many nodes there are
82  const unsigned n_node = nnode();
83 
84  // Find out how many positional dofs there are
85  const unsigned n_position_type = nnodal_position_type();
86 
87  // Set up memory for the shape functions
88  Shape psi(n_node, n_position_type);
89  DShape dpsidxi(n_node, n_position_type, n_lagrangian);
90 
91  // Could/Should we make this more general?
92  DShape d2psidxi(n_node, n_position_type, 3);
93 
94 
95  // Call the derivatives of the shape functions:
96  // d2psidxi(i,0) = \f$ \partial^2 \psi_j / \partial^2 \xi_0^2 \f$
97  // d2psidxi(i,1) = \f$ \partial^2 \psi_j / \partial^2 \xi_1^2 \f$
98  // d2psidxi(i,2) = \f$ \partial^2 \psi_j/\partial \xi_0 \partial \xi_1 \f$
99  (void)dshape_lagrangian(s, psi, dpsidxi);
100 
101  // Calculate local values of lagrangian position and
102  // the derivative of global position wrt lagrangian coordinates
103  DenseMatrix<double> interpolated_A(2, 3);
104 
105  // Initialise to zero
106  for (unsigned i = 0; i < n_dim; i++)
107  {
108  for (unsigned j = 0; j < n_lagrangian; j++)
109  {
110  interpolated_A(j, i) = 0.0;
111  }
112  }
113 
114  // Calculate displacements and derivatives
115  for (unsigned l = 0; l < n_node; l++)
116  {
117  // Loop over positional dofs
118  for (unsigned k = 0; k < n_position_type; k++)
119  {
120  // Loop over displacement components (deformed position)
121  for (unsigned i = 0; i < n_dim; i++)
122  {
123  double x_value = raw_nodal_position_gen(l, k, i);
124 
125  // Loop over derivative directions
126  for (unsigned j = 0; j < n_lagrangian; j++)
127  {
128  interpolated_A(j, i) += x_value * dpsidxi(l, k, j);
129  }
130  }
131  }
132  }
133 
134  // Unscaled normal
135  N[0] = (interpolated_A(0, 1) * interpolated_A(1, 2) -
136  interpolated_A(0, 2) * interpolated_A(1, 1));
137  N[1] = (interpolated_A(0, 2) * interpolated_A(1, 0) -
138  interpolated_A(0, 0) * interpolated_A(1, 2));
139  N[2] = (interpolated_A(0, 0) * interpolated_A(1, 1) -
140  interpolated_A(0, 1) * interpolated_A(1, 0));
141 
142  // Normalise
143  double norm = 1.0 / sqrt(N[0] * N[0] + N[1] * N[1] + N[2] * N[2]);
144  for (unsigned i = 0; i < 3; i++)
145  {
146  N[i] *= norm;
147  }
148  }
double dshape_lagrangian(const Vector< double > &s, Shape &psi, DShape &dpsidxi) const
Definition: elements.cc:6710
RealScalar s
Definition: level1_cplx_impl.h:130

References oomph::SolidFiniteElement::dshape_lagrangian(), i, j, k, N, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::raw_nodal_position_gen(), s, and sqrt().

Referenced by oomph::ClampedHermiteShellBoundaryConditionElement::fill_in_contribution_to_residuals(), load_rate_of_work(), and oomph::ClampedHermiteShellBoundaryConditionElement::output().

◆ get_strain_and_bend()

std::pair< double, double > oomph::KirchhoffLoveShellEquations::get_strain_and_bend ( const Vector< double > &  s,
DenseDoubleMatrix strain,
DenseDoubleMatrix bend 
)

Get strain and bending tensors.

Get strain and bending tensors; returns pair comprising the determinant of the undeformed (*.first) and deformed (*.second) midplane metric tensor.

156  {
157  // Set the dimension of the coordinates
158  const unsigned n_dim = 3;
159 
160  // Set the number of lagrangian coordinates
161  const unsigned n_lagrangian = 2;
162 
163  // Find out how many nodes there are
164  const unsigned n_node = nnode();
165 
166  // Find out how many positional dofs there are
167  const unsigned n_position_type = nnodal_position_type();
168 
169  // Set up memory for the shape functions
170  Shape psi(n_node, n_position_type);
171  DShape dpsidxi(n_node, n_position_type, n_lagrangian);
172 
173  // Could/Should we make this more general?
174  DShape d2psidxi(n_node, n_position_type, 3);
175 
176 
177  // Call the derivatives of the shape functions:
178  // d2psidxi(i,0) = \f$ \partial^2 \psi_j / \partial^2 \xi_0^2 \f$
179  // d2psidxi(i,1) = \f$ \partial^2 \psi_j / \partial^2 \xi_1^2 \f$
180  // d2psidxi(i,2) = \f$ \partial^2 \psi_j/\partial \xi_0 \partial \xi_1 \f$
181  (void)d2shape_lagrangian(s, psi, dpsidxi, d2psidxi);
182 
183  // Calculate local values of lagrangian position and
184  // the derivative of global position wrt lagrangian coordinates
185  Vector<double> interpolated_xi(2, 0.0), interpolated_x(3, 0.0);
186  Vector<double> accel(3, 0.0);
187  DenseMatrix<double> interpolated_A(2, 3);
188  DenseMatrix<double> interpolated_dAdxi(3);
189 
190  // Initialise to zero
191  for (unsigned i = 0; i < n_dim; i++)
192  {
193  for (unsigned j = 0; j < n_lagrangian; j++)
194  {
195  interpolated_A(j, i) = 0.0;
196  }
197  for (unsigned j = 0; j < 3; j++)
198  {
199  interpolated_dAdxi(i, j) = 0.0;
200  }
201  }
202 
203  // Calculate displacements and derivatives
204  for (unsigned l = 0; l < n_node; l++)
205  {
206  // Loop over positional dofs
207  for (unsigned k = 0; k < n_position_type; k++)
208  {
209  // Loop over lagrangian coordinate directions
210  for (unsigned i = 0; i < n_lagrangian; i++)
211  {
212  interpolated_xi[i] +=
213  raw_lagrangian_position_gen(l, k, i) * psi(l, k);
214  }
215 
216  // Loop over displacement components (deformed position)
217  for (unsigned i = 0; i < n_dim; i++)
218  {
219  double x_value = raw_nodal_position_gen(l, k, i);
220 
221  // Calculate interpolated (deformed) position
222  interpolated_x[i] += x_value * psi(l, k);
223 
224  // Calculate the acceleration
225  accel[i] += raw_dnodal_position_gen_dt(2, l, k, i) * psi(l, k);
226 
227  // Loop over derivative directions
228  for (unsigned j = 0; j < n_lagrangian; j++)
229  {
230  interpolated_A(j, i) += x_value * dpsidxi(l, k, j);
231  }
232  // Loop over the second derivative directions
233  for (unsigned j = 0; j < 3; j++)
234  {
235  interpolated_dAdxi(j, i) += x_value * d2psidxi(l, k, j);
236  }
237  }
238  }
239  }
240 
241  // Get the values of the undeformed parameters
242  Vector<double> interpolated_R(3);
243  DenseMatrix<double> interpolated_a(2, 3);
244  RankThreeTensor<double> dadxi(2, 2, 3);
245 
246  // Read out the undeformed position from the geometric object
248  interpolated_xi, interpolated_R, interpolated_a, dadxi);
249 
250  // Copy the values of the second derivatives into a slightly
251  // different data structure, where the mixed derivatives [0][1] and [1][0]
252  // are given by the single index [2]
253  DenseMatrix<double> interpolated_dadxi(3);
254  for (unsigned i = 0; i < 3; i++)
255  {
256  interpolated_dadxi(0, i) = dadxi(0, 0, i);
257  interpolated_dadxi(1, i) = dadxi(1, 1, i);
258  interpolated_dadxi(2, i) = dadxi(0, 1, i);
259  }
260 
261  // Declare and calculate the undeformed and deformed metric tensor
262  double a[2][2], A[2][2], aup[2][2], Aup[2][2];
263 
264  // Assign values of A and gamma
265  for (unsigned al = 0; al < 2; al++)
266  {
267  for (unsigned be = 0; be < 2; be++)
268  {
269  // Initialise a(al,be) and A(al,be) to zero
270  a[al][be] = 0.0;
271  A[al][be] = 0.0;
272  // Now calculate the dot product
273  for (unsigned k = 0; k < 3; k++)
274  {
275  a[al][be] += interpolated_a(al, k) * interpolated_a(be, k);
276  A[al][be] += interpolated_A(al, k) * interpolated_A(be, k);
277  }
278  // Calculate strain tensor
279  strain(al, be) = 0.5 * (A[al][be] - a[al][be]);
280  }
281  }
282 
283  // Calculate the contravariant metric tensor
284  double adet = calculate_contravariant(a, aup);
285  double Adet = calculate_contravariant(A, Aup);
286 
287  // Square roots are expensive, so let's do them once here
288  double sqrt_adet = sqrt(adet);
289  double sqrt_Adet = sqrt(Adet);
290 
291  // Calculate the normal Vectors
292  Vector<double> n(3), N(3);
293  n[0] = (interpolated_a(0, 1) * interpolated_a(1, 2) -
294  interpolated_a(0, 2) * interpolated_a(1, 1)) /
295  sqrt_adet;
296  n[1] = (interpolated_a(0, 2) * interpolated_a(1, 0) -
297  interpolated_a(0, 0) * interpolated_a(1, 2)) /
298  sqrt_adet;
299  n[2] = (interpolated_a(0, 0) * interpolated_a(1, 1) -
300  interpolated_a(0, 1) * interpolated_a(1, 0)) /
301  sqrt_adet;
302  N[0] = (interpolated_A(0, 1) * interpolated_A(1, 2) -
303  interpolated_A(0, 2) * interpolated_A(1, 1)) /
304  sqrt_Adet;
305  N[1] = (interpolated_A(0, 2) * interpolated_A(1, 0) -
306  interpolated_A(0, 0) * interpolated_A(1, 2)) /
307  sqrt_Adet;
308  N[2] = (interpolated_A(0, 0) * interpolated_A(1, 1) -
309  interpolated_A(0, 1) * interpolated_A(1, 0)) /
310  sqrt_Adet;
311 
312 
313  // Calculate the curvature tensors
314  double b[2][2], B[2][2];
315 
316  b[0][0] = n[0] * interpolated_dadxi(0, 0) +
317  n[1] * interpolated_dadxi(0, 1) + n[2] * interpolated_dadxi(0, 2);
318 
319  // Off-diagonal terms are the same
320  b[0][1] = b[1][0] = n[0] * interpolated_dadxi(2, 0) +
321  n[1] * interpolated_dadxi(2, 1) +
322  n[2] * interpolated_dadxi(2, 2);
323 
324  b[1][1] = n[0] * interpolated_dadxi(1, 0) +
325  n[1] * interpolated_dadxi(1, 1) + n[2] * interpolated_dadxi(1, 2);
326 
327  // Deformed curvature tensor
328  B[0][0] = N[0] * interpolated_dAdxi(0, 0) +
329  N[1] * interpolated_dAdxi(0, 1) + N[2] * interpolated_dAdxi(0, 2);
330 
331  // Off-diagonal terms are the same
332  B[0][1] = B[1][0] = N[0] * interpolated_dAdxi(2, 0) +
333  N[1] * interpolated_dAdxi(2, 1) +
334  N[2] * interpolated_dAdxi(2, 2);
335 
336  B[1][1] = N[0] * interpolated_dAdxi(1, 0) +
337  N[1] * interpolated_dAdxi(1, 1) + N[2] * interpolated_dAdxi(1, 2);
338 
339  // Set up the change of curvature tensor
340  for (unsigned i = 0; i < 2; i++)
341  {
342  for (unsigned j = 0; j < 2; j++)
343  {
344  bend(i, j) = b[i][j] - B[i][j];
345  }
346  }
347 
348  // Return undeformed and deformed determinant of in-plane metric
349  // tensor
350  return std::make_pair(adet, Adet);
351  }
double d2shape_lagrangian(const Vector< double > &s, Shape &psi, DShape &dpsidxi, DShape &d2psidxi) const
Definition: elements.cc:6781

References a, b, calculate_contravariant(), oomph::GeomObject::d2position(), oomph::SolidFiniteElement::d2shape_lagrangian(), i, oomph::FiniteElement::interpolated_x(), oomph::SolidFiniteElement::interpolated_xi(), j, k, n, N, oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::raw_dnodal_position_gen_dt(), oomph::SolidFiniteElement::raw_lagrangian_position_gen(), oomph::FiniteElement::raw_nodal_position_gen(), s, sqrt(), and Undeformed_midplane_pt.

◆ h()

const double& oomph::KirchhoffLoveShellEquations::h ( ) const
inline

Return the wall thickness to undeformed radius ratio.

220  {
221  return *H_pt;
222  }

References H_pt.

Referenced by fill_in_contribution_to_residuals_shell(), get_energy(), and load_rate_of_work().

◆ h_pt()

double*& oomph::KirchhoffLoveShellEquations::h_pt ( )
inline

Return a pointer to the non-dim wall thickness.

238  {
239  return H_pt;
240  }

References H_pt.

◆ lambda_sq()

const double& oomph::KirchhoffLoveShellEquations::lambda_sq ( ) const
inline

Return the timescale ratio (non-dimensional density)

226  {
227  return *Lambda_sq_pt;
228  }

References Lambda_sq_pt.

Referenced by fill_in_contribution_to_residuals_shell(), and get_energy().

◆ lambda_sq_pt()

double*& oomph::KirchhoffLoveShellEquations::lambda_sq_pt ( )
inline

Return a pointer to timescale ratio (nondim density)

244  {
245  return Lambda_sq_pt;
246  }

References Lambda_sq_pt.

◆ load_rate_of_work()

double oomph::KirchhoffLoveShellEquations::load_rate_of_work ( )

Get integral of instantaneous rate of work done on the wall due to the load returned by the virtual function load_vector_for_rate_of_work_computation(...). In the current class the latter function simply de-references the external load but this can be overloaded in derived classes (e.g. in FSI elements) to determine the rate of work done by individual constituents of this load (e.g. the fluid load in an FSI problem).

1081  {
1082  // Initialise
1083  double rate_of_work_integral = 0.0;
1084 
1085  // The number of dimensions
1086  const unsigned n_dim = 3;
1087 
1088  // The number of lagrangian coordinates
1089  const unsigned n_lagrangian = 2;
1090 
1091  // The number of nodes
1092  const unsigned n_node = nnode();
1093 
1094  // Number of integration points
1095  unsigned n_intpt = integral_pt()->nweight();
1096 
1097  // Find out how many positional dofs there are
1098  unsigned n_position_type = nnodal_position_type();
1099 
1100  // Vector to hold local coordinate in element
1101  Vector<double> s(n_lagrangian);
1102 
1103  // Set up storage for shape functions and derivatives of shape functions
1104  Shape psi(n_node, n_position_type);
1105  DShape dpsidxi(n_node, n_position_type, n_lagrangian);
1106 
1107  // Storage for jacobian of mapping from local to Lagrangian coords
1108  DenseMatrix<double> jacobian(n_lagrangian);
1109 
1110  // Storage for velocity vector
1111  Vector<double> velocity(n_dim);
1112 
1113  // Storage for load vector
1114  Vector<double> load(n_dim);
1115 
1116  // Storage for normal vector
1117  Vector<double> normal(n_dim);
1118 
1119  // Storage for Lagrangian and Eulerian coordinates
1120  Vector<double> xi(n_lagrangian);
1121  Vector<double> x(n_dim);
1122 
1123  // Storage for covariant vectors
1124  DenseMatrix<double> interpolated_A(n_lagrangian, n_dim);
1125 
1126  // Loop over the integration points
1127  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1128  {
1129  // Get the integral weight
1130  double w = integral_pt()->weight(ipt);
1131 
1132  // Get local coords at knot
1133  for (unsigned i = 0; i < n_lagrangian; i++)
1134  {
1135  s[i] = integral_pt()->knot(ipt, i);
1136  }
1137 
1138  // Get shape functions, derivatives, determinant of Jacobian of mapping
1139  double J = dshape_lagrangian(s, psi, dpsidxi);
1140 
1141  // Premultiply the weights and the Jacobian
1142  double W = w * J;
1143 
1144  // Initialise velocity, x and interpolated_A to zero
1145  for (unsigned i = 0; i < n_dim; i++)
1146  {
1147  velocity[i] = 0.0;
1148  x[i] = 0.0;
1149  for (unsigned j = 0; j < n_lagrangian; j++)
1150  {
1151  interpolated_A(j, i) = 0.0;
1152  }
1153  }
1154 
1155  // Initialise xi to zero
1156  for (unsigned i = 0; i < n_lagrangian; i++)
1157  {
1158  xi[i] = 0.0;
1159  }
1160 
1161  // Calculate velocity, coordinates and derivatives
1162  for (unsigned l = 0; l < n_node; l++)
1163  {
1164  // Loop over positional dofs
1165  for (unsigned k = 0; k < n_position_type; k++)
1166  {
1167  // Loop over lagrangian coordinate directions
1168  for (unsigned i = 0; i < n_lagrangian; i++)
1169  {
1170  xi[i] += lagrangian_position_gen(l, k, i) * psi(l, k);
1171  }
1172 
1173  // Loop over displacement components
1174  for (unsigned i = 0; i < n_dim; i++)
1175  {
1176  velocity[i] += dnodal_position_gen_dt(1, l, k, i) * psi(l, k);
1177 
1178  double x_value = nodal_position_gen(l, k, i);
1179  x[i] += x_value * psi(l, k);
1180 
1181  // Loop over derivative directions
1182  for (unsigned j = 0; j < n_lagrangian; j++)
1183  {
1184  interpolated_A(j, i) += x_value * dpsidxi(l, k, j);
1185  }
1186  }
1187  }
1188  }
1189 
1190  // Get deformed metric tensor
1191  double A[2][2];
1192  for (unsigned al = 0; al < 2; al++)
1193  {
1194  for (unsigned be = 0; be < 2; be++)
1195  {
1196  // Initialise A(al,be) to zero
1197  A[al][be] = 0.0;
1198  // Calculate the dot product
1199  for (unsigned k = 0; k < n_dim; k++)
1200  {
1201  A[al][be] += interpolated_A(al, k) * interpolated_A(be, k);
1202  }
1203  }
1204  }
1205 
1206  // Get determinant of metric tensor
1207  double A_det = A[0][0] * A[1][1] - A[0][1] * A[1][0];
1208 
1209  // Get outer unit normal
1210  get_normal(s, normal);
1211 
1212  // Get load vector
1214 
1215  // Local rate of work:
1216  double rate_of_work = 0.0;
1217  for (unsigned i = 0; i < n_dim; i++)
1218  {
1219  rate_of_work += load[i] * velocity[i];
1220  }
1221 
1222  // Add rate of work
1223  rate_of_work_integral += rate_of_work / h() * W * A_det;
1224  }
1225 
1226  return rate_of_work_integral;
1227  }
void load(Archive &ar, ParticleHandler &handl)
Definition: Particles.h:21
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
void get_normal(const Vector< double > &s, Vector< double > &N)
Get normal vector.
Definition: shell_elements.cc:72
virtual void load_vector_for_rate_of_work_computation(const unsigned &intpt, const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
Definition: shell_elements.h:123
double velocity(const double &t)
Angular velocity as function of time t.
Definition: jeffery_orbit.cc:107
void normal(const Vector< double > &x, Vector< double > &normal)
Definition: free_surface_rotation.cc:65
list x
Definition: plotDoE.py:28

References oomph::FiniteElement::dnodal_position_gen_dt(), oomph::SolidFiniteElement::dshape_lagrangian(), get_normal(), h(), i, oomph::FiniteElement::integral_pt(), J, j, k, oomph::Integral::knot(), oomph::SolidFiniteElement::lagrangian_position_gen(), load(), load_vector_for_rate_of_work_computation(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::FiniteElement::nodal_position_gen(), WallFunction::normal(), oomph::Integral::nweight(), s, Jeffery_Solution::velocity(), w, oomph::QuadTreeNames::W, oomph::Integral::weight(), and plotDoE::x.

Referenced by oomph::FSIDiagHermiteShellElement::fluid_load_rate_of_work().

◆ load_vector()

virtual void oomph::KirchhoffLoveShellEquations::load_vector ( const unsigned intpt,
const Vector< double > &  xi,
const Vector< double > &  x,
const Vector< double > &  N,
Vector< double > &  load 
)
inlinevirtual

Get the load vector: Pass number of integration point (dummy), Lagr. coordinate and normal vector and return the load vector (not all of the input arguments will be required for all specific load functions but the list should cover all cases). This function is virtual so it can be overloaded for FSI.

Reimplemented in oomph::FSIDiagHermiteShellElement.

177  {
178  Load_vector_fct_pt(xi, x, N, load);
179  }

References load(), Load_vector_fct_pt, N, and plotDoE::x.

Referenced by fill_in_contribution_to_residuals_shell(), and load_vector_for_rate_of_work_computation().

◆ load_vector_for_rate_of_work_computation()

virtual void oomph::KirchhoffLoveShellEquations::load_vector_for_rate_of_work_computation ( const unsigned intpt,
const Vector< double > &  xi,
const Vector< double > &  x,
const Vector< double > &  N,
Vector< double > &  load 
)
inlineprotectedvirtual

Get the load vector for the computation of the rate of work done by the load. Here we simply forward this to load_vector(...) but allow it to be overloaded in derived classes to allow the computation of the rate of work due to constituent parts of the load vector (e.g. the fluid traction in an FSI problem). Pass number of integration point (dummy), Lagr. coordinate and normal vector and return the load vector (not all of the input arguments will be required for all specific load functions but the list should cover all cases).

Reimplemented in oomph::FSIDiagHermiteShellElement.

129  {
130  load_vector(intpt, xi, x, N, load);
131  }

References load(), load_vector(), N, and plotDoE::x.

Referenced by load_rate_of_work().

◆ nu()

const double& oomph::KirchhoffLoveShellEquations::nu ( ) const
inline

Return the Poisson's ratio.

214  {
215  return *Nu_pt;
216  }

References Nu_pt.

Referenced by fill_in_contribution_to_residuals_shell(), and get_energy().

◆ nu_pt()

double*& oomph::KirchhoffLoveShellEquations::nu_pt ( )
inline

Return a pointer to the Poisson ratio.

232  {
233  return Nu_pt;
234  }

References Nu_pt.

◆ output() [1/4]

void oomph::KirchhoffLoveShellEquations::output ( FILE *  file_pt)
inlinevirtual

Generic FiniteElement output function.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::HermiteShellElement.

306  {
307  FiniteElement::output(file_pt);
308  }
virtual void output(std::ostream &outfile)
Definition: elements.h:3050

References oomph::FiniteElement::output().

◆ output() [2/4]

void oomph::KirchhoffLoveShellEquations::output ( FILE *  file_pt,
const unsigned n_plot 
)
inlinevirtual

Generic FiniteElement output function.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::HermiteShellElement.

312  {
313  FiniteElement::output(file_pt, n_plot);
314  }

References oomph::FiniteElement::output().

◆ output() [3/4]

void oomph::KirchhoffLoveShellEquations::output ( std::ostream &  outfile)
inlinevirtual

Generic FiniteElement output function.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::HermiteShellElement.

294  {
295  FiniteElement::output(outfile);
296  }

References oomph::FiniteElement::output().

◆ output() [4/4]

void oomph::KirchhoffLoveShellEquations::output ( std::ostream &  outfile,
const unsigned n_plot 
)
inlinevirtual

Generic FiniteElement output function.

Reimplemented from oomph::FiniteElement.

Reimplemented in oomph::HermiteShellElement.

300  {
301  FiniteElement::output(outfile, n_plot);
302  }

References oomph::FiniteElement::output().

◆ prestress()

double oomph::KirchhoffLoveShellEquations::prestress ( const unsigned i,
const unsigned j 
)
inline

Return (i,j)-th component of second Piola Kirchhoff membrane prestress

196  {
197  return *Prestress_pt(i, j);
198  }

References i, j, and Prestress_pt.

Referenced by get_energy().

◆ set_prestress_pt()

void oomph::KirchhoffLoveShellEquations::set_prestress_pt ( const unsigned i,
const unsigned j,
double value_pt 
)
inline

Set pointer to (i,j)-th component of second Piola Kirchhoff membrane prestress to specified value (automatically imposes symmetry for off-diagonal entries)

188  {
189  Prestress_pt(i, j) = value_pt;
190  Prestress_pt(j, i) = value_pt;
191  }

References i, j, and Prestress_pt.

◆ undeformed_midplane_pt()

GeomObject*& oomph::KirchhoffLoveShellEquations::undeformed_midplane_pt ( )
inline

Return a reference to geometric object that specifies the shell's undeformed geometry

251  {
252  return Undeformed_midplane_pt;
253  }

References Undeformed_midplane_pt.

◆ Zero_traction_fct()

void oomph::KirchhoffLoveShellEquations::Zero_traction_fct ( const Vector< double > &  xi,
const Vector< double > &  x,
const Vector< double > &  N,
Vector< double > &  load 
)
staticprotected

Default load function (zero traction)

54  {
55  unsigned n_dim = load.size();
56  for (unsigned i = 0; i < n_dim; i++)
57  {
58  load[i] = 0.0;
59  }
60  }

References i, and load().

Referenced by KirchhoffLoveShellEquations().

Member Data Documentation

◆ Default_h_value

double oomph::KirchhoffLoveShellEquations::Default_h_value = 0.05
staticprivate

Static default value for the thickness ratio.

Static default value for non-dim wall thickness (1/20)

Referenced by KirchhoffLoveShellEquations().

◆ Default_lambda_sq_value

double oomph::KirchhoffLoveShellEquations::Default_lambda_sq_value = 1.0
staticprivate

Static default value for the timescale ratio (1.0 for natural scaling)

Static default value for timescale ratio (1.0 for natural scaling)

Referenced by KirchhoffLoveShellEquations().

◆ Default_nu_value

double oomph::KirchhoffLoveShellEquations::Default_nu_value = 0.49
staticprivate

Static default value for the Poisson's ratio.

Default value for the Poisson ratio: 0.49 for no particular reason.

Referenced by KirchhoffLoveShellEquations().

◆ H_pt

double* oomph::KirchhoffLoveShellEquations::H_pt
private

Pointer to dimensionless wall thickness.

Referenced by h(), h_pt(), and KirchhoffLoveShellEquations().

◆ Ignore_membrane_terms

bool oomph::KirchhoffLoveShellEquations::Ignore_membrane_terms
private

◆ Lambda_sq_pt

double* oomph::KirchhoffLoveShellEquations::Lambda_sq_pt
private

Pointer to timescale ratio (non-dimensional density)

Referenced by KirchhoffLoveShellEquations(), lambda_sq(), and lambda_sq_pt().

◆ load_vector_fct_pt

void(*&)(const Vector<double>& xi, const Vector<double>& x, const Vector<double>& N, Vector<double>& load) oomph::KirchhoffLoveShellEquations::load_vector_fct_pt()
inline

Access to the load vector function pointer.

162  {
163  return Load_vector_fct_pt;
164  }

◆ Load_vector_fct_pt

void(* oomph::KirchhoffLoveShellEquations::Load_vector_fct_pt) (const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
protected

Pointer to load vector function: Its arguments are: Lagrangian coordinate, Eulerian coordinate, normal vector and load vector itself (not all of the input arguments will be required for all specific load functions but the list should cover all cases)

Referenced by KirchhoffLoveShellEquations(), load_vector(), and oomph::FSIDiagHermiteShellElement::load_vector().

◆ Nu_pt

double* oomph::KirchhoffLoveShellEquations::Nu_pt
private

Pointer to Poisson's ratio.

Referenced by KirchhoffLoveShellEquations(), nu(), and nu_pt().

◆ Prestress_pt

DenseMatrix<double*> oomph::KirchhoffLoveShellEquations::Prestress_pt
private

Pointer to membrane pre-stress terms – should probably generalise this to function pointers at some point

Referenced by fill_in_contribution_to_residuals_shell(), KirchhoffLoveShellEquations(), prestress(), and set_prestress_pt().

◆ Undeformed_midplane_pt

GeomObject* oomph::KirchhoffLoveShellEquations::Undeformed_midplane_pt
protected

◆ Zero_prestress

double oomph::KirchhoffLoveShellEquations::Zero_prestress = 0.0
staticprivate

Static default for prestress (set to zero)

Referenced by KirchhoffLoveShellEquations().


The documentation for this class was generated from the following files: