FEDEM Solver
R8.0
Source code of the dynamics solver
|
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... | |
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.
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.
FD | System damping force vector | |
RF | System reaction forces associated with constrained DOFs | |
[in] | spring | The spring element to calculate damping forces for |
[in] | sam | Data for managing system matrix assembly |
[in] | alpha2 | Stiffness-proportional damping coefficient |
[out] | ierr | Error 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.
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.
[in] | includeStressStiff | If .true., include geometric stiffness |
[in] | scaleK | Stiffness matrix scaling factor |
Nmat | System newton matrix | |
[in] | spring | The spring element to calculate stiffness matrix for |
[in] | sam | Data for managing system matrix assembly |
[out] | ierr | Error flag |
Rhs | System 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.
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.
FS | System stiffness force vector | |
RF | System reaction forces associated with constrained DOFs | |
[in] | spring | The spring element to calculate stiffness forces for |
[in] | sam | Data for managing system matrix assembly |
[out] | ierr | Error 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.
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.
[in] | spr | Array of all base springs in current (axial) spring element |
[in] | triads | Array of triads connected to the axial spring |
[in] | sDir | Direction vector for axial spring |
[out] | eV | Element force vector |
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.
[in] | spr | Array of all base springs in current (axial) spring element |
[in] | triads | Array of triads connected to the axial spring |
[in] | sDir | Direction vector for axial spring |
[in] | cplStiff | Explicit coupling stiffness coefficients |
[in] | scaleK | Stiffness scaling factor |
[out] | eM | Element stiffness matrix |
[in] | includeStressStiff | If .true., account for geometric stiffness |
haveStiffness | If .true., a non-zero spring stiffness was detected |
subroutine springroutinesmodule::couplespringforces | ( | type(springptrtype), dimension(:), intent(inout) | spr, |
real(dp), dimension(:), intent(in) | cplStiff | ||
) |
Updates spring element forces due to explicit coupling.
spr | Array of all base springs in current (axial) spring element | |
[in] | cplStiff | Explicit coupling stiffness coefficients |
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.
spr | Array of all base springs in current (axial) spring element | |
[in] | cplStiff | Explicit coupling stiffness coefficients |
elMat | Element stiffness matrix | |
[in] | scaleK | Stiffness scaling factor |
[in] | d1 | Number of DOFs in the first triad connected to spring element |
subroutine springroutinesmodule::updatespringinterconn | ( | type(springtype), intent(inout) | springEl, |
logical, intent(in) | includeStressStiff, | ||
integer, intent(inout) | ierr | ||
) |
Corrects spring force and stiffness according to interconnectivity.
springEl | The spring element to update stiffness and force for | |
[in] | includeStressStiff | If .true., account for geometric stiffness |
ierr | Error flag |
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.
springs | Array of all spring elements in the model | |
joints | Array of all joints in the model | |
[in] | restart | If .true., axial spring forces are not updated |
ierr | Error flag | |
[in] | updateLength | If .true. (default), all spring length variables are updated first, before updating the other variables |
[in] | updateVar | If .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.
subroutine, public springroutinesmodule::updatespringyields | ( | type(springyieldtype), dimension(:), intent(inout) | yields, |
integer, intent(inout) | ierr | ||
) |
Updates the spring yield variables.
yields | Array of all spring yield objects in the model |
ierr | Error flag |
|
private |
Equal to zero tolerance.
|
private |
Max number of DOFs pr element.