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

Module with data types representing spring objects. More...

Data Types

type  springfailuretype
 Data type representing a spring failure object. More...
 
type  yieldlimittype
 Data type representing a yield force limit. More...
 
type  springyieldtype
 Data type representing a spring yield object. More...
 
type  springbasetype
 Data type representing a single-DOF base spring object. More...
 
type  springptrtype
 Data type representing a base spring pointer. More...
 
type  springtype
 Data type representing multi-DOF spring element. More...
 
interface  getptrtoid
 Returns pointer to object with specified ID. More...
 
interface  writeobject
 Standard routine for writing an object to file. More...
 
interface  nullifyspring
 Initializes a spring object. More...
 
interface  deallocatesprings
 Deallocates an array of spring objects. More...
 
interface  updateatconvergence
 Updates the state variables pertaining to previous time step. More...
 
interface  restorefromlaststep
 Restores the state variables from the last converged time step. More...
 
interface  checkfailure
 Checks if a spring has passed failure state. More...
 

Functions/Subroutines

type(springtype) function, pointer, private getptrtoidspringelement (array, id)
 Returns pointer to (first) spring element with specified id. More...
 
type(springbasetype) function, pointer, private getptrtoidspringbase (array, id, index)
 Returns pointer to (first) base spring with specified id. More...
 
type(springfailuretype) function, pointer, private getptrtoidspringfailure (array, id, index)
 Returns pointer to (first) spring failure with specified id. More...
 
type(springyieldtype) function, pointer, private getptrtoidspringyield (array, id, index)
 Returns pointer to (first) spring yield with specified id. More...
 
subroutine, private writespringbasetype (spr, io, complexity)
 Standard routine for writing an object to io. More...
 
subroutine, private writespringelementtype (spring, io, complexity)
 Standard routine for writing an object to io. More...
 
subroutine nullifyfailure (failure)
 Initializes a spring failure object. More...
 
subroutine deallocatefailures (fails)
 Deallocates an array of spring failure objects. More...
 
subroutine nullifyyield (yield)
 Initializes a spring yield object. More...
 
subroutine deallocateyields (yields)
 Deallocates an array of spring yield objects. More...
 
subroutine, private nullifyspringbase (spr)
 Initializes a spring base object. More...
 
subroutine, private nullifyspringelement (spring, sprId, nDofs)
 Initializes a spring element. More...
 
subroutine, private deallocatespringbase (spr)
 Deallocates a base spring object. More...
 
subroutine, private deallocatespringbases (springs)
 Deallocates an array of base spring object. More...
 
subroutine deallocatespring (spring)
 Deallocates a spring element object. More...
 
subroutine, private deallocatespringelements (springs)
 Deallocates an array of spring element objects. More...
 
logical function isactive (spring)
 Checks whether a spring element is active or not. More...
 
real(dp) function springforce (spr, deflection, ierr)
 Evaluates the current force in a spring. More...
 
real(dp) function springstiff (spr, deflection, ierr)
 Evaluates the current stiffness in a spring. More...
 
real(dp) function springenergy (spr, deflection, ierr)
 Evaluates the current strain energy in a spring. More...
 
subroutine, private updatepreviousvalues (spr)
 Updates the state variables pertaining to the previous time step. More...
 
subroutine, private restorepreviousvalues (spr)
 Restores the state variables from the last converged time step. More...
 
subroutine, private checkdoffailure (spr)
 Checks if a spring has passed failure state. More...
 
subroutine, private checkspringfailure (spring)
 Makes the entire spring element fail if one of its DOFs has failed. More...
 
subroutine checkyieldlimits (spr, yPos, yNeg)
 Enforces the yield limits on current stiffness and force values. More...
 
subroutine setyieldlimit (spr, fLimit)
 Updates the constant yield force range for a spring. More...
 
subroutine checkunloading (spr, ierr)
 Checks for elastic unloading of cyclic plastic springs. More...
 

Variables

real(dp), parameter, private eps_p = 1.0e-8_dp
 Zero deflection tolerance. More...
 

Detailed Description

Module with data types representing spring objects.

The module also contains subroutines for accessing the spring data.

Function/Subroutine Documentation

◆ checkdoffailure()

subroutine, private springtypemodule::checkdoffailure ( type(springbasetype), intent(inout), target  spr)
private

Checks if a spring has passed failure state.

Parameters
sprThe springtypemodule::springbasetype object to check for
Author
Bjorn Haugen
Date
25 Apr 2005
Author
Knut Morten Okstad
Date
14 Mar 2006

◆ checkspringfailure()

subroutine, private springtypemodule::checkspringfailure ( type(springtype), intent(out)  spring)
private

Makes the entire spring element fail if one of its DOFs has failed.

Parameters
springThe springtypemodule::springtype object to check for
Author
Knut Morten Okstad
Date
7 Apr 2010

◆ checkunloading()

subroutine springtypemodule::checkunloading ( type(springbasetype), intent(inout)  spr,
integer, intent(inout)  ierr 
)

