FEDEM Solver
R8.0
Source code of the dynamics solver
|
Module with some generic solver utilities. More...
Functions/Subroutines | |
subroutine | calculateiterationnorms (sam, sys, iter, ierr) |
Calculates all iteration norms defined in the system. More... | |
subroutine | calculateiterationtolerances (sam, sys) |
Calculates all iteration tolerances defined in the system. More... | |
subroutine | iterationaccelerator (iter, res, del, ierr) |
Accelerates the solution increment in case of line search. More... | |
subroutine | savestep (sys, mech, ctrl, ierr, checkTimeStep) |
Saves response variables of current time step to file. More... | |
subroutine | terminatestep (sam, sys, mech, ctrl, linearStatic, finalStep, ierr) |
Terminates a time step by doing some final calculations. More... | |
subroutine | updatepreviousstate (sam, sys, mech, ierr) |
Updates the previous state variables in the mechanism objects. More... | |
subroutine | restorelaststep (sam, sys, mech) |
Restores all state variables from the last converged time step. More... | |
subroutine | clearvelacc (triads, joints, notify) |
Clears velocity and acceleration variables in the triads and joints. More... | |
subroutine | closesolverdb (mech, anyRes, ierr) |
Closes all solver data base files before program termination. More... | |
subroutine | printmassdistribution (sups, masses, tires, elms, gravity, totMass, lpu) |
Prints a summary of the mass distribution to the res-file. More... | |
subroutine | printresults (time, triads, sups, iprint, lpu) |
Prints basic simulation variables to the res-file. More... | |
subroutine | printconvergence (lpu, fileFormat, iStep, iter, tanUpdate, time, timeStep, del, res, convData, sam, mech) |
Prints convergence information to the res-file. More... | |
Variables | |
integer(ik), dimension(:), allocatable, save | meqerr |
All singular equations found. More... | |
real(dp), dimension(4), save, private | lastime = -1.0e99_dp |
Previous save times. More... | |
Module with some generic solver utilities.
This module contains utility subroutines for the Dynamics Solver that are not related to any specific solution algorithm or mechanism part. Many of the subroutines and functions of this module are not documented. You have to configure doxygen with the option ENABLED_SECTIONS = FULL_DOC to extract detailed documentation of those subroutines and functions.
subroutine solverroutinesmodule::calculateiterationnorms | ( | type(samtype), intent(in) | sam, |
type(systemtype), intent(inout) | sys, | ||
integer, intent(in) | iter, | ||
integer, intent(out) | ierr | ||
) |
Calculates all iteration norms defined in the system.
[in] | sam | Data for managing system matrix assembly |
sys | System level model data | |
[in] | iter | Iteration counter |
[out] | ierr | Error flag |
subroutine solverroutinesmodule::calculateiterationtolerances | ( | type(samtype), intent(in) | sam, |
type(systemtype), intent(inout) | sys | ||
) |
Calculates all iteration tolerances defined in the system.
[in] | sam | Data for managing system matrix assembly |
sys | System level model data |
subroutine solverroutinesmodule::clearvelacc | ( | type(triadtype), dimension(:), intent(inout) | triads, |
type(masterslavejointtype), dimension(:), intent(inout) | joints, | ||
logical, intent(in) | notify | ||
) |
Clears velocity and acceleration variables in the triads and joints.
triads | All triads in the model | |
joints | All joints in the model | |
[in] | notify | If .true., give message if a non-zero variable is cleared |
This subroutine will (re)set the velocity- and accelerations variables in all triads and joints to zero. It mainly is used to nullify potentially non-zero initial conditions in the case of quasi-static load incrementation, in which inertia and damping terms should be zero, such that a possible dynamic restart will be performed from a resting state. Notice that the velocity/accelerations of the generalized DOFs in super- elements do not need to be reset, since those variables are pointers into respective system vectors which are assumed to be initialized separately.
subroutine solverroutinesmodule::closesolverdb | ( | type(mechanismtype), intent(inout) | mech, |
logical, dimension(:), intent(out) | anyRes, | ||
integer, intent(out) | ierr | ||
) |
Closes all solver data base files before program termination.
mech | Mechanism components of the model | |
[out] | anyRes | Indicates whether the result files contain data or not |
[out] | ierr | Error flag |
subroutine solverroutinesmodule::iterationaccelerator | ( | integer, intent(in) | iter, |
real(dp), dimension(:), intent(in) | res, | ||
real(dp), dimension(:), intent(inout) | del, | ||
integer, intent(out) | ierr | ||
) |
Accelerates the solution increment in case of line search.
[in] | iter | Iteration counter |
[in] | res | Current force residual |
del | Current solution increment | |
[out] | ierr | Error flag |
The solution increment is scaled if the previous and current residual vectors are "almost" tangential, as are previous and current solution vectors (kind-of line search).
subroutine solverroutinesmodule::printconvergence | ( | integer, intent(in) | lpu, |
integer, intent(in) | fileFormat, | ||
integer(i8), intent(in) | iStep, | ||
integer, intent(in) | iter, | ||
logical, intent(in) | tanUpdate, | ||
real(dp), intent(in) | time, | ||
real(dp), intent(in) | timeStep, | ||
real(dp), dimension(:), intent(in) | del, | ||
real(dp), dimension(:), intent(in) | res, | ||
type(testsettype), intent(in) | convData, | ||
type(samtype), intent(in) | sam, | ||
type(mechanismtype), intent(in) | mech | ||
) |
Prints convergence information to the res-file.
[in] | lpu | File unit number for res-file output |
[in] | fileFormat | File format option, < 0 : old format (R4.0-compatible), = 0 : new format > 0 : new format and write heading first |
[in] | iStep | Time increment counter |
[in] | iter | Iteration counter |
[in] | tanUpdate | If .true., a new tangent is computed in this iteration |
[in] | time | Current simulation time |
[in] | timeStep | Time increment size |
[in] | res | Force residual |
[in] | del | Solution increment |
[in] | convData | Iteration norm tolerances and values |
[in] | sam | Data for managing system matrix assembly |
[in] | mech | Mechanism components of the model |
subroutine solverroutinesmodule::printmassdistribution | ( | type(supeltype), dimension(:), intent(in) | sups, |
type(masstype), dimension(:), intent(inout) | masses, | ||
type(tiretype), dimension(:), intent(in) | tires, | ||
type(userdefeltype), dimension(:), intent(in) | elms, | ||
real(dp), dimension(:), intent(in) | gravity, | ||
real(dp), intent(out) | totMass, | ||
integer, intent(in) | lpu | ||
) |
Prints a summary of the mass distribution to the res-file.
[in] | sups | All superelements in the model |
masses | All point masses in the model | |
[in] | tires | All tires in the model |
[in] | elms | All user-defined elements in the model |
[in] | gravity | Gravitation vector |
[out] | totMass | Total mass of the model |
[in] | lpu | File unit number for res-file output |
subroutine solverroutinesmodule::printresults | ( | real(dp), intent(in) | time, |
type(triadtype), dimension(:), intent(in) | triads, | ||
type(supeltype), dimension(:), intent(in) | sups, | ||
integer, intent(in) | iprint, | ||
integer, intent(in) | lpu | ||
) |
Prints basic simulation variables to the res-file.
[in] | time | Current simulation time |
[in] | triads | All triads in the model |
[in] | sups | All superelements in the model |
[in] | iprint | Print switch; the higher value the more print is produced |
[in] | lpu | File unit number for res-file output |
subroutine solverroutinesmodule::restorelaststep | ( | type(samtype), intent(in) | sam, |
type(systemtype), intent(inout) | sys, | ||
type(mechanismtype), intent(inout) | mech | ||
) |
Restores all state variables from the last converged time step.
[in] | sam | Data for managing system matrix assembly |
sys | System level model data | |
mech | Mechanism components of the model |
subroutine solverroutinesmodule::savestep | ( | type(systemtype), intent(in) | sys, |
type(mechanismtype), intent(inout) | mech, | ||
type(controltype), intent(in) | ctrl, | ||
integer, intent(out) | ierr, | ||
logical, intent(in), optional | checkTimeStep | ||
) |
Saves response variables of current time step to file.
[in] | sys | System level model data |
mech | Mechanism components of the model | |
[in] | ctrl | Control system data |
[out] | ierr | Error flag |
[in] | checkTimeStep | If present and .false., save the secondary variables for each time step (ignoring the -saveinc2 option). |
subroutine solverroutinesmodule::terminatestep | ( | type(samtype), intent(in) | sam, |
type(systemtype), intent(inout) | sys, | ||
type(mechanismtype), intent(inout) | mech, | ||
type(controltype), intent(in) | ctrl, | ||
logical, intent(in) | linearStatic, | ||
logical, intent(in) | finalStep, | ||
integer, intent(out) | ierr | ||
) |
Terminates a time step by doing some final calculations.
[in] | sam | Data for managing system matrix assembly |
sys | System level model data | |
mech | Mechanism components of the model | |
[in] | ctrl | Control system data |
[in] | linearStatic | If .true., we are doing a linear static analysis |
[in] | finalStep | If .true., we have finished the final time step |
[out] | ierr | Error flag |
This subroutine performs some final calculations on the converged solution state, updates the previous state variables, etc.
subroutine solverroutinesmodule::updatepreviousstate | ( | type(samtype), intent(in) | sam, |
type(systemtype), intent(inout) | sys, | ||
type(mechanismtype), intent(inout) | mech, | ||
integer, intent(out) | ierr | ||
) |
Updates the previous state variables in the mechanism objects.
[in] | sam | Data for managing system matrix assembly |
sys | System level model data | |
mech | Mechanism components of the model | |
[out] | ierr | Error flag |
|
private |
Previous save times.
integer(ik), dimension(:), allocatable, save solverroutinesmodule::meqerr |
All singular equations found.