FEDEM Solver  R8.0
Source code of the dynamics solver
Functions/Subroutines
modesroutinesmodule Module Reference

Module with subroutines for the system-level eigenvalue analysis. More...

Functions/Subroutines

subroutine, public alloceigenmatrices (modes, neq, ierr)
 Allocates internal work arrays used by the eigenvalue solver. More...
 
subroutine filleigensystem (modes, neq, M, C, K, ierr)
 Builds the full matrices of the generalized eigenvalue problem. More...
 
subroutine bubbelsort (V, ind)
 Sorts a real array in ascending order. More...
 
subroutine findrealeigenvalues (sam, modes, normFactor, modeOrder, iprint, io, ierr)
 Extracts the real eigenvalues and associated eigenvectors. More...
 
subroutine findeigenvalues (sam, modes, iprint, io, ierr)
 Extracts the complex eigenvalues and associated eigenvectors. More...
 
subroutine, public printmodes (sam, modes, time, iprint, io)
 Prints the eigenvalues and eigenvectors to unit IO. More...
 
subroutine, public eigenmodes (sam, modes, sys, mech, iprint, ierr)
 Calculate damped or undamped eigenvalues and eigenvectors. More...
 
subroutine modalmasses (sups, modes, sam, eigVectors, normFactors, modeOrder, ierr)
 Calculates effective modal masses for the eigenmodes. More...
 
subroutine addunitdisplvector (samData, iel, eV, sysV, ierr)
 Adds an element unit displacement vector into the system vector. More...
 
subroutine, public exportmodes (yamlFile, modelFile, modes, triads, sups, istep, time, ierr)
 Exports mode shapes with associated beam section forces to YAML. More...
 
subroutine writeyamlheader (iYaml, prog, modelFile, istep, time)
 Writes the header of a YAML frequency response file. More...
 
subroutine writeyamldispl (iYaml, triads, iMod, eigVal, eigVec)
 Writes the mode shape eigenvector to a YAML frequency response file. More...
 
subroutine writeyamlforces (iYaml, sups, scale, iDbg, ierr)
 Writes beam sectional forces to a YAML frequency response file. More...
 

Detailed Description

Module with subroutines for the system-level eigenvalue analysis.

Author
Knut Morten Okstad
Date
23 Mar 2000

Function/Subroutine Documentation

◆ addunitdisplvector()

subroutine modesroutinesmodule::addunitdisplvector ( type(samtype), intent(in)  samData,
integer, intent(in)  iel,
real(dp), dimension(:,:), intent(in)  eV,
real(dp), dimension(:,:), intent(inout)  sysV,
integer, intent(out)  ierr 
)

Adds an element unit displacement vector into the system vector.

Parameters
[in]samDataData for managing system matrix assembly
[in]ielElement index
[in]eVElement displacement vector
sysVSystem displacement vector
[out]ierrError flag
Author
Leif Ivar Myklebust
Date
2 Jul 2003
Here is the caller graph for this function:

◆ alloceigenmatrices()

subroutine, public modesroutinesmodule::alloceigenmatrices ( type(modestype), intent(inout)  modes,
integer, intent(in), optional  neq,
integer, intent(out), optional  ierr 
)

Allocates internal work arrays used by the eigenvalue solver.

Parameters
modesEigenmode data container
[in]neqNumber of equations, i.e., dimension of system matrices
[out]ierrError flag
Here is the caller graph for this function:

◆ bubbelsort()

subroutine modesroutinesmodule::bubbelsort ( real(dp), dimension(:), intent(in)  V,
integer, dimension(:), intent(inout)  ind 
)

Sorts a real array in ascending order.

Parameters
[in]VArray of real values to sort
indArray of indices defining the sorted order
Here is the caller graph for this function:

◆ eigenmodes()

subroutine, public modesroutinesmodule::eigenmodes ( type(samtype), intent(in)  sam,
type(modestype), intent(inout)  modes,
type(systemtype), intent(inout)  sys,
type(mechanismtype), intent(inout)  mech,
integer, intent(in)  iprint,
integer, intent(out)  ierr 
)

Calculate damped or undamped eigenvalues and eigenvectors.

