truss_element_2d Derived Type

type, public, extends(line_element) :: truss_element_2d

Defines a pin-jointed 2D bar with x and y translations per node. Use the parent mass_matrix and the global axial stiffness override.


Contents


Components

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

The element cross-sectional area.

type(material), public :: material

The material.

type(node), public :: node_1

The node at natural coordinate s = -1.

type(node), public :: node_2

The node at natural coordinate s = 1.


Constructor

public interface truss_element_2d

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

    Initializes a [[truss_element_2d]].

    Arguments

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

    The elastic material and density.

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

    The cross-sectional area.

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

    The first and second truss nodes.

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

    The first and second truss nodes.

    Return Value type(truss_element_2d)

    The initialized planar truss element.


Type-Bound Procedures

procedure, public :: constitutive_matrix => t2d_constitutive_matrix

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

    Maps axial strain to axial force (E A times strain).

    Arguments

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

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

procedure, public :: evaluate_shape_function => t2d_shape_function

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

    Linear interpolation in the natural coordinate -1 <= s <= 1.

    Arguments

    Type IntentOptional Attributes Name
    class(truss_element_2d), intent(in) :: this
    integer(kind=int32), intent(in) :: i
    real(kind=real64), intent(in), dimension(:) :: s

    Return Value real(kind=real64)

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 => t2d_dimensionality

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

    Arguments

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

    Return Value integer(kind=int32)

procedure, public :: get_dof_per_node => t2d_dof_per_node

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

    Arguments

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

    Return Value integer(kind=int32)

procedure, public :: get_node => t2d_get_node

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

    Arguments

    Type IntentOptional Attributes Name
    class(truss_element_2d), intent(in) :: this
    integer(kind=int32), intent(in) :: i

    Return Value type(node)

procedure, public :: get_node_count => t2d_node_count

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

    Arguments

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

    Return Value integer(kind=int32)

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 => t2d_terminal_nodes

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

    Arguments

    Type IntentOptional Attributes Name
    class(truss_element_2d), intent(in) :: this
    integer(kind=int32), intent(out) :: i1
    integer(kind=int32), intent(out) :: i2

procedure, public :: jacobian => t2d_jacobian

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

    The natural-to-physical coordinate Jacobian is L/2.

    Arguments

    Type IntentOptional Attributes Name
    class(truss_element_2d), intent(in) :: this
    real(kind=real64), intent(in), dimension(:) :: s

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

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 => le_mass_matrix

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

    Computes the mass matrix for the element.

    Arguments

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

    The line_element object.

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

    The optional numerical integration rule.

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

    The resulting matrix.

procedure, public :: rotation_matrix => t2d_rotation_matrix

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

    Maps local translations to global translations at each node.

    Arguments

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

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

procedure, public :: shape_function_matrix => t2d_shape_matrix

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

    Computes the two-component linear displacement interpolation matrix.

    Arguments

    Type IntentOptional Attributes Name
    class(truss_element_2d), intent(in) :: this
    real(kind=real64), intent(in), dimension(:) :: s

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

procedure, public :: stiffness_matrix => t2d_stiffness_matrix

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

    Global axial stiffness K = (E A/L) b b^T, where b = [-n, n].

    Arguments

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

    The planar truss element.

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

    The integration rule is accepted for compatibility; stiffness is exact.

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

    The 4-by-4 global translational stiffness 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 => t2d_strain_matrix

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

    Local axial strain is (u_2 - u_1) / L.

    Arguments

    Type IntentOptional Attributes Name
    class(truss_element_2d), intent(in) :: this
    real(kind=real64), intent(in), dimension(:) :: s

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

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.