beam_element_2d Derived Type

type, public, extends(line_element) :: beam_element_2d

Defines a two-dimensional Bernoulli-Euler beam element.

Beam element coordinate systems

The local x-axis runs from node 1 to node 2. The local z-axis is normal to the 2D element plane.


Contents


Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: area

The element cross-sectional area.

type(material), public :: material

The material.

real(kind=real64), public :: moment_of_inertia

The beam moment of inertia (second moment of area).

type(node), public :: node_1

The first node of the element (s = -1).

type(node), public :: node_2

The second node of the element (s = 1).


Constructor

public interface beam_element_2d

  • private pure function b2d_init(mat, area, moi, nd1, nd2) result(rst)

    Initializes a new [[beam_element_2d]].

    Arguments

    Type IntentOptional Attributes Name
    class(material), intent(in) :: mat

    The material.

    real(kind=real64), intent(in) :: area

    The cross-sectional area.

    real(kind=real64), intent(in) :: moi

    The moment-of-inertia.

    class(node), intent(in) :: nd1

    Node 1 of the element.

    class(node), intent(in) :: nd2

    Node 2 of the element.

    Return Value type(beam_element_2d)

    The new [[beam_element_2d]].


Type-Bound Procedures

procedure, public :: bending_moment => b2d_bending_moment

  • private pure function b2d_bending_moment(this, displacement, s) result(rst)

    Computes the local bending moment at the specified natural coordinate.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam element.

    real(kind=real64), intent(in), dimension(:) :: displacement

    The element displacement vector in the global coordinate system.

    real(kind=real64), intent(in), dimension(:) :: s

    The natural coordinate at which to evaluate the moment.

    Return Value real(kind=real64)

    The local bending moment.

procedure, public :: constitutive_matrix => b2d_constitutive_matrix

  • private pure function b2d_constitutive_matrix(this) result(rst)

    Computes the constitutive matrix for the element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The resulting matrix.

procedure, public :: evaluate_shape_function => b2d_shape_function

  • private pure function b2d_shape_function(this, i, s) result(rst)

    Evaluates the i-th shape function at natural coordinate s.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    integer(kind=int32), intent(in) :: i

    The index of the shape function to evaluate.

    real(kind=real64), intent(in), dimension(:) :: s

    The value of the natural coordinate at which to evaluate the shape function.

    Return Value real(kind=real64)

    The value of the i-th shape function at s.

procedure, public :: external_force_vector => le_ext_force_vector

  • private pure function le_ext_force_vector(this, q, rule) result(rst)

    Computes the external force vector for the element.

    Arguments

    Type IntentOptional Attributes Name
    class(line_element), intent(in) :: this

    The line_element object.

    real(kind=real64), intent(in), dimension(:) :: q

    The surface traction or body-force vector.

    integer(kind=int32), intent(in), optional :: rule

    The optional numerical integration rule.

    Return Value real(kind=real64), allocatable, dimension(:)

    The resulting vector.

procedure, public :: get_dimensionality => b2d_dimensionality

  • private pure function b2d_dimensionality(this) result(rst)

    Gets the dimensionality of the element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    Return Value integer(kind=int32)

    The dimensionality.

procedure, public :: get_dof_per_node => b2d_dof_per_node

  • private pure function b2d_dof_per_node(this) result(rst)

    Gets the number of degrees of freedom per node.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    Return Value integer(kind=int32)

    The number of DOF per node.

procedure, public :: get_node => b2d_get_node

  • private pure function b2d_get_node(this, i) result(rst)

    Gets the requested node from the element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    integer(kind=int32), intent(in) :: i

    The local index of the node to retrieve.

    Return Value type(node)

    The requested node.

procedure, public :: get_node_count => b2d_get_node_count

  • private pure function b2d_get_node_count(this) result(rst)

    Gets the number of nodes for the element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    Return Value integer(kind=int32)

    The number of nodes.

procedure, public :: get_node_natural_coordinates => le_get_node_natural_coordinates

  • private pure function le_get_node_natural_coordinates(this, i) result(rst)

    Returns the natural coordinate of a terminal node.

    Arguments

    Type IntentOptional Attributes Name
    class(line_element), intent(in) :: this

    The line_element object.

    integer(kind=int32), intent(in) :: i

    The local node index.

    Return Value real(kind=real64), allocatable, dimension(:)

    The natural coordinate of the node.

procedure, public :: get_terminal_nodes => b2d_terminal_nodes

  • private pure subroutine b2d_terminal_nodes(this, i1, i2)

    Gets the terminal node numbers for the element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    integer(kind=int32), intent(out) :: i1

    The index of the node at the head of the element.

    integer(kind=int32), intent(out) :: i2

    The index of the node at the tail of the element.