Parameters
[in]samData for managing system matrix assembly
modesEigenmode data
sysSystem level model data
mechMechanism components of the model
[in]iprintPrint switch for additional output
[out]ierrError flag

This is the main driver of the system-level eigenvalue analysis. The parameter modestypemodule::modestype::solver determines which actual subroutine to be used, as follows:

  • 0 : Use SPRLAN (undamped systems only)
  • 1 : Use LANCZ1 (undamped systems only)
  • 2 : Use LANCZ2 (undamped systems only)
  • 3 : Use LAPACK::DGGEVX (undamped system)
  • 4 : Use LAPACK::DGGEVX (damped system)
  • 5 : Use LAPACK::DSYGVX (symmetric system)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportmodes()

subroutine, public modesroutinesmodule::exportmodes ( character(len=*), intent(in)  yamlFile,
character(len=*), intent(in)  modelFile,
type(modestype), intent(in)  modes,
type(triadtype), dimension(:), intent(inout)  triads,
type(supeltype), dimension(:), intent(inout)  sups,
integer(i8), intent(in)  istep,
real(dp), intent(in)  time,
integer, intent(out)  ierr 
)

Exports mode shapes with associated beam section forces to YAML.

Parameters
[in]yamlFileName of the YAML-file top write
[in]modelFileName of the model file
[in]modesEigenmode data
triadsAll triads in the model
supsAll superelements in the model
[in]iStepTime increment counter
[in]timeCurrent simulation time
[out]ierrError flag
Author
Knut Morten Okstad
Date
21 Jun 2017
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filleigensystem()

subroutine modesroutinesmodule::filleigensystem ( type(modestype), intent(inout)  modes,
integer, intent(in)  neq,
type(sysmatrixtype), intent(in)  M,
type(sysmatrixtype), intent(in)  C,
type(sysmatrixtype), intent(in)  K,
integer, intent(out)  ierr 
)

Builds the full matrices of the generalized eigenvalue problem.

Parameters
modesEigenmode data container
[in]neqNumber of equations, i.e., dimension of system matrices
[in]MSystem mass matrix
[in]CSystem damping matrix
[in]KSystem stiffness matrix
[out]ierrError flag

The generalized eigenvalue problem is on the form A z = λ B z

With damping:

     | K  0 |*{z} = lambda * | -C -M |*{z}
     | 0 -M |                | -M  0 |

Without damping:

     [K]*{z} = lambda*[M]*{z}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findeigenvalues()

subroutine modesroutinesmodule::findeigenvalues ( type(samtype), intent(in)  sam,
type(modestype), intent(inout)  modes,
integer, intent(in)  iprint,
integer, intent(in)  io,
integer, intent(out)  ierr 
)

Extracts the complex eigenvalues and associated eigenvectors.

Parameters
[in]samData for managing system matrix assembly
modesEigenmode data
[in]iprintPrint switch for additional output
[in]ioFile unit number to write to
[out]ierrError flag
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findrealeigenvalues()

subroutine modesroutinesmodule::findrealeigenvalues ( type(samtype), intent(in)  sam,
type(modestype), intent(inout)  modes,
real(dp), dimension(:), intent(out)  normFactor,
integer, dimension(:), intent(out)  modeOrder,
integer, intent(in)  iprint,
integer, intent(in)  io,
integer, intent(out)  ierr 
)
private

Extracts the real eigenvalues and associated eigenvectors.

Parameters
[in]samData for managing system matrix assembly
modesEigenmode data
[out]normFactorScaling factors for normalizing the eigenmode shapes
[out]modeOrderOrder of the modes with respect to eigenfrequency
[in]iprintPrint switch for additional output
[in]ioFile unit number to write to
[out]ierrError flag
Here is the call graph for this function:
Here is the caller graph for this function:

◆ modalmasses()

subroutine modesroutinesmodule::modalmasses ( type(supeltype), dimension(:), intent(in)  sups,
type(modestype), intent(inout)  modes,
type(samtype), intent(in)  sam,
real(dp), dimension(:,:), intent(in)  eigVectors,
real(dp), dimension(:), intent(in)  normFactors,
integer, dimension(:), intent(in)  modeOrder,
integer, intent(out)  ierr 
)

Calculates effective modal masses for the eigenmodes.

