FEDEM Solver  R8.0
Source code of the dynamics solver
Data Types | Functions/Subroutines | Variables
springroutinesmodule Module Reference

Module with subroutines for spring calculations. More...

Data Types

interface  addinspringforces
 Assembles system force vector contributions from a spring element. More...
 

Functions/Subroutines

subroutine, public updatesprings (springs, joints, restart, ierr, updateLength, updateVar)
 Update all springs in the model. More...
 
subroutine updatespringinterconn (springEl, includeStressStiff, ierr)
 Corrects spring force and stiffness according to interconnectivity. More...
 
subroutine, public updatespringyields (yields, ierr)
 Updates the spring yield variables. More...
 
subroutine calcspringforces (spr, triads, sDir, eV)
 Calculates system force vector contributions from a spring element. More...
 
subroutine calcspringstiffness (spr, triads, sDir, cplStiff, scaleK, eM, includeStressStiff, haveStiffness)
 Calculates the stiffness matrix contributions from a spring element. More...
 
subroutine couplespringforces (spr, cplStiff)
 Updates spring element forces due to explicit coupling. More...
 
subroutine couplespringstiffness (spr, cplStiff, elMat, scaleK, d1)
 Updates a spring element stiffness matrix due to explicit coupling. More...
 
subroutine addinstiffnessforces (FS, RF, spring, sam, ierr)
 Assembles system force vector contributions from a spring element. More...
 
subroutine addindampingforces (FD, RF, spring, sam, alpha2, ierr)
 Assembles system force vector contributions from a spring element. More...
 
subroutine, public addinspringstiffmat (includeStressStiff, scaleK, Nmat, spring, sam, ierr, Rhs)
 Assembles system stiffness contributions from a spring element. More...
 

Variables

integer, parameter maxdofs_p = 60
 Max number of DOFs pr element. More...
 
real(dp), parameter epszero_p = 1.0e-16_dp
 Equal to zero tolerance. More...
 

Detailed Description

Module with subroutines for spring calculations.

This module contains a set of subroutines for performing various computation tasks on the springtypemodule::springtype objects in the model (axial- and joint spring) during the dynamic or quasi-static simulation.

Function/Subroutine Documentation

◆ addindampingforces()

subroutine springroutinesmodule::addindampingforces ( real(dp), dimension(:), intent(inout)  FD,
real(dp), dimension(:), intent(inout)  RF,
type(springtype), intent(in)  spring,
type(samtype), intent(in)  sam,
real(dp), intent(in)  alpha2,
integer, intent(inout)  ierr 
)

Assembles system force vector contributions from a spring element.

Parameters
FDSystem damping force vector
RFSystem reaction forces associated with constrained DOFs
[in]springThe spring element to calculate damping forces for
[in]samData for managing system matrix assembly
[in]alpha2Stiffness-proportional damping coefficient
[out]ierrError flag

This subroutine calculates the damping force contributions to the system force vector from the spring element assuming Rayleigh damping, and adds them into the system vectors FD and RF.

Author
Knut Morten Okstad
Date
31 Oct 2014

◆ addinspringstiffmat()

subroutine, public springroutinesmodule::addinspringstiffmat ( logical, intent(in)  includeStressStiff,
real(dp), intent(in)  scaleK,
type(sysmatrixtype), intent(inout)  Nmat,
type(springtype), intent(in)  spring,
type(samtype), intent(in)  sam,
integer, intent(out)  ierr,
real(dp), dimension(:), intent(inout), optional  Rhs 
)

Assembles system stiffness contributions from a spring element.

Parameters
[in]includeStressStiffIf .true., include geometric stiffness
[in]scaleKStiffness matrix scaling factor
NmatSystem newton matrix
[in]springThe spring element to calculate stiffness matrix for
[in]samData for managing system matrix assembly
[out]ierrError flag
RhsSystem right-hand-side vector associated with the Newton matrix

This subroutine calculates the stiffness matrix for a spring element and adds it into the system Newton matrix Nmat, multiplied by a scaling factor, scaleK.

Author
Karl Erik Thoresen
Date
Feb 1999
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addinstiffnessforces()

subroutine springroutinesmodule::addinstiffnessforces ( real(dp), dimension(:), intent(inout)  FS,
real(dp), dimension(:), intent(inout)  RF,
type(springtype), intent(in)  spring,
type(samtype), intent(in)  sam,
integer, intent(inout)  ierr 
)

Assembles system force vector contributions from a spring element.

Parameters
FSSystem stiffness force vector
RFSystem reaction forces associated with constrained DOFs
[in]springThe spring element to calculate stiffness forces for
[in]samData for managing system matrix assembly
[out]ierrError flag

This subroutine calculates the stiffness force contributions to the system force vector from the spring element, and adds them into the system vectors FS and RF.

Author
Karl Erik Thoresen
Date
Feb 1999

◆ calcspringforces()

subroutine springroutinesmodule::calcspringforces ( type(springptrtype), dimension(:), intent(in)  spr,
type(triadptrtype), dimension(:), intent(in)  triads,
real(dp), dimension(:,:), intent(in)  sDir,
real(dp), dimension(:), intent(out)  eV 
)