procedure, public :: jacobian => b2d_jacobian

  • private pure function b2d_jacobian(this, s) result(rst)

    Computes the Jacobian matrix for a 2D beam element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    real(kind=real64), intent(in), dimension(:) :: s

    The value of the natural coordinate at which to evaluate the matrix.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The Jacobian matrix.

procedure, public :: length => le_length

  • private pure function le_length(this) result(rst)

    Computes the length of the line_element.

    Arguments

    Type IntentOptional Attributes Name
    class(line_element), intent(in) :: this

    The line_element object.

    Return Value real(kind=real64)

    The length of the line element.

procedure, public :: mass_matrix => b2d_mass_matrix

  • private pure function b2d_mass_matrix(this, rule) result(rst)

    Computes the mass matrix for the element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    integer(kind=int32), intent(in), optional :: rule

    The integration rule. The rule must be one of the following:

    • MECH_ONE_POINT_INTEGRATION_RULE

    • MECH_TWO_POINT_INTEGRATION_RULE

    • MECH_THREE_POINT_INTEGRATION_RULE

    • MECH_FOUR_POINT_INTEGRATION_RULE

    The default integration rule is MECH_TWO_POINT_INTEGRATION_RULE.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The resulting matrix.

procedure, public :: rotation_matrix => b2d_rotation_matrix

  • private pure function b2d_rotation_matrix(this) result(rst)

    Computes the rotation matrix for the element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The resulting 6-by-6 rotation matrix.

procedure, public :: shape_function_matrix => b2d_shape_function_matrix_2d

  • private pure function b2d_shape_function_matrix_2d(this, s) result(rst)

    Computes the shape function matrix for a beam element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    real(kind=real64), intent(in), dimension(:) :: s

    The value of the natural coordinate at which to evaluate the shape functions.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The shape function matrix.

procedure, public :: shear_force => b2d_shear_force

  • private pure function b2d_shear_force(this, displacement, s) result(rst)

    Computes the local shear force at the specified natural coordinate. The sign convention is the derivative of the local bending moment with respect to the local element coordinate.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam element.

    real(kind=real64), intent(in), dimension(:) :: displacement

    The element displacement vector in the global coordinate system.

    real(kind=real64), intent(in), dimension(:) :: s

    The natural coordinate at which to evaluate the shear force.

    Return Value real(kind=real64)

    The local shear force.

procedure, public :: stiffness_matrix => b2d_stiffness_matrix

  • private pure function b2d_stiffness_matrix(this, rule) result(rst)

    Computes the stiffness matrix for the element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    integer(kind=int32), intent(in), optional :: rule

    The integration rule. The rule must be one of the following:

    • MECH_ONE_POINT_INTEGRATION_RULE

    • MECH_TWO_POINT_INTEGRATION_RULE

    • MECH_THREE_POINT_INTEGRATION_RULE

    • MECH_FOUR_POINT_INTEGRATION_RULE

    The default integration rule is MECH_TWO_POINT_INTEGRATION_RULE.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The resulting matrix.

procedure, public :: strain => le_strain

  • private pure function le_strain(this, displacement, s) result(rst)

    Computes the line-element strain from global element displacements at the specified natural coordinate.

    Arguments

    Type IntentOptional Attributes Name
    class(line_element), intent(in) :: this

    The line_element object.

    real(kind=real64), intent(in), dimension(:) :: displacement

    The element displacement vector in the global coordinate system.

    real(kind=real64), intent(in), dimension(:) :: s

    The natural coordinates at which to evaluate the strain.

    Return Value real(kind=real64), allocatable, dimension(:)

    The resulting strain vector in the element coordinate system.

procedure, public :: strain_displacement_matrix => b2d_strain_disp_matrix_2d

  • private pure function b2d_strain_disp_matrix_2d(this, s) result(rst)

    Computes the strain-displacement matrix for a 2D beam element.

    Arguments

    Type IntentOptional Attributes Name
    class(beam_element_2d), intent(in) :: this

    The beam_element_2d object.

    real(kind=real64), intent(in), dimension(:) :: s

    The value of the natural coordinate at which to evaluate the matrix.

    Return Value real(kind=real64), allocatable, dimension(:,:)

    The strain-displacement matrix.

procedure, public :: stress => le_stress

  • private pure function le_stress(this, displacement, s) result(rst)

    Computes the line-element stress result from global element displacements at the specified natural coordinate.

    Arguments

    Type IntentOptional Attributes Name
    class(line_element), intent(in) :: this

    The line_element object.

    real(kind=real64), intent(in), dimension(:) :: displacement

    The element displacement vector in the global coordinate system.

    real(kind=real64), intent(in), dimension(:) :: s

    The natural coordinates at which to evaluate the stress.

    Return Value real(kind=real64), allocatable, dimension(:)

    The resulting stress vector in the element coordinate system.