feigen Module

Stiffness eigenmodes of a single finite element.

An element is a shapefunc from fortran_shapefuncs at the points of a cubature from fortran_cubatures, with nodal coordinates X(dim, nnodes). Degrees of freedom are ordered node by node: u1x, u1y, u2x, u2y, ... Strains use Voigt notation with engineering shear strains, ordered xx, yy, zz, xy, xz, yz. The material is isotropic linear elastic; 2D is plane strain. Eigenvalues are ascending, and those below a relative tolerance are exactly zero, so count(lambda == 0) counts the zero modes.


Uses


Functions

public pure function material(dim, E, nu) result(D)

Isotropic elasticity matrix in Voigt notation: bar (1D), plane strain (2D), solid (3D)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: dim
real(kind=dp), intent(in) :: E
real(kind=dp), intent(in) :: nu

Return Value ../../../real(kind=dp), (dim*(dim+1)/2,dim*(dim+1)/2)

public function stiffness(s, q, X, D) result(K)

Stiffness matrix K = sum_g B^T D B det(J) w_g, dofs ordered node by node

Arguments

Type IntentOptional Attributes Name
type(shapefunc), intent(in) :: s
type(cubature), intent(in) :: q
real(kind=dp), intent(in) :: X(:,:)

nodal coordinates (dim, nnodes)

real(kind=dp), intent(in) :: D(:,:)

elasticity matrix from material

Return Value real(kind=dp), (s%dim*s%nnodes,s%dim*s%nnodes)


Subroutines

public subroutine modes(K, lambda, phi, tol)

Ascending eigenvalues and orthonormal eigenvectors of symmetric K; eigenvalues below tol*max|lambda| (default 1e-10) are set to exactly zero

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: K(:,:)
real(kind=dp), intent(out) :: lambda(:)
real(kind=dp), intent(out) :: phi(:,:)
real(kind=dp), intent(in), optional :: tol

public subroutine name_modes(X, lambda, phi, names, match, tol)

Replace the eigenvectors of each group of equal eigenvalues (within tol*max|lambda|, default 1e-8) by the projections of the best-matching catalog fields onto that eigenspace. match is the cosine between field and eigenspace.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: X(:,:)
real(kind=dp), intent(in) :: lambda(:)
real(kind=dp), intent(inout) :: phi(:,:)
character(len=*), intent(out) :: names(:)
real(kind=dp), intent(out) :: match(:)
real(kind=dp), intent(in), optional :: tol

public subroutine plot_modes(s, X, lambda, phi, names, scale, filename)

Write one PNG, SVG or PDF (chosen by the extension of filename) with a subplot per mode: undeformed (black), deformed (green), nodal displacements (blue)

Arguments

Type IntentOptional Attributes Name
type(shapefunc), intent(in) :: s
real(kind=dp), intent(in) :: X(:,:)
real(kind=dp), intent(in) :: lambda(:)
real(kind=dp), intent(in) :: phi(:,:)
character(len=*), intent(in) :: names(:)
real(kind=dp), intent(in) :: scale

largest displacement relative to the element size

character(len=*), intent(in) :: filename