Parameters
[in]supsAll superelements in the model
modesEigenmode data
[in]samData for managing system matrix assembly
[in]eigVectorsThe eigenvectors
[in]normFactorsScaling factors for normalizing the eigenmode shapes
[in]modeOrderOrder of the modes with respect to eigenfrequency
[out]ierrError flag

This subroutine is used to judge the significance of each vibration mode for each translation- and rotation component. Modes with relatively high effective masses can be readily excited by base exitation in the actual direction, while modes with lower effective masses may not be that critical. This is a commonly used feature, e.g. in NASTRAN.

The calculation is as follows:

[temp] = [Φ]^t[M]*[R]

M_eff(i,j) = temp(i,j)^2

where the eigenvector matrix, [Φ], is transposed and assumed to be mass-normalized, [M] is the compact mass matrix, and [R] is the influence matrix representing a rigid body unit displacement of the mechanism. Finally, [M_eff] is a nModes×6 matrix of the effective modal masses. The results are stored in modestypemodule::modestype::effmass.

Todo:
It works now for LANCZ2 and for the -undamped solvers (although I encountered something that looks like a bug in the -undamped calculation of the eigenvectors). Furthermore, local orientation of triads are not (yet) taken into account, but should normally not be critical as long as the local triad masses are the same in all coordinate directions (for inertias it will induce errors, however). Component modes seems to be treated correctly, but has not been tested too much. Some more elegance could also be put into the creation of unit displacement vectors, just to make sure that all kinds of joints and boundary conditions are treated correctly. In fact, there might be a better and easier solution to this than the approach I have used here.
Author
Leif Ivar Myklebust
Date
2 Jul 2003
Here is the call graph for this function:
Here is the caller graph for this function:

◆ printmodes()

subroutine, public modesroutinesmodule::printmodes ( type(samtype), intent(in)  sam,
type(modestype), intent(in)  modes,
real(dp), intent(in)  time,
integer, intent(in)  iprint,
integer, intent(in)  io 
)

Prints the eigenvalues and eigenvectors to unit IO.

Parameters
[in]samData for managing system matrix assembly
modesEigenmode data
[in]timeCurrent simulation time
[in]iprintPrint switch for additional output
[in]ioFile unit number to write to
Here is the caller graph for this function:

◆ writeyamldispl()

subroutine modesroutinesmodule::writeyamldispl ( integer, intent(in)  iYaml,
type(triadtype), dimension(:), intent(in)  triads,
integer, intent(in)  iMod,
real(dp), intent(in)  eigVal,
real(dp), dimension(:), intent(in)  eigVec 
)

Writes the mode shape eigenvector to a YAML frequency response file.

Parameters
[in]iYamlFile unit number of the YAML-file to write
[in]triadsAll triads in the model
[in]iModMode shape index
[in]eigValAssociated eigenvalue
[in]eigVecAssociated eigenvector
Author
Knut Morten Okstad
Date
21 Jun 2017
Here is the caller graph for this function:

◆ writeyamlforces()

subroutine modesroutinesmodule::writeyamlforces ( integer, intent(in)  iYaml,
type(supeltype), dimension(:), intent(inout)  sups,
real(dp), intent(in)  scale,
integer, intent(in)  iDbg,
integer, intent(out)  ierr 
)

Writes beam sectional forces to a YAML frequency response file.

Parameters
[in]iYamlFile unit number of the YAML-file to write
supsAll superelements in the model
[in]scaleScaling factor for the eigenvector
[in]iDbgFile unit number of debug output
[in]ierrError flag
Author
Knut Morten Okstad
Date
/rev 21 Jun 2017
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeyamlheader()

subroutine modesroutinesmodule::writeyamlheader ( integer, intent(in)  iYaml,
character(len=*), intent(in)  prog,
character(len=*), intent(in)  modelFile,
integer(i8), intent(in)  istep,
real(dp), intent(in)  time 
)
private

Writes the header of a YAML frequency response file.

Parameters
[in]iYamlFile unit number of the YAML-file to write
[in]progProgram name
[in]modelFileName of the model file
[in]iStepTime increment counter
[in]timeCurrent simulation time
Author
Knut Morten Okstad
Date
/rev 21 Jun 2017
Here is the call graph for this function:
Here is the caller graph for this function: