FEDEM Solver
R8.0
Source code of the dynamics solver
|
Module with subroutines for superelement calculations. More...
Functions/Subroutines | |
subroutine | setsupelsvelacc (sups, sam, velGlobal, accGlobal) |
Extracts local velocities and accelerations for the superelements. More... | |
subroutine | buildfinitvelacc (sup, beta, gamma, h) |
Calculates deformational velocities and accelerations. More... | |
subroutine | incsupelsgendofs (sups, solinc, useTotalInc) |
Increments the generalized DOFs for all superelements. More... | |
subroutine | updatesupels (sups, supLoads, env, beta, gamma, time, timeStep, istep, iter, newPositions, ierr) |
Updates all superelements in the model based on the computed state. More... | |
subroutine | updatesupelsstatic (sups, supLoads, env, time, iter, linInc, ierr) |
Updates all superelements in the model based on the computed state. More... | |
subroutine, private | updatesupelload (Q, S, supLoad, ierr) |
Adds the superelement loads to the system external load vector. More... | |
subroutine | updatesupeldamping (sups, engs, alpha, ierr) |
Updates the superelement damping matrices. More... | |
subroutine | updateseaenvironment (env, triads, sups, time, iter, ierr) |
Updates the current sea state. More... | |
subroutine, private | calcmorisonforces (sup, env, time, istep, iter, ierr) |
Calculates Morison force contributions for a two-noded beam element. More... | |
subroutine, private | calcbuoyancyforces (sup, env, time, iter, ierr) |
Calculates buoyancy forces and associated load correction stiffness. More... | |
subroutine | addinsupforces (sam, sups, FSk, FDk, FIk, Qk, RFk, ierr) |
Adds superelement forces into corresponding system force vectors. More... | |
subroutine | addinstaticsupforces (sam, sups, FSk, Qk, RFk, ierr) |
Adds superelement forces into corresponding system force vectors. More... | |
subroutine | addinsupmat (supMat, sysMat, sup, sam, err, sysRhs, scale) |
Adds a superelement matrix into the equivalent system matrix. More... | |
subroutine | comptanstiff (sup, ierr) |
Computes the tangential superelement stiffness matrix. More... | |
subroutine | buildsupnewtonmat (newTangent, scaleM, scaleC, scaleK, sup, ierr) |
Computes the superelement Newton matrix. More... | |
subroutine, private | scaledmatmul (m, n, alpha, A, X, Y, ldA) |
Calculates the scaled matrix-vector product Y = α*A*X. More... | |
Module with subroutines for superelement calculations.
This module contains a set of subroutines for performing various computation tasks on the supeltypemodule::supeltype objects in the model during the dynamic or quasi-static simulation.
subroutine supelroutinesmodule::addinstaticsupforces | ( | type(samtype), intent(in) | sam, |
type(supeltype), dimension(:), intent(in) | sups, | ||
real(dp), dimension(:), intent(inout) | FSk, | ||
real(dp), dimension(:), intent(inout) | Qk, | ||
real(dp), dimension(:), intent(inout) | RFk, | ||
integer, intent(out) | ierr | ||
) |
Adds superelement forces into corresponding system force vectors.
[in] | sam | Data for managing system matrix assembly |
[in] | sups | All superelements in the model |
FSk | Internal stiffness force vector | |
Qk | External force vector (gravitation loads) | |
RFk | Reaction forces | |
[out] | ierr | Error flag |
This subroutine only considers the static forces, the stiffness and external forces.
subroutine supelroutinesmodule::addinsupforces | ( | type(samtype), intent(in) | sam, |
type(supeltype), dimension(:), intent(in) | sups, | ||
real(dp), dimension(:), intent(inout) | FSk, | ||
real(dp), dimension(:), intent(inout) | FDk, | ||
real(dp), dimension(:), intent(inout) | FIk, | ||
real(dp), dimension(:), intent(inout) | Qk, | ||
real(dp), dimension(:), intent(inout) | RFk, | ||
integer, intent(out) | ierr | ||
) |
Adds superelement forces into corresponding system force vectors.
[in] | sam | Data for managing system matrix assembly |
[in] | sups | All superelements in the model |
FSk | Internal stiffness force vector | |
FDk | Internal damping force vector | |
FIk | Internal internal force vector | |
Qk | External force vector (gravitation loads) | |
RFk | Reaction forces | |
[out] | ierr | Error flag |
subroutine supelroutinesmodule::addinsupmat | ( | real(dp), dimension(:,:), intent(in) | supMat, |
type(sysmatrixtype), intent(inout) | sysMat, | ||
type(supeltype), intent(in) | sup, | ||
type(samtype), intent(in) | sam, | ||
integer, intent(out) | err, | ||
real(dp), dimension(:), intent(inout), optional | sysRhs, | ||
real(dp), intent(in), optional | scale | ||
) |
Adds a superelement matrix into the equivalent system matrix.
[in] | supMat | The superelement matrix to add into the system |
sysMat | System coefficient matrix (stiffness, mass, ...) | |
[in] | sup | The superelement the provided matrix is associated with |
[in] | sam | Data for managing system matrix assembly |
[out] | err | Error flag |
sysRhs | System right-hand-side vector | |
[in] | scale | Optional scaling factor for the matrix to add |
This subroutine transforms the superelement matrix supMat to the system directions for each DOF associated with it, and then adds it into the system matrix sysMat. If any of the superelement DOFs are prescribed, the associated force contributions are added into the system force vector sysRhs, if present.
subroutine supelroutinesmodule::buildfinitvelacc | ( | type(supeltype), intent(inout) | sup, |
real(dp), intent(in) | beta, | ||
real(dp), intent(in) | gamma, | ||
real(dp), intent(in) | h | ||
) |
Calculates deformational velocities and accelerations.
sup | The superelement to calculate velocity/acceleration for | |
[in] | beta | Newmark time integration parameter |
[in] | gamma | Newmark time integration parameter |
[in] | h | Current time increment size |
This subroutine integrates the deformational velocities and accelerations based on the Newmark integration parameters and the state at the previous time step.
subroutine supelroutinesmodule::buildsupnewtonmat | ( | logical, intent(in) | newTangent, |
real(dp), intent(in) | scaleM, | ||
real(dp), intent(in) | scaleC, | ||
real(dp), intent(in) | scaleK, | ||
type(supeltype), intent(inout) | sup, | ||
integer, intent(out) | ierr | ||
) |
Computes the superelement Newton matrix.
[in] | newTangent | If .true., the tangential stiffness is updated |
[in] | scaleM | Mass matrix scaling factor |
[in] | scaleC | Damping matrix scaling factor |
[in] | scaleK | Stiffness matrix scaling factor |
sup | The superelement to calculate tangent stiffness for | |
[out] | ierr | Error flag |
The Newton matrix is a linear combination of the stiffness-, damping- (if any) and stiffness matrices of the superelement.
|
private |
Calculates buoyancy forces and associated load correction stiffness.
sup | Superelement to calculate buoyancy forces for | |
env | Environmental data | |
[in] | time | Current simulation time |
[in] | iter | Iteration counter |
ierr | Error flag |
For a (partly) submerged body.
|
private |
Calculates Morison force contributions for a two-noded beam element.
sup | The beam element to calculate Morison forces for | |
env | Environmental data | |
[in] | time | Current simulation time |
[in] | istep | Time increment counter |
[in] | iter | Iteration counter |
ierr | Error flag |
subroutine supelroutinesmodule::comptanstiff | ( | type(supeltype), intent(inout) | sup, |
integer, intent(out) | ierr | ||
) |
Computes the tangential superelement stiffness matrix.
sup | The superelement to calculate tangent stiffness for | |
[out] | ierr | Error flag |
subroutine supelroutinesmodule::incsupelsgendofs | ( | type(supeltype), dimension(:), intent(inout) | sups, |
real(dp), dimension(:), intent(in) | solinc, | ||
logical, intent(in), optional | useTotalInc | ||
) |
Increments the generalized DOFs for all superelements.
sups | All superelements in the model | |
[in] | solinc | Current global solution increment |
[in] | useTotalInc | If .true., update from previous solution state |
|
private |
Calculates the scaled matrix-vector product Y = α*A*X.
[in] | m | Number of rows in matrix A |
[in] | n | Number of columns in matrix A and length of vector X. |
[in] | alpha | Scaling factor, α |
[in] | A | The matrix to multiply with |
[in] | X | The vector to multiply with |
[out] | Y | The output vector |
[in] | ldA | Leading dimension of matrix A |
This is just a convenience wrapper over the BLAS subroutine DGEMV.
subroutine supelroutinesmodule::setsupelsvelacc | ( | type(supeltype), dimension(:), intent(inout) | sups, |
type(samtype), intent(in) | sam, | ||
real(dp), dimension(:), intent(in) | velGlobal, | ||
real(dp), dimension(:), intent(in) | accGlobal | ||
) |
Extracts local velocities and accelerations for the superelements.
sups | All superelements in the model | |
[in] | sam | Data for managing system matrix assembly |
[in] | velGlobal | Global velocity vector |
[in] | accGlobal | Global acceleration vector |
This subroutine extracts the local velocities and accelerations (uld and uldd, respectively) from the given global velocity and acceleration vectors for all superelements.
subroutine supelroutinesmodule::updateseaenvironment | ( | type(environmenttype), intent(inout) | env, |
type(triadtype), dimension(:), intent(in) | triads, | ||
type(supeltype), dimension(:), intent(in) | sups, | ||
real(dp), intent(in) | time, | ||
integer, intent(in) | iter, | ||
integer, intent(out) | ierr | ||
) |
Updates the current sea state.
env | Environmental data | |
[in] | triads | All triads in the model |
[in] | sups | All superelements in the model |
[in] | time | Current physical time |
[in] | iter | Iteration counter |
[out] | ierr | Error flag |
subroutine supelroutinesmodule::updatesupeldamping | ( | type(supeltype), dimension(:), intent(inout) | sups, |
type(enginetype), dimension(:), intent(inout) | engs, | ||
real(dp), dimension(2), intent(in) | alpha, | ||
integer, intent(out) | ierr | ||
) |
Updates the superelement damping matrices.
sups | All superelements in the model | |
engs | All general functions in the model | |
[in] | alpha | Global structural damping parameters |
[out] | ierr | Error flag |
Effective with time-dependent structural damping coefficients. This subroutine also updates the time-dependent stiffness scaling factor.
|
private |
Adds the superelement loads to the system external load vector.
Q | System external load vector |
S | Normalized superelement load vectors |
supLoad | The superelement load object to assemble |
ierr | Error flag |
This subroutine updates the amplitude of the superelement load and adds its contribution to the external force vector of the global system.
subroutine supelroutinesmodule::updatesupels | ( | type(supeltype), dimension(:), intent(inout) | sups, |
type(supelloadtype), dimension(:), intent(inout) | supLoads, | ||
type(environmenttype), intent(inout) | env, | ||
real(dp), intent(in) | beta, | ||
real(dp), intent(in) | gamma, | ||
real(dp), intent(in) | time, | ||
real(dp), intent(in) | timeStep, | ||
integer, intent(in) | istep, | ||
integer, intent(in) | iter, | ||
logical, intent(in) | newPositions, | ||
integer, intent(inout) | ierr | ||
) |
Updates all superelements in the model based on the computed state.
sups | All superelements in the model | |
supLoads | All superelement loads in the model | |
env | Environmental data | |
[in] | beta | Newmark time integration parameter |
[in] | gamma | Newmark time integration parameter |
[in] | time | Current physical time |
[in] | timeStep | Current time increment size |
[in] | istep | Time increment counter |
[in] | iter | Iteration counter |
[in] | newPositions | If .true., the position variables have been updated |
ierr | Error flag |
This subroutine updates the superelement objects:
subroutine supelroutinesmodule::updatesupelsstatic | ( | type(supeltype), dimension(:), intent(inout) | sups, |
type(supelloadtype), dimension(:), intent(inout) | supLoads, | ||
type(environmenttype), intent(inout) | env, | ||
real(dp), intent(in) | time, | ||
integer, intent(in) | iter, | ||
integer, intent(in), optional | linInc, | ||
integer, intent(inout) | ierr | ||
) |
Updates all superelements in the model based on the computed state.
sups | All superelements in the model | |
supLoads | All superelement loads in the model | |
env | Environmental data | |
[in] | time | Current physical time |
[in] | iter | Iteration counter |
[in] | linInc | Option for linear (1) or incremental (2) deformations |
ierr | Error flag |
This subroutine updates the superelement objects statically. It is used in place of supelroutinesmodule::updatesupels in a quasi-static simulation.