Checks for elastic unloading of cyclic plastic springs.

Parameters
sprThe springtypemodule::springbasetype object to check for
[out]ierrError flag

The associated plastic (yield) deformation or secant stiffness are updated if still in plastic range.

Author
Knut Morten Okstad
Date
20 Jan 2011
Here is the caller graph for this function:

◆ checkyieldlimits()

subroutine springtypemodule::checkyieldlimits ( type(springbasetype), intent(inout)  spr,
type(yieldlimittype), intent(in)  yPos,
type(yieldlimittype), intent(in)  yNeg 
)

Enforces the yield limits on current stiffness and force values.

Parameters
sprThe springtypemodule::springbasetype object to check yield for
[in]yPosYield limit on tension
[in]yNegYield limit on compression
Author
Bjorn Haugen
Date
25 Apr 2005
Author
Knut Morten Okstad
Date
14 Mar 2006

◆ deallocatefailures()

subroutine springtypemodule::deallocatefailures ( type(springfailuretype), dimension(:), pointer  fails)

Deallocates an array of spring failure objects.

Parameters
failsThe springtypemodule::springfailuretype objects to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ deallocatespring()

subroutine springtypemodule::deallocatespring ( type(springtype), intent(inout)  spring)

Deallocates a spring element object.

Parameters
springThe springtypemodule::springtype object to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ deallocatespringbase()

subroutine, private springtypemodule::deallocatespringbase ( type(springbasetype), intent(inout)  spr)
private

Deallocates a base spring object.

Parameters
sprThe springtypemodule::springbasetype object to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ deallocatespringbases()

subroutine, private springtypemodule::deallocatespringbases ( type(springbasetype), dimension(:), pointer  springs)
private

Deallocates an array of base spring object.

Parameters
springsThe springtypemodule::springbasetype objects to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ deallocatespringelements()

subroutine, private springtypemodule::deallocatespringelements ( type(springtype), dimension(:), pointer  springs)
private

Deallocates an array of spring element objects.

Parameters
springsThe springtypemodule::springtype objects to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ deallocateyields()

subroutine springtypemodule::deallocateyields ( type(springyieldtype), dimension(:), pointer  yields)

Deallocates an array of spring yield objects.

Parameters
yieldsThe springtypemodule::springyieldtype objects to deallocate
Author
Knut Morten Okstad
Date
23 Jan 2017

◆ getptrtoidspringbase()

type(springbasetype) function, pointer, private springtypemodule::getptrtoidspringbase ( type(springbasetype), dimension(:), intent(in), target  array,
integer, intent(in)  id,
integer, intent(out), optional  index 
)
private

Returns pointer to (first) base spring with specified id.

Parameters
[in]arrayArray of springtypemodule::springbasetype objects to search within
[in]idBase ID of the object to search for
[out]indexThe array index of the found object

If the spring is not found, NULL is returned.

Author
Bjorn Haugen
Date
6 Jun 2002

◆ getptrtoidspringelement()

type(springtype) function, pointer, private springtypemodule::getptrtoidspringelement ( type(springtype), dimension(:), intent(in), target  array,
integer, intent(in)  id 
)
private

Returns pointer to (first) spring element with specified id.

Parameters
[in]arrayArray of springtypemodule::springtype objects to search within
[in]idBase ID of the object to search for

If the spring is not found, NULL is returned.

Author
Bjorn Haugen
Date
1 Nov 1999

◆ getptrtoidspringfailure()

type(springfailuretype) function, pointer, private springtypemodule::getptrtoidspringfailure ( type(springfailuretype), dimension(:), intent(in), target  array,
integer, intent(in)  id,
integer, intent(out), optional  index 
)
private

Returns pointer to (first) spring failure with specified id.

Parameters
[in]arrayArray of springtypemodule::springfailuretype objects to search within
[in]idBase ID of the object to search for
[out]indexThe array index of the found object

If the spring failure is not found, NULL is returned.

Author
Bjorn Haugen
Date
24 Apr 2005

◆ getptrtoidspringyield()

type(springyieldtype) function, pointer, private springtypemodule::getptrtoidspringyield ( type(springyieldtype), dimension(:), intent(in), target  array,
integer, intent(in)  id,
integer, intent(out), optional  index 
)
private

Returns pointer to (first) spring yield with specified id.

Parameters
[in]arrayArray of springtypemodule::springyieldtype objects to search within
[in]idBase ID of the object to search for
[out]indexThe array index of the found object

If the spring yield is not found, NULL is returned.

Author
Bjorn Haugen
Date
20 Jun 2005

◆ isactive()

logical function springtypemodule::isactive ( type(springtype), intent(in)  spring)

Checks whether a spring element is active or not.

Parameters
[in]springThe springtypemodule::springtype object to check
Returns
.true. if the spring is still active, otherwise .false.
Author
Knut Morten Okstad
Date
26 Jan 2011

◆ nullifyfailure()

subroutine springtypemodule::nullifyfailure ( type(springfailuretype), intent(out)  failure)

Initializes a spring failure object.