Calculates system force vector contributions from a spring element.

Parameters
[in]sprArray of all base springs in current (axial) spring element
[in]triadsArray of triads connected to the axial spring
[in]sDirDirection vector for axial spring
[out]eVElement force vector
Author
Knut Morten Okstad
Date
31 Oct 2014
Here is the caller graph for this function:

◆ calcspringstiffness()

subroutine springroutinesmodule::calcspringstiffness ( type(springptrtype), dimension(:), intent(in)  spr,
type(triadptrtype), dimension(:), intent(in)  triads,
real(dp), dimension(:,:), intent(in)  sDir,
real(dp), dimension(:), intent(in), pointer  cplStiff,
real(dp), intent(in)  scaleK,
real(dp), dimension(:,:), intent(out)  eM,
logical, intent(in)  includeStressStiff,
logical, intent(inout)  haveStiffness 
)

Calculates the stiffness matrix contributions from a spring element.

Parameters
[in]sprArray of all base springs in current (axial) spring element
[in]triadsArray of triads connected to the axial spring
[in]sDirDirection vector for axial spring
[in]cplStiffExplicit coupling stiffness coefficients
[in]scaleKStiffness scaling factor
[out]eMElement stiffness matrix
[in]includeStressStiffIf .true., account for geometric stiffness
haveStiffnessIf .true., a non-zero spring stiffness was detected
Author
Knut Morten Okstad
Date
31 Oct 2014
Here is the call graph for this function:
Here is the caller graph for this function:

◆ couplespringforces()

subroutine springroutinesmodule::couplespringforces ( type(springptrtype), dimension(:), intent(inout)  spr,
real(dp), dimension(:), intent(in)  cplStiff 
)

Updates spring element forces due to explicit coupling.

Parameters
sprArray of all base springs in current (axial) spring element
[in]cplStiffExplicit coupling stiffness coefficients
Author
Knut Morten Okstad
Date
2 Jul 2010
Here is the caller graph for this function:

◆ couplespringstiffness()

subroutine springroutinesmodule::couplespringstiffness ( type(springptrtype), dimension(:), intent(in)  spr,
real(dp), dimension(:), intent(in)  cplStiff,
real(dp), dimension(:,:), intent(inout)  elMat,
real(dp), intent(in)  scaleK,
integer, intent(in), optional  d1 
)

Updates a spring element stiffness matrix due to explicit coupling.

Parameters
sprArray of all base springs in current (axial) spring element
[in]cplStiffExplicit coupling stiffness coefficients
elMatElement stiffness matrix
[in]scaleKStiffness scaling factor
[in]d1Number of DOFs in the first triad connected to spring element
Author
Knut Morten Okstad
Date
2 Jul 2010
Here is the caller graph for this function:

◆ updatespringinterconn()

subroutine springroutinesmodule::updatespringinterconn ( type(springtype), intent(inout)  springEl,
logical, intent(in)  includeStressStiff,
integer, intent(inout)  ierr 
)

Corrects spring force and stiffness according to interconnectivity.

Parameters
springElThe spring element to update stiffness and force for
[in]includeStressStiffIf .true., account for geometric stiffness
ierrError flag
Author
Bjorn Haugen
Date
27 May 2004
Knut Morten Okstad
27 Jun 2014
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatesprings()

subroutine, public springroutinesmodule::updatesprings ( type(springtype), dimension(:), intent(inout)  springs,
type(masterslavejointtype), dimension(:), intent(inout)  joints,
logical, intent(in)  restart,
integer, intent(inout)  ierr,
logical, intent(in), optional  updateLength,
logical, intent(in), optional  updateVar 
)

Update all springs in the model.

Parameters
springsArray of all spring elements in the model
jointsArray of all joints in the model
[in]restartIf .true., axial spring forces are not updated
ierrError flag
[in]updateLengthIf .true. (default), all spring length variables are updated first, before updating the other variables
[in]updateVarIf .true. (default), all spring variables are updated

The length (and direction) of all axial springs are updated first. Then, all the remaining spring variables are updated. This is to ensure that sensors measuring spring length are up to date before they are used by engines. Note that for joint springs, the spring length coincides with the corresponding joint variable of the owner joint and thus needs not to be updated here.

Author
Knut Morten Okstad
Date
11 June 2002
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatespringyields()

subroutine, public springroutinesmodule::updatespringyields ( type(springyieldtype), dimension(:), intent(inout)  yields,
integer, intent(inout)  ierr 
)

Updates the spring yield variables.

Parameters
yieldsArray of all spring yield objects in the model
ierrError flag
Author
Bjorn Haugen
Date
11 Jul 2005
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ epszero_p

real(dp), parameter springroutinesmodule::epszero_p = 1.0e-16_dp
private

Equal to zero tolerance.

◆ maxdofs_p

integer, parameter springroutinesmodule::maxdofs_p = 60
private

Max number of DOFs pr element.