spring_element_2d Derived Type

type, public, extends(spring_element) :: spring_element_2d

Defines a 2D linear, axial spring element with x and y translations at each node.


Contents


Components

Type Visibility Attributes Name Initial
real(kind=real64), public, dimension(3) :: direction = 0.0d0

The unit vector defining the user-supplied element axis. Only the leading components corresponding to the element dimensionality are used. This value is used only if use_direction is true.

type(material), public :: material

The material.

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).

real(kind=real64), public :: stiffness

The spring stiffness.

logical, public :: use_direction = .false.

True if the element axis is defined by direction; else, false if the axis is defined by the vector from node 1 to node 2.


Constructor

public interface spring_element_2d

  • private pure function se2d_init(k, nd1, nd2, direction) result(rst)

    Initializes a new [[spring_element_2d]].

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: k

    The spring stiffness.

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

    The first node of the element.

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

    The second node of the element.

    real(kind=real64), intent(in), optional, dimension(:) :: direction

    An optional 2-element vector defining the spring axis. The vector must be non-zero and is normalized internally. If not supplied, the axis is defined by the vector from node 1 to node 2, in which case the nodes must not be coincident.

    Return Value type(spring_element_2d)

    The new [[spring_element_2d]].


Type-Bound Procedures

procedure, public :: axis => tnde_axis

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

    Gets the unit vector defining the element axis in the global coordinate system.

    Arguments

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

    The two_node_discrete_element object.

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

    The D-element unit vector, where D is the element dimensionality.

procedure, public :: constitutive_matrix => se_constitutive_matrix

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

    Returns the matrix relating spring elongation to spring force.

    Arguments

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

    The spring_element object.

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

    The 1-by-1 matrix containing the spring stiffness.

procedure, public :: damping_matrix => de_damping_matrix

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

    Returns the element damping matrix. The default implementation returns a zero-valued matrix.

    Arguments

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

    The discrete_element object.

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

    The N-by-N damping matrix, where N is the total number of element degrees of freedom.

procedure, public :: evaluate_shape_function => tnde_shape_function

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

    Evaluates the i-th linear shape function

    Arguments

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

    The two_node_discrete_element object.

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

    The index of the shape function to evaluate.

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

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

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

    Returns the element external force vector. Discrete elements do not support distributed loads; therefore, a zero-valued vector is returned. Concentrated loads should be applied directly to the global force vector.

    Arguments

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

    The discrete_element object.

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

    The distributed load vector. This argument is unused and is present for interface compatibility.

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

    The integration rule. This argument is unused and is present for interface compatibility.

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

    The N-element force vector, where N is the total number of element degrees of freedom.

procedure, public :: get_dimensionality => se2d_dimensionality

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

    Gets the dimensionality of the element.

    Arguments

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

    The spring_element_2d object.

    Return Value integer(kind=int32)

    The dimensionality.

procedure, public :: get_dof_per_node => tnde_dof_per_node

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

    Gets the number of degrees of freedom per node. This is equal to the element dimensionality as only translations are considered.

    Arguments

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

    The two_node_discrete_element object.

    Return Value integer(kind=int32)

    The number of DOF per node.

procedure, public :: get_node => tnde_get_node

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

    Gets the requested node from the element.

    Arguments

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

    The two_node_discrete_element object.

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

    The local index of the node to retrieve. This value must be either 1 or 2.

    Return Value type(node)

    The requested node.

procedure, public :: get_node_count => tnde_get_node_count

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

    Gets the number of nodes for the element.

    Arguments

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

    The two_node_discrete_element object.

    Return Value integer(kind=int32)

    The number of nodes.

procedure, public :: get_node_natural_coordinates => de_get_node_natural_coordinates

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

    Returns the natural coordinate of the requested node. A single-node element has its node at s = 0; a two-node element has its nodes at s = -1 and s = 1, respectively.

    Arguments

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

    The discrete_element object.

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

    The local index of the node.

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

    The natural coordinate of the node.

procedure, public :: jacobian => de_jacobian

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

    Returns the element Jacobian. Discrete elements have no spatial extent; therefore, a unit 1-by-1 Jacobian is returned.

    Arguments

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

    The discrete_element object.

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

    The natural coordinates at which to evaluate the Jacobian. This argument is unused and is present for interface compatibility.

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

    The 1-by-1 Jacobian matrix.

procedure, public :: mass_matrix => de_mass_matrix

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

    Returns the element mass matrix. The default implementation returns a zero-valued matrix.

    Arguments

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

    The discrete_element object.

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

    The integration rule. This argument is unused and is present for interface compatibility.

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

    The N-by-N mass matrix, where N is the total number of element degrees of freedom.

procedure, public :: shape_function_matrix => tnde_shape_function_matrix

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

    Computes the translational displacement interpolation matrix

    Arguments

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

    The two_node_discrete_element object.

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

    The natural coordinate at which to evaluate the matrix.

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

    The D-by-2D shape function matrix, where D is the element dimensionality.

procedure, public :: stiffness_matrix => se_stiffness_matrix

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

    Computes the global spring stiffness matrix

    Arguments

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

    The spring_element object.

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

    The integration rule. This argument is unused as the stiffness matrix is exact.

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

    The 2D-by-2D global stiffness matrix, where D is the element dimensionality.

procedure, public :: strain => e_strain

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

    Computes the element strain at the specified natural coordinate. The strain is

    Arguments

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

    The element object.

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

    The element displacement vector in the element 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.

procedure, public :: strain_displacement_matrix => tnde_strain_disp_matrix

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

    Computes the matrix relating global nodal displacements to the axial elongation of the element where is the unit element axis.

    Arguments

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

    The two_node_discrete_element object.

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

    The natural coordinate at which to evaluate the matrix. This argument is unused as the elongation is constant along the element.

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

    The 1-by-2D matrix, where D is the element dimensionality.

procedure, public :: stress => e_stress

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

    Computes the element stress result at the specified natural coordinate. The stress result is

    Arguments

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

    The element object.

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

    The element displacement vector in the element 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.