Parameters
failureThe springtypemodule::springfailuretype object to initialize
Author
Knut Morten Okstad
Date
14 Mar 2006

◆ nullifyspringbase()

subroutine, private springtypemodule::nullifyspringbase ( type(springbasetype), intent(out)  spr)
private

Initializes a spring base object.

Parameters
sprThe springtypemodule::springbasetype object to initialize
Author
Knut Morten Okstad
Date
1 Mar 2001

◆ nullifyspringelement()

subroutine, private springtypemodule::nullifyspringelement ( type(springtype), intent(out)  spring,
type(idtype), intent(in), optional, target  sprId,
integer, intent(in), optional  nDofs 
)
private

Initializes a spring element.

Parameters
springThe springtypemodule::springtype object to initialize
[in]sprIdId of the owning joint (if joint spring)
[in]nDofsNumber of degrees of freedom
Author
Knut Morten Okstad
Date
1 Mar 2001

◆ nullifyyield()

subroutine springtypemodule::nullifyyield ( type(springyieldtype), intent(out)  yield)

Initializes a spring yield object.

Parameters
yieldThe springtypemodule::springyieldtype object to initialize
Author
Knut Morten Okstad
Date
14 Mar 2006

◆ restorepreviousvalues()

subroutine, private springtypemodule::restorepreviousvalues ( type(springbasetype), intent(inout)  spr)
private

Restores the state variables from the last converged time step.

Parameters
sprThe springtypemodule::springbasetype object to restore state for

This subroutine is invoked when doing iteration cut-back.

Author
Knut Morten Okstad
Date
4 Jul 2022

◆ setyieldlimit()

subroutine springtypemodule::setyieldlimit ( type(springbasetype), intent(inout)  spr,
real(dp), intent(in)  fLimit 
)

Updates the constant yield force range for a spring.

Parameters
sprThe springtypemodule::springbasetype object to update
[in]fLimitNew yield force limit, for tension and compression
Author
Knut Morten Okstad
Date
6 Jul 2022
Here is the caller graph for this function:

◆ springenergy()

real(dp) function springtypemodule::springenergy ( type(springbasetype), intent(in)  spr,
real(dp), intent(in)  deflection,
integer, intent(inout)  ierr 
)

Evaluates the current strain energy in a spring.

Parameters
[in]sprThe base spring to evaluate the energy in
[in]deflectionCurrent spring deflection
[out]ierrError flag
Returns
Current strain energy
Author
Knut Morten Okstad
Date
20 Jan 2011
Here is the call graph for this function:
Here is the caller graph for this function:

◆ springforce()

real(dp) function springtypemodule::springforce ( type(springbasetype), intent(in)  spr,
real(dp), intent(in)  deflection,
integer, intent(inout)  ierr 
)

Evaluates the current force in a spring.

Parameters
[in]sprThe base spring to evaluate the force in
[in]deflectionCurrent spring deflection
[out]ierrError flag
Returns
Current spring force
Author
Knut Morten Okstad
Date
7 Jun 2002
Here is the call graph for this function:
Here is the caller graph for this function:

◆ springstiff()

real(dp) function springtypemodule::springstiff ( type(springbasetype), intent(in)  spr,
real(dp), intent(in)  deflection,
integer, intent(inout)  ierr 
)

Evaluates the current stiffness in a spring.

Parameters
[in]sprThe base spring to evaluate the stiffness in
[in]deflectionCurrent spring deflection
[out]ierrError flag
Returns
Current spring stiffness
Author
Knut Morten Okstad
Date
7 Jun 2002
Here is the caller graph for this function:

◆ updatepreviousvalues()

subroutine, private springtypemodule::updatepreviousvalues ( type(springbasetype), intent(inout)  spr)
private

Updates the state variables pertaining to the previous time step.

Parameters
sprThe springtypemodule::springbasetype object to update state for

This subroutine is invoked once after convergence as been reached.

Author
Knut Morten Okstad
Date
4 Jul 2022

◆ writespringbasetype()

subroutine, private springtypemodule::writespringbasetype ( type(springbasetype), intent(in)  spr,
integer, intent(in)  io,
integer, intent(in), optional  complexity 
)
private

Standard routine for writing an object to io.

Parameters
[in]sprThe springtypemodule::springbasetype object to write
[in]ioFile unit number to write to
[in]complexityIf present, the value indicates the amount of print
Author
Karl Erik Thoresen
Date
Dec 1998

◆ writespringelementtype()

subroutine, private springtypemodule::writespringelementtype ( type(springtype), intent(in)  spring,
integer, intent(in)  io,
integer, intent(in), optional  complexity 
)
private

Standard routine for writing an object to io.

Parameters
[in]springThe springtypemodule::springtype object to write
[in]ioFile unit number to write to
[in]complexityIf present, the value indicates the amount of print
Author
Karl Erik Thoresen
Date
Dec 1998

Variable Documentation

◆ eps_p

real(dp), parameter, private springtypemodule::eps_p = 1.0e-8_dp
private

Zero deflection tolerance.