oomph::KirchhoffLoveBeamEquations Class Reference

#include <beam_elements.h>

+ Inheritance diagram for oomph::KirchhoffLoveBeamEquations:

Public Member Functions

 KirchhoffLoveBeamEquations ()
 
virtual void load_vector (const unsigned &intpt, const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
 
void wall_profile (const Vector< double > &xi, const Vector< double > &x, double &h_ratio)
 
const doubleh () const
 Return the non-dimensional wall thickness. More...
 
const doublelambda_sq () const
 Return the timescale ratio (non-dimensional density) More...
 
const doublesigma0 () const
 Return the axial prestress. More...
 
double *& sigma0_pt ()
 Return a pointer to axial prestress. More...
 
double *& h_pt ()
 Return a pointer to non-dim. wall thickness. More...
 
double *& lambda_sq_pt ()
 Return a pointer to timescale ratio (nondim density) More...
 
GeomObject *& undeformed_beam_pt ()
 
void get_normal (const Vector< double > &s, Vector< double > &N)
 Get normal vector on wall. More...
 
void get_normal (const Vector< double > &s, Vector< double > &r, Vector< double > &N)
 Get position vector to and normal vector on wall. More...
 
void get_non_unit_tangent (const Vector< double > &s, Vector< double > &r, Vector< double > &drds)
 Get position vector to and non-unit tangent vector on wall: dr/ds. More...
 
void fill_in_contribution_to_residuals (Vector< double > &residuals)
 
void fill_in_contribution_to_residuals_beam (Vector< double > &residuals)
 
virtual void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 Get FE jacobian and residuals (Jacobian done by finite differences) More...
 
void get_energy (double &pot_en, double &kin_en)
 Get potential (strain) and kinetic energy of the element. More...
 
void get_energy (double &stretch, double &bend, double &kin_en)
 
- 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 (std::ostream &outfile)
 
virtual void output (std::ostream &outfile, const unsigned &n_plot)
 
virtual void output (const unsigned &t, std::ostream &outfile, const unsigned &n_plot) const
 
virtual void output (FILE *file_pt)
 
virtual void output (FILE *file_pt, const unsigned &n_plot)
 
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 ()
 Reference to the load vector function pointer. More...
 
void(*&)(const Vector< double > &xi, const Vector< double > &x, double &h_ratio) wall_profile_fct_pt ()
 Reference to the wall thickness ratio profile function pointer. More...
 

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...
 
static void Unit_profile_fct (const Vector< double > &xi, const Vector< double > &x, double &h_ratio)
 Default profile function (constant thickness 'h_0') More...
 

Protected Attributes

void(* Load_vector_fct_pt )(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
 
void(* Wall_profile_fct_pt )(const Vector< double > &xi, const Vector< double > &x, double &h_ratio)
 
GeomObjectUndeformed_beam_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

doubleSigma0_pt
 Pointer to axial prestress. More...
 
doubleH_pt
 Pointer to wall thickness. More...
 
doubleLambda_sq_pt
 Pointer to Timescale ratio (non-dim. density) More...
 

Static Private Attributes

static double Default_sigma0_value = 0.0
 Static default value for 2nd Piola Kirchhoff prestress. More...
 
static double Default_lambda_sq_value = 1.0
 Static default value for timescale ratio (1.0 – for natural scaling) More...
 
static double Default_h_value = 0.05
 Static default value for non-dim wall thickness. 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
 
- 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...
 
void fill_in_contribution_to_jacobian (Vector< double > &residuals, DenseMatrix< double > &jacobian)
 
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 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 solve the equations of Kirchhoff-Love large-displacement (but linearly-elastic) thin-beam theory.

The variational principle has the form

\[ \int_0^{L} \left[ (\sigma_0 + \gamma) \ \delta \gamma + \frac{1}{12} \left(\frac{h}{R_0}\right)^2 \kappa \ \delta \kappa - \left( \left(\frac{R_0}{h}\right) {\bf f} - \Lambda^2 \frac{\partial^2 {\bf R}_w}{\partial t^2} \right) \cdot \delta {\bf R}_w \right] \ d\xi = 0, \]

where all lengths have been non-dimensionalised w.r.t. \( R_0 \). The strain and and bending "tensors" \(\gamma\) and \(\kappa\) are computed relative to the shape of the beam's undeformed shape which is specified as a GeomObject.

Time is scaled on the timescale \(T\) and

\[ \Lambda = \frac{a}{T} \sqrt{\frac{\rho}{E_{eff}}}, \]

the ratio of the timescale used in the non-dimensionalisation of the equations to the natural timescale of the wall oscillations (in the wall's in-plane mode). \( \Lambda^2 \) can be interpreted as the non-dimensional wall density, therefore \( \Lambda=0\) corresponds to the case without wall inertia.

Note that:

  • the load vector \( {\bf f} \) is scaled on the effective elastic modulus \( E_{eff}=E/(1-\nu^2)\) (rather than the bending stiffness). Rescale the result yourself if you prefer another non-dimensionalisation (the current version yields the the most compact maths).
  • Poisson's ratio does not appear explicitly since it only occurs in combination with Young's modulus \(E\).

Default values:

  • the 2nd Piola Kirchhoff pre-stress \( \sigma_0 \) is zero.
  • the wall thickness \( h/R_0\) is 1/20.
  • the timescale ratio \( \Lambda^2\) is 1.
  • the traction vector \( f \) evaluates to zero.

Need to specify:

  • the undeformed wall shape (as a GeomObject).

The governing equations can be switched from the principle of virtual displacements to a system of equations that forces the beam to deform into a shape specified by a SolidInitialCondition object. If SolidFiniteElement::solid_ic_pt()!=0 we solve the the equations

\[ \int_0^{L} \left( \frac{\partial^i {\bf R}_{IC}}{\partial t^i} - {\bf R}_w \right) \psi_{jk} \ d\xi = 0, \]

where \( \partial^i {\bf R}_{IC}/\partial t^i\) is implemented by the SolidInitialCondition object, pointed to by SolidFiniteElement::shell_ic_pt().

Constructor & Destructor Documentation

◆ KirchhoffLoveBeamEquations()

oomph::KirchhoffLoveBeamEquations::KirchhoffLoveBeamEquations ( )
inline

Constructor. Set default values for all physical parameters and zero traction.

154  : Undeformed_beam_pt(0)
155  {
156  // Set physical parameter pointers to the default values
159  // The reference thickness 'h_0'
161  // Zero traction
163  // Unit thickness profile
165  }
static double Default_sigma0_value
Static default value for 2nd Piola Kirchhoff prestress.
Definition: beam_elements.h:97
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: beam_elements.cc:51
GeomObject * Undeformed_beam_pt
Definition: beam_elements.h:149
static void Unit_profile_fct(const Vector< double > &xi, const Vector< double > &x, double &h_ratio)
Default profile function (constant thickness 'h_0')
Definition: beam_elements.cc:66
void(* Load_vector_fct_pt)(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
Definition: beam_elements.h:128
void(* Wall_profile_fct_pt)(const Vector< double > &xi, const Vector< double > &x, double &h_ratio)
Definition: beam_elements.h:143
double * Lambda_sq_pt
Pointer to Timescale ratio (non-dim. density)
Definition: beam_elements.h:114
static double Default_h_value
Static default value for non-dim wall thickness.
Definition: beam_elements.h:104
double * Sigma0_pt
Pointer to axial prestress.
Definition: beam_elements.h:107
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
Definition: beam_elements.h:100
double * H_pt
Pointer to wall thickness.
Definition: beam_elements.h:111

References Default_h_value, Default_lambda_sq_value, Default_sigma0_value, H_pt, Lambda_sq_pt, Load_vector_fct_pt, Sigma0_pt, Unit_profile_fct(), Wall_profile_fct_pt, and Zero_traction_fct().

Member Function Documentation

◆ fill_in_contribution_to_jacobian()

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

Get FE jacobian and residuals (Jacobian done by finite differences)

Reimplemented from oomph::GeneralisedElement.

Reimplemented in oomph::FSIHermiteBeamElement.

536  {
537  // Call the element's residuals vector
539 
540  // Solve for the consistent acceleration in Newmark scheme?
542  {
544  return;
545  }
546 
547  // Allocate storage for the full residuals of the element
548  unsigned n_dof = ndof();
549  Vector<double> full_residuals(n_dof);
550 
551  // Call the full residuals
552  get_residuals(full_residuals);
553 
554  // Get the solid entries in the jacobian using finite differences
556  full_residuals, jacobian);
557 
558  // Get the entries from the external data, usually load terms
560  jacobian);
561  }
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_beam(Vector< double > &residuals)
Definition: beam_elements.cc:275
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_beam(), 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::FSIHermiteBeamElement::fill_in_contribution_to_jacobian().

◆ fill_in_contribution_to_residuals()

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

Return the residuals for the equations of Kirchhoff-Love beam theory with linear constitutive equations; if Solid_ic_pt!=0, we assign residuals which force the assignement of an initial shape/ veloc/accel to the dofs. This overloads the standard interface.

Reimplemented from oomph::GeneralisedElement.

282  {
284  }

References fill_in_contribution_to_residuals_beam().

◆ fill_in_contribution_to_residuals_beam()

void oomph::KirchhoffLoveBeamEquations::fill_in_contribution_to_residuals_beam ( Vector< double > &  residuals)

Return the residuals for the equations of Kirchhoff-Love beam theory with linear constitutive equations; if Solid_ic_pt!=0, we assign residuals which force the assignement of an initial shape/ veloc/accel to the dofs.

277  {
278  // Set up the initial conditions, if an IC pointer has been set
279  if (Solid_ic_pt != 0)
280  {
282  return;
283  }
284 
285  // Set the dimension of the global coordinates
286  const unsigned n_dim = Undeformed_beam_pt->ndim();
287 
288  // Set the number of lagrangian coordinates
289  const unsigned n_lagrangian = Undeformed_beam_pt->nlagrangian();
290 
291  // Find out how many nodes there are
292  const unsigned n_node = nnode();
293 
294  // Find out how many positional dofs there are
295  const unsigned n_position_type = nnodal_position_type();
296 
297  // Integer to store the local equation number
298  int local_eqn = 0;
299 
300  // Setup memory for accelerations
301  Vector<double> accel(2);
302 
303  // Set up memory for the shape functions:
304 
305  // # of nodes, # of positional dofs
306  Shape psi(n_node, n_position_type);
307 
308  // # of nodes, # of positional dofs, # of lagrangian coords (for deriv)
309  DShape dpsidxi(n_node, n_position_type, n_lagrangian);
310 
311  // # of nodes, # of positional dofs, # of derivs)
312  DShape d2psidxi(n_node, n_position_type, n_lagrangian);
313 
314  // Set # of integration points
315  const unsigned n_intpt = integral_pt()->nweight();
316 
317  // Get Physical Variables from Element
318 
319  // Thickness h_0/R, axial prestress, timescale ratio (density)
320  const double HoR_0 = h(); // i.e. refers to reference thickness 'h_0'
321  const double sigma_0 = sigma0();
322  const double Lambda_sq = lambda_sq();
323 
324  // Loop over the integration points
325  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
326  {
327  // Get the integral weight
328  double w = integral_pt()->weight(ipt);
329 
330  // Call the derivatives of the shape functions w.r.t. Lagrangian coords
331  double J = d2shape_lagrangian_at_knot(ipt, psi, dpsidxi, d2psidxi);
332 
333  // Premultiply the weights and the Jacobian
334  double W = w * J;
335 
336  // Calculate local values of lagrangian position and
337  // the derivative of global position wrt lagrangian coordinates
338  Vector<double> interpolated_xi(n_lagrangian, 0.0),
339  interpolated_x(n_dim, 0.0);
340  DenseMatrix<double> interpolated_A(n_lagrangian, n_dim);
341  DenseMatrix<double> interpolated_dAdxi(n_lagrangian, n_dim);
342 
343  // Initialise to zero
344  // Loop over coordinate directions/components of Vector
345  for (unsigned i = 0; i < n_dim; i++)
346  {
347  // Initialise acclerations
348  accel[i] = 0.0;
349  // Loop over derivatives/base Vectors (just one here)
350  for (unsigned j = 0; j < n_lagrangian; j++)
351  {
352  interpolated_A(j, i) = 0.0;
353  }
354  // Loop over derivatives of base Vector (just one here)
355  for (unsigned j = 0; j < n_lagrangian; j++)
356  {
357  interpolated_dAdxi(j, i) = 0.0;
358  }
359  }
360 
361  // Calculate displacements, accelerations and spatial derivatives
362  for (unsigned l = 0; l < n_node; l++)
363  {
364  // Loop over positional dofs
365  for (unsigned k = 0; k < n_position_type; k++)
366  {
367  // Loop over Lagrangian coordinate directions [xi_gen[] are the
368  // the *gen*eralised Lagrangian coordinates: node, type, direction]
369  for (unsigned i = 0; i < n_lagrangian; i++)
370  {
371  interpolated_xi[i] +=
372  raw_lagrangian_position_gen(l, k, i) * psi(l, k);
373  }
374 
375  // Loop over components of the deformed position Vector
376  for (unsigned i = 0; i < n_dim; i++)
377  {
378  interpolated_x[i] += raw_nodal_position_gen(l, k, i) * psi(l, k);
379 
380  accel[i] += raw_dnodal_position_gen_dt(2, l, k, i) * psi(l, k);
381 
382  // Loop over derivative directions (just one here)
383  for (unsigned j = 0; j < n_lagrangian; j++)
384  {
385  interpolated_A(j, i) +=
386  raw_nodal_position_gen(l, k, i) * dpsidxi(l, k, j);
387  }
388 
389  // Loop over the second derivative directions (just one here)
390  for (unsigned j = 0; j < n_lagrangian; j++)
391  {
392  interpolated_dAdxi(j, i) +=
393  raw_nodal_position_gen(l, k, i) * d2psidxi(l, k, j);
394  }
395  }
396  }
397  }
398 
399  // Setup position Vector and derivatives of undeformed config
400  Vector<double> R(n_dim);
401  DenseMatrix<double> a(n_lagrangian, n_dim);
402  RankThreeTensor<double> dadxi(n_lagrangian, n_lagrangian, n_dim);
403 
404  // Get the undeformed geometry
406 
407  // Declare and calculate the undeformed and deformed metric tensor
408  // and the strain tensor (these are just scalars)
409  double amet = 0.0, Amet = 0.0;
410 
411  // Now calculate the dot product
412  for (unsigned k = 0; k < n_dim; k++)
413  {
414  amet += a(0, k) * a(0, k);
415  Amet += interpolated_A(0, k) * interpolated_A(0, k);
416  }
417 
418  double gamma = 0.5 * (Amet - amet);
419 
420  // Calculate the contravariant metric tensors
421  double adet = amet; // double aup = 1.0/amet;
422  double Adet = Amet; // double Aup = 1.0/Amet;
423 
424  // Calculate the unit normal Vectors
425  Vector<double> n(2);
426  Vector<double> N(2);
427  n[0] = -a(0, 1) / sqrt(adet);
428  n[1] = a(0, 0) / sqrt(adet);
429 
430  N[0] = -interpolated_A(0, 1) / sqrt(Adet);
431  N[1] = interpolated_A(0, 0) / sqrt(Adet);
432 
433  // Square root of deformed determinant
434  double sqrt_Adet = sqrt(Adet);
435 
436  // Calculate the curvature tensors
437  double b = n[0] * dadxi(0, 0, 0) + n[1] * dadxi(0, 0, 1);
438  double B =
439  N[0] * interpolated_dAdxi(0, 0) + N[1] * interpolated_dAdxi(0, 1);
440 
441  // Set up the change of curvature tensor
442  double kappa = b - B;
443 
444  // Define the load Vector
445  Vector<double> f(n_dim);
446 
447  // Get load Vector
449 
450  // Define the wall thickness ratio profile
451  double h_ratio = 0;
452 
453  // Get wall thickness ratio profile
455 
456  // Thickness h/R
457  double HoR = HoR_0 * h_ratio;
458 
459  // Allocate storage for variations of normal Vector
460  double normal_var[n_dim][n_dim];
461 
462  // Geometrically nonlinear beam equations from
463  //--------------------------------------------
464  // principle of virtual displacements
465  //-----------------------------------
466 
467  // Loop over the number of nodes
468  for (unsigned n = 0; n < n_node; n++)
469  {
470  // Loop over the type of degree of freedom
471  for (unsigned k = 0; k < n_position_type; k++)
472  {
473  // Setup components of variation of normal Vector:
474  // ...(variation w.r.t. direction, component)
475 
476  normal_var[0][0] = interpolated_A(0, 0) * interpolated_A(0, 1) *
477  dpsidxi(n, k, 0) /
478  (sqrt_Adet * sqrt_Adet * sqrt_Adet);
479 
480  normal_var[1][0] =
481  (interpolated_A(0, 1) * interpolated_A(0, 1) / Adet - 1.0) *
482  dpsidxi(n, k, 0) / (sqrt_Adet);
483 
484  normal_var[0][1] =
485  (1.0 - interpolated_A(0, 0) * interpolated_A(0, 0) / Adet) *
486  dpsidxi(n, k, 0) / (sqrt_Adet);
487 
488  normal_var[1][1] = -interpolated_A(0, 0) * interpolated_A(0, 1) *
489  dpsidxi(n, k, 0) /
490  (sqrt_Adet * sqrt_Adet * sqrt_Adet);
491 
492  // Loop over the coordinate directions
493  for (unsigned i = 0; i < n_dim; i++)
494  {
495  // Find the equation number
496  local_eqn = position_local_eqn(n, k, i);
497 
498  // If it's not a boundary condition
499  if (local_eqn >= 0)
500  {
501  // Premultiply by thickness profile
502 
503  // External forcing
504  residuals[local_eqn] -=
505  h_ratio * (1.0 / HoR) * f[i] * psi(n, k) * W * sqrt(Adet);
506 
507  residuals[local_eqn] +=
508  h_ratio * Lambda_sq * accel[i] * psi(n, k) * W * sqrt(adet);
509 
510  // Membrane term with axial prestress
511  residuals[local_eqn] += h_ratio * (sigma_0 + gamma) *
512  interpolated_A(0, i) * dpsidxi(n, k, 0) *
513  W * sqrt(adet);
514 
515  // Bending term: Minus sign because \delta \kappa = - \delta B
516  residuals[local_eqn] -=
517  h_ratio * (1.0 / 12.0) * HoR * HoR * kappa *
518  (N[i] * d2psidxi(n, k, 0) +
519  normal_var[i][0] * interpolated_dAdxi(0, 0) +
520  normal_var[i][1] * interpolated_dAdxi(0, 1)) *
521  W * sqrt(adet);
522  }
523  }
524  }
525  }
526 
527  } // End of loop over the integration points
528  }
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
@ R
Definition: StatisticsVector.h:21
Scalar * b
Definition: benchVecAdd.cpp:17
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition: bench_gemm.cpp:48
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
unsigned ndim() const
Access function to # of Eulerian coordinates.
Definition: geom_objects.h:177
virtual void d2position(const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
Definition: geom_objects.h:341
unsigned nlagrangian() const
Access function to # of Lagrangian coordinates.
Definition: geom_objects.h:171
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 & lambda_sq() const
Return the timescale ratio (non-dimensional density)
Definition: beam_elements.h:221
void wall_profile(const Vector< double > &xi, const Vector< double > &x, double &h_ratio)
Definition: beam_elements.h:205
const double & sigma0() const
Return the axial prestress.
Definition: beam_elements.h:227
const double & h() const
Return the non-dimensional wall thickness.
Definition: beam_elements.h:215
virtual void load_vector(const unsigned &intpt, const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
Definition: beam_elements.h:183
Definition: matrices.h:74
double raw_lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:3897
SolidInitialCondition * Solid_ic_pt
Pointer to object that specifies the initial condition.
Definition: elements.h:4131
void fill_in_residuals_for_solid_ic(Vector< double > &residuals)
Definition: elements.h:4018
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 Lambda_sq
Pseudo-solid mass density.
Definition: pressure_driven_torus.cc:62
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, oomph::GeomObject::d2position(), oomph::SolidFiniteElement::d2shape_lagrangian_at_knot(), f(), oomph::SolidFiniteElement::fill_in_residuals_for_solid_ic(), mathsFunc::gamma(), h(), i, oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), oomph::SolidFiniteElement::interpolated_xi(), J, j, k, Global_Physical_Variables::Lambda_sq, lambda_sq(), load_vector(), n, N, oomph::GeomObject::ndim(), oomph::GeomObject::nlagrangian(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::Integral::nweight(), oomph::SolidFiniteElement::position_local_eqn(), R, oomph::FiniteElement::raw_dnodal_position_gen_dt(), oomph::SolidFiniteElement::raw_lagrangian_position_gen(), oomph::FiniteElement::raw_nodal_position_gen(), sigma0(), oomph::SolidFiniteElement::Solid_ic_pt, sqrt(), Undeformed_beam_pt, w, oomph::QuadTreeNames::W, wall_profile(), and oomph::Integral::weight().

Referenced by fill_in_contribution_to_jacobian(), and fill_in_contribution_to_residuals().

◆ get_energy() [1/2]

void oomph::KirchhoffLoveBeamEquations::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 (wrapper function).

569  {
570  // Initialise
571  double stretch = 0.0;
572  double bend = 0.0;
573  kin_en = 0.0;
574 
575  // Compute energy
576  get_energy(stretch, bend, kin_en);
577 
578  // Sum components of potential energy
579  pot_en = stretch + bend;
580  }
void get_energy(double &pot_en, double &kin_en)
Get potential (strain) and kinetic energy of the element.
Definition: beam_elements.cc:568

◆ get_energy() [2/2]

void oomph::KirchhoffLoveBeamEquations::get_energy ( double stretch,
double bend,
double kin_en 
)

Get the potential energy due to stretching and bending and the kinetic energy of the element

Compute the potential (strain) and kinetic energy of the element, breaking down the potential energy into stretching and bending components.

591  {
592  // Initialise
593  stretch = 0.0;
594  bend = 0.0;
595  kin_en = 0.0;
596 
597  // Set the dimension of the global coordinates
598  unsigned n_dim = Undeformed_beam_pt->ndim();
599 
600  // Set the number of lagrangian coordinates
601  unsigned n_lagrangian = Undeformed_beam_pt->nlagrangian();
602 
603  // Find out how many nodes there are
604  unsigned n_node = nnode();
605 
606  // Find out how many positional dofs there are
607  unsigned n_position_dofs = nnodal_position_type();
608 
609  // Setup memory for veloc
610  Vector<double> veloc(2);
611 
612  // Set up memory for the shape functions:
613 
614  // # of nodes, # of positional dofs
615  Shape psi(n_node, n_position_dofs);
616 
617  // # of nodes, # of positional dofs, # of lagrangian coords (for deriv)
618  DShape dpsidxi(n_node, n_position_dofs, n_lagrangian);
619 
620  // # of nodes, # of positional dofs, # of derivs)
621  DShape d2psidxi(n_node, n_position_dofs, n_lagrangian);
622 
623  // Set # of integration points
624  unsigned n_intpt = integral_pt()->nweight();
625 
626  // Get Physical Variables from Element
627 
628  // Thickness h_0/R, axial prestress, timescale ratio (density)
629  double HoR_0 = h(); // i.e. refers to reference thickness 'h_0'
630  double sigma_0 = sigma0();
631 
632  double Lambda_sq = lambda_sq();
633 
634  // Loop over the integration points
635  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
636  {
637  // Get the integral weight
638  double w = integral_pt()->weight(ipt);
639 
640  // Call the derivatives of the shape functions w.r.t. Lagrangian coords
641  double J = d2shape_lagrangian_at_knot(ipt, psi, dpsidxi, d2psidxi);
642 
643  // Premultiply the weights and the Jacobian
644  double W = w * J;
645 
646  // Calculate local values of lagrangian position and
647  // the derivative of global position wrt lagrangian coordinates
648  Vector<double> interpolated_xi(n_lagrangian, 0.0),
649  interpolated_x(n_dim, 0.0);
650 
651  DenseMatrix<double> interpolated_A(n_lagrangian, n_dim);
652  DenseMatrix<double> interpolated_dAdxi(n_lagrangian, n_dim);
653 
654  // Initialise to zero
655 
656  // Loop over coordinate directions/components of Vector
657  for (unsigned i = 0; i < n_dim; i++)
658  {
659  // Initialise veloc
660  veloc[i] = 0.0;
661 
662  // Loop over derivatives/base Vectors (just one here)
663  for (unsigned j = 0; j < n_lagrangian; j++)
664  {
665  interpolated_A(j, i) = 0.0;
666  }
667  // Loop over derivatives of base Vector (just one here)
668  for (unsigned j = 0; j < n_lagrangian; j++)
669  {
670  interpolated_dAdxi(j, i) = 0.0;
671  }
672  }
673 
674  // Calculate displacements, accelerations and spatial derivatives
675  for (unsigned l = 0; l < n_node; l++)
676  {
677  // Loop over positional dofs
678  for (unsigned k = 0; k < n_position_dofs; k++)
679  {
680  // Loop over Lagrangian coordinate directions [xi_gen[] are the
681  // the *gen*eralised Lagrangian coordinates: node, type, direction]
682  for (unsigned i = 0; i < n_lagrangian; i++)
683  {
684  interpolated_xi[i] +=
685  raw_lagrangian_position_gen(l, k, i) * psi(l, k);
686  }
687 
688  // Loop over components of the deformed position Vector
689  for (unsigned i = 0; i < n_dim; i++)
690  {
691  // Need this for wall thickness ratio profile
692  interpolated_x[i] += raw_nodal_position_gen(l, k, i) * psi(l, k);
693 
694  veloc[i] += raw_dnodal_position_gen_dt(1, l, k, i) * psi(l, k);
695 
696  // Loop over derivative directions (just one here)
697  for (unsigned j = 0; j < n_lagrangian; j++)
698  {
699  interpolated_A(j, i) +=
700  raw_nodal_position_gen(l, k, i) * dpsidxi(l, k, j);
701  }
702 
703  // Loop over the second derivative directions (just one here)
704  for (unsigned j = 0; j < n_lagrangian; j++)
705  {
706  interpolated_dAdxi(j, i) +=
707  raw_nodal_position_gen(l, k, i) * d2psidxi(l, k, j);
708  }
709  }
710  }
711  }
712 
713  // Get square of veloc
714  double veloc_sq = 0;
715  for (unsigned i = 0; i < n_dim; i++)
716  {
717  veloc_sq += veloc[i] * veloc[i];
718  }
719 
720  // Setup position Vector and derivatives of undeformed config
721  Vector<double> R(n_dim);
722  DenseMatrix<double> a(n_lagrangian, n_dim);
723  RankThreeTensor<double> dadxi(n_lagrangian, n_lagrangian, n_dim);
724 
725  // Get the undeformed geometry
727 
728  // Declare and calculate the undeformed and deformed metric tensor
729  // and the strain tensor (these are 1d tensors, i.e. scalars)
730  double amet = 0.0, Amet = 0.0;
731 
732  // Work out metric and strain tensors
733  // Now calculate the dot product
734  for (unsigned k = 0; k < n_dim; k++)
735  {
736  amet += a(0, k) * a(0, k);
737  Amet += interpolated_A(0, k) * interpolated_A(0, k);
738  }
739 
740  // Calculate strain tensor
741  double gamma = 0.5 * (Amet - amet);
742 
743  // Calculate the contravariant metric tensors
744  double adet = amet; // aup = 1.0/amet;
745  double Adet = Amet; // Aup = 1.0/Amet;
746 
747  // Calculate the unit normal Vectors
748  Vector<double> n(2);
749  Vector<double> N(2);
750  n[0] = -a(0, 1) / sqrt(adet);
751  n[1] = a(0, 0) / sqrt(adet);
752 
753  N[0] = -interpolated_A(0, 1) / sqrt(Adet);
754  N[1] = interpolated_A(0, 0) / sqrt(Adet);
755 
756  // Calculate the curvature tensors
757  double b = n[0] * dadxi(0, 0, 0) + n[1] * dadxi(0, 0, 1);
758  double B =
759  N[0] * interpolated_dAdxi(0, 0) + N[1] * interpolated_dAdxi(0, 1);
760 
761  // Set up the change of curvature tensor
762  double kappa = b - B;
763 
764  // Define the wall thickness ratio profile
765  double h_ratio = 0;
766 
767  // Get wall thickness ratio profile
769 
770  // Thickness h/R
771  double HoR = HoR_0 * h_ratio;
772 
773  // Add contributions
774  stretch +=
775  h_ratio * 0.5 * (gamma + sigma_0) * (gamma + sigma_0) * W * sqrt(adet);
776  bend += h_ratio * 0.5 * (1.0 / 12.0) * HoR * HoR * kappa * kappa * W *
777  sqrt(adet);
778  kin_en += h_ratio * 0.5 * Lambda_sq * veloc_sq * W * sqrt(adet);
779  } // End of loop over the integration points
780  }

References a, b, oomph::GeomObject::d2position(), oomph::SolidFiniteElement::d2shape_lagrangian_at_knot(), mathsFunc::gamma(), h(), i, oomph::FiniteElement::integral_pt(), oomph::FiniteElement::interpolated_x(), oomph::SolidFiniteElement::interpolated_xi(), J, j, k, Global_Physical_Variables::Lambda_sq, lambda_sq(), n, N, oomph::GeomObject::ndim(), oomph::GeomObject::nlagrangian(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), oomph::Integral::nweight(), R, oomph::FiniteElement::raw_dnodal_position_gen_dt(), oomph::SolidFiniteElement::raw_lagrangian_position_gen(), oomph::FiniteElement::raw_nodal_position_gen(), sigma0(), sqrt(), Undeformed_beam_pt, w, oomph::QuadTreeNames::W, wall_profile(), and oomph::Integral::weight().

◆ get_non_unit_tangent()

void oomph::KirchhoffLoveBeamEquations::get_non_unit_tangent ( const Vector< double > &  s,
Vector< double > &  r,
Vector< double > &  drds 
)

Get position vector to and non-unit tangent vector on wall: dr/ds.

Get position vector to and non-unit tangent vector on wall: dr/ds

187  {
188 #ifdef PARANOID
189  if (drds.size() != 2)
190  {
191  std::ostringstream error_message;
192  error_message << "Tangent vector should have dimension 2, not"
193  << drds.size() << std::endl;
194 
195  throw OomphLibError(
196  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
197  }
198  if (r.size() != 2)
199  {
200  std::ostringstream error_message;
201  error_message << "Position vector should have dimension 2, not"
202  << r.size() << std::endl;
203 
204  throw OomphLibError(
205  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
206  }
207 
208  if (s.size() != 1)
209  {
210  std::ostringstream error_message;
211  error_message << "Local coordinate should have dimension 1, not"
212  << s.size() << std::endl;
213 
214  throw OomphLibError(
215  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
216  }
217 #endif
218 
219  // Set the dimension of the global coordinates
220  unsigned n_dim = Undeformed_beam_pt->ndim();
221 
222  // Set the number of lagrangian coordinates
223  unsigned n_lagrangian = Undeformed_beam_pt->nlagrangian();
224 
225  // Find out how many nodes there are
226  unsigned n_node = nnode();
227 
228  // Find out how many positional dofs there are
229  unsigned n_position_type = nnodal_position_type();
230 
231  // Set up memory for the shape functions:
232 
233  // # of nodes, # of positional dofs
234  Shape psi(n_node, n_position_type);
235 
236  // # of nodes, # of positional dofs, # of lagrangian coords (for deriv)
237  DShape dpsids(n_node, n_position_type, n_lagrangian);
238 
239  // Call the derivatives of the shape functions w.r.t. local coords
240  dshape_local(s, psi, dpsids);
241 
242  // Initialise to zero
243 
244  // Loop over coordinate directions/components of Vector
245  for (unsigned i = 0; i < n_dim; i++)
246  {
247  r[i] = 0.0;
248  drds[i] = 0.0;
249  }
250 
251  // Loop over directions
252  for (unsigned i = 0; i < n_dim; i++)
253  {
254  // Loop over nodes
255  for (unsigned l = 0; l < n_node; l++)
256  {
257  // Loop over positional dofs
258  for (unsigned k = 0; k < n_position_type; k++)
259  {
260  r[i] += raw_nodal_position_gen(l, k, i) * psi(l, k);
261  // deriv w.r.t. to zero-th (and only) local coordiate
262  drds[i] += raw_nodal_position_gen(l, k, i) * dpsids(l, k, 0);
263  }
264  }
265  }
266  }
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Definition: elements.h:1981
RealScalar s
Definition: level1_cplx_impl.h:130
r
Definition: UniformPSDSelfTest.py:20
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References oomph::FiniteElement::dshape_local(), i, k, oomph::GeomObject::ndim(), oomph::GeomObject::nlagrangian(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, UniformPSDSelfTest::r, oomph::FiniteElement::raw_nodal_position_gen(), s, and Undeformed_beam_pt.

Referenced by oomph::ClampedSlidingHermiteBeamBoundaryConditionElement::fill_in_contribution_to_residuals().

◆ get_normal() [1/2]

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

Get normal vector on wall.

260  {
261  Vector<double> r(2);
262  get_normal(s, r, N);
263  }
void get_normal(const Vector< double > &s, Vector< double > &N)
Get normal vector on wall.
Definition: beam_elements.h:259

References N, UniformPSDSelfTest::r, and s.

Referenced by FSIChannelWithLeafletProblem< ELEMENT >::doc_solution(), and oomph::ClampedSlidingHermiteBeamBoundaryConditionElement::fill_in_contribution_to_residuals().

◆ get_normal() [2/2]

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

Get position vector to and normal vector on wall.

80  {
81 #ifdef PARANOID
82  if (N.size() != 2)
83  {
84  std::ostringstream error_message;
85  error_message << "Normal vector should have dimension 2, not" << N.size()
86  << std::endl;
87 
88  throw OomphLibError(
89  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
90  }
91  if (r.size() != 2)
92  {
93  std::ostringstream error_message;
94  error_message << "Position vector should have dimension 2, not"
95  << r.size() << std::endl;
96 
97  throw OomphLibError(
98  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
99  }
100 
101  if (s.size() != 1)
102  {
103  std::ostringstream error_message;
104  error_message << "Local coordinate should have dimension 1, not"
105  << s.size() << std::endl;
106 
107  throw OomphLibError(
108  error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
109  }
110 #endif
111 
112  // Set the dimension of the global coordinates
113  unsigned n_dim = Undeformed_beam_pt->ndim();
114 
115  // Set the number of lagrangian coordinates
116  unsigned n_lagrangian = Undeformed_beam_pt->nlagrangian();
117 
118  // Find out how many nodes there are
119  unsigned n_node = nnode();
120 
121  // Find out how many positional dofs there are
122  unsigned n_position_type = nnodal_position_type();
123 
124  // Set up memory for the shape functions:
125 
126  // # of nodes, # of positional dofs
127  Shape psi(n_node, n_position_type);
128 
129  // # of nodes, # of positional dofs, # of lagrangian coords (for deriv)
130  DShape dpsidxi(n_node, n_position_type, n_lagrangian);
131 
132  // Call the derivatives of the shape functions w.r.t. Lagrangian coords
133  dshape_lagrangian(s, psi, dpsidxi);
134 
135  // Base Vector
136  DenseMatrix<double> interpolated_A(n_lagrangian, n_dim);
137 
138  // Initialise to zero
139 
140  // Loop over coordinate directions/components of Vector
141  for (unsigned i = 0; i < n_dim; i++)
142  {
143  r[i] = 0.0;
144  // Loop over derivatives/base Vectors (just one here)
145  for (unsigned j = 0; j < n_lagrangian; j++)
146  {
147  interpolated_A(j, i) = 0.0;
148  }
149  }
150 
151  // Loop over directions
152  for (unsigned i = 0; i < n_dim; i++)
153  {
154  // Loop over nodes
155  for (unsigned l = 0; l < n_node; l++)
156  {
157  // Loop over positional dofs
158  for (unsigned k = 0; k < n_position_type; k++)
159  {
160  r[i] += raw_nodal_position_gen(l, k, i) * psi(l, k);
161 
162  // Loop over derivative directions (just one here)
163  for (unsigned j = 0; j < n_lagrangian; j++)
164  {
165  interpolated_A(j, i) +=
166  raw_nodal_position_gen(l, k, i) * dpsidxi(l, k, j);
167  }
168  }
169  }
170  }
171 
172  // Calculate the length of the normal vector
173  double length = pow(interpolated_A(0, 0), 2) + pow(interpolated_A(0, 1), 2);
174 
175  // Calculate the normal
176  N[0] = -interpolated_A(0, 1) / sqrt(length);
177  N[1] = interpolated_A(0, 0) / sqrt(length);
178  }
double dshape_lagrangian(const Vector< double > &s, Shape &psi, DShape &dpsidxi) const
Definition: elements.cc:6710
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625

References oomph::SolidFiniteElement::dshape_lagrangian(), i, j, k, N, oomph::GeomObject::ndim(), oomph::GeomObject::nlagrangian(), oomph::FiniteElement::nnodal_position_type(), oomph::FiniteElement::nnode(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, Eigen::bfloat16_impl::pow(), UniformPSDSelfTest::r, oomph::FiniteElement::raw_nodal_position_gen(), s, sqrt(), and Undeformed_beam_pt.

◆ h()

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

Return the non-dimensional wall thickness.

216  {
217  return *H_pt;
218  }

References H_pt.

Referenced by fill_in_contribution_to_residuals_beam(), and get_energy().

◆ h_pt()

◆ lambda_sq()

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

Return the timescale ratio (non-dimensional density)

222  {
223  return *Lambda_sq_pt;
224  }

References Lambda_sq_pt.

Referenced by fill_in_contribution_to_residuals_beam(), and get_energy().

◆ lambda_sq_pt()

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

◆ load_vector()

virtual void oomph::KirchhoffLoveBeamEquations::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. and Eulerian 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::FSIHermiteBeamElement.

188  {
189  Load_vector_fct_pt(xi, x, N, load);
190  }
void load(Archive &ar, ParticleHandler &handl)
Definition: Particles.h:21
list x
Definition: plotDoE.py:28

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

Referenced by fill_in_contribution_to_residuals_beam().

◆ sigma0()

const double& oomph::KirchhoffLoveBeamEquations::sigma0 ( ) const
inline

Return the axial prestress.

228  {
229  return *Sigma0_pt;
230  }

References Sigma0_pt.

Referenced by fill_in_contribution_to_residuals_beam(), and get_energy().

◆ sigma0_pt()

double*& oomph::KirchhoffLoveBeamEquations::sigma0_pt ( )
inline

◆ undeformed_beam_pt()

◆ Unit_profile_fct()

void oomph::KirchhoffLoveBeamEquations::Unit_profile_fct ( const Vector< double > &  xi,
const Vector< double > &  x,
double h_ratio 
)
staticprotected

Default profile function (constant thickness 'h_0')

Default wall profile function (constant thickness h_0)

69  {
70  h_ratio = 1.0;
71  }

Referenced by KirchhoffLoveBeamEquations().

◆ wall_profile()

void oomph::KirchhoffLoveBeamEquations::wall_profile ( const Vector< double > &  xi,
const Vector< double > &  x,
double h_ratio 
)
inline

Get the wall profile: Pass Lagrangian & Eulerian coordinate and return the wall profile (not all of the input arguments will be required for all specific thickness functions but the list should cover all cases).

208  {
209  Wall_profile_fct_pt(xi, x, h_ratio);
210  }

References Wall_profile_fct_pt, and plotDoE::x.

Referenced by fill_in_contribution_to_residuals_beam(), and get_energy().

◆ Zero_traction_fct()

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

Default load function (zero traction)

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

References i, and load().

Referenced by KirchhoffLoveBeamEquations().

Member Data Documentation

◆ Default_h_value

double oomph::KirchhoffLoveBeamEquations::Default_h_value = 0.05
staticprivate

Static default value for non-dim wall thickness.

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

Referenced by KirchhoffLoveBeamEquations().

◆ Default_lambda_sq_value

double oomph::KirchhoffLoveBeamEquations::Default_lambda_sq_value = 1.0
staticprivate

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

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

Referenced by KirchhoffLoveBeamEquations().

◆ Default_sigma0_value

double oomph::KirchhoffLoveBeamEquations::Default_sigma0_value = 0.0
staticprivate

Static default value for 2nd Piola Kirchhoff prestress.

Static default value for 2nd Piola Kirchhoff prestress (zero)

Referenced by KirchhoffLoveBeamEquations().

◆ H_pt

double* oomph::KirchhoffLoveBeamEquations::H_pt
private

Pointer to wall thickness.

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

◆ Lambda_sq_pt

double* oomph::KirchhoffLoveBeamEquations::Lambda_sq_pt
private

Pointer to Timescale ratio (non-dim. density)

Referenced by KirchhoffLoveBeamEquations(), 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::KirchhoffLoveBeamEquations::load_vector_fct_pt()
inline

◆ Load_vector_fct_pt

void(* oomph::KirchhoffLoveBeamEquations::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 KirchhoffLoveBeamEquations(), load_vector(), and oomph::FSIHermiteBeamElement::load_vector().

◆ Sigma0_pt

double* oomph::KirchhoffLoveBeamEquations::Sigma0_pt
private

Pointer to axial prestress.

Referenced by KirchhoffLoveBeamEquations(), sigma0(), and sigma0_pt().

◆ Undeformed_beam_pt

GeomObject* oomph::KirchhoffLoveBeamEquations::Undeformed_beam_pt
protected

◆ wall_profile_fct_pt

void(*&)(const Vector<double>& xi, const Vector<double>& x, double& h_ratio) oomph::KirchhoffLoveBeamEquations::wall_profile_fct_pt()
inline

Reference to the wall thickness ratio profile function pointer.

196  {
197  return Wall_profile_fct_pt;
198  }

◆ Wall_profile_fct_pt

void(* oomph::KirchhoffLoveBeamEquations::Wall_profile_fct_pt) (const Vector< double > &xi, const Vector< double > &x, double &h_ratio)
protected

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

Referenced by KirchhoffLoveBeamEquations(), and wall_profile().


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