FEDEM Solver
R8.0
Source code of the dynamics solver
|
Module with subroutines for user-defined element calculations. More...
Functions/Subroutines | |
subroutine | initializeude (elmId, etype, nedof, triads, iwork, rwork, ierr) |
Initializes a user-defined element. More... | |
subroutine, private | updateude (elmId, etype, nedof, triads, engines, iwork, rwork, hydyn, envir, K, C, M, Fs, Fd, Fi, Q, Tlg, t, dt, istep, iter, ierr) |
Updates a user-defined element. More... | |
subroutine | updateudes (elms, env, time, timeStep, istep, iter, ierr) |
Updates all user-defined elements in the model. More... | |
subroutine, private | calcmorisonforces (elmId, nedof, triads, Tlg, urd, urdd, C, M, Q, hydyn, envir, time, istep, iter, ierr) |
Calculates Morison force contributions for a two-noded element. More... | |
subroutine, private | calcbuoyancyforces (elmId, nedof, triads, Tlg, Q, hydyn, envir, time, iter, ierr) |
Calculates buoyancy force contributions for a two-noded element. More... | |
subroutine | addinudeforces (sam, elms, FSk, FDk, FIk, Qk, RFk, ierr) |
Adds element forces into corresponding system force vectors. More... | |
subroutine | addinstaticudeforces (sam, elms, FSk, Qk, RFk, ierr) |
Adds static element forces into corresponding system force vectors. More... | |
subroutine | addinudemat (udeMat, sysMat, elm, sam, ierr, sysRhs) |
Adds an element matrix into the equivalent system matrix. More... | |
subroutine | buildudenewtonmat (scaleM, scaleC, scaleK, elm, ierr) |
Computes the user-defined element Newton matrix. More... | |
Module with subroutines for user-defined element calculations.
This module contains a set of subroutines for performing various computation tasks on the userdefeltypemodule::userdefeltype objects in the model during the dynamic or quasi-static simulation.
subroutine userdefelroutinesmodule::addinstaticudeforces | ( | type(samtype), intent(in) | sam, |
type(userdefeltype), dimension(:), intent(in) | elms, | ||
real(dp), dimension(:), intent(inout) | FSk, | ||
real(dp), dimension(:), intent(inout) | Qk, | ||
real(dp), dimension(:), intent(inout) | RFk, | ||
integer, intent(out) | ierr | ||
) |
Adds static element forces into corresponding system force vectors.
[in] | sam | Data for managing system matrix assembly |
[in] | elms | All user-defined elements in the model |
FSk | Internal stiffness force vector | |
Qk | External force vector (gravitation loads) | |
RFk | Reaction forces | |
[out] | ierr | Error flag |
subroutine userdefelroutinesmodule::addinudeforces | ( | type(samtype), intent(in) | sam, |
type(userdefeltype), dimension(:), intent(in) | elms, | ||
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 element forces into corresponding system force vectors.
[in] | sam | Data for managing system matrix assembly |
[in] | elms | All user-defined elements in the model |
FSk | Internal stiffness force vector | |
FDk | Internal damping force vector | |
FIk | Internal inertia force vector | |
Qk | External force vector (gravitation loads) | |
RFk | Reaction forces | |
[out] | ierr | Error flag |
subroutine userdefelroutinesmodule::addinudemat | ( | real(dp), dimension(:,:), intent(in) | udeMat, |
type(sysmatrixtype), intent(inout) | sysMat, | ||
type(userdefeltype), intent(in) | elm, | ||
type(samtype), intent(in) | sam, | ||
integer, intent(out) | ierr, | ||
real(dp), dimension(:), intent(inout), optional | sysRhs | ||
) |
Adds an element matrix into the equivalent system matrix.
[in] | udeMat | The element matrix to add into the system |
sysMat | System coefficiant matrix (stiffness, mass, ...) | |
[in] | elm | The user-defined element the matrix is associated with |
[in] | sam | Data for managing system matrix assembly |
[out] | ierr | Error flag |
sysRhs | System right-hand-side vector |
This subroutine transforms the user-defined element matrix udeMat to the system directions for each DOF associated with it, and then adds it into the corresponding system matrix sysMat. If any of the element DOFs are prescribed, the associated force contributions are added into the system force vector sysRhs, if present.
subroutine userdefelroutinesmodule::buildudenewtonmat | ( | real(dp), intent(in) | scaleM, |
real(dp), intent(in) | scaleC, | ||
real(dp), intent(in) | scaleK, | ||
type(userdefeltype), intent(inout) | elm, | ||
integer, intent(out) | ierr | ||
) |
Computes the user-defined element Newton matrix.
[in] | scaleM | Mass matrix scaling factor |
[in] | scaleC | Damping matrix scaling factor |
[in] | scaleK | Stiffness matrix scaling factor |
elm | The user-defined element to compute Newton matrix for | |
[out] | ierr | Error flag |
The Newton matrix is a linear combination of the stiffness-, damping- (if any) and stiffness matrices of the user-defined element.
|
private |
Calculates buoyancy force contributions for a two-noded element.
[in] | elmId | ID string of the element to calculate for |
[in] | nedof | Dimension of the element matrices |
[in] | triads | The triads connected to this user-defined element |
[in] | Tlg | Local-to-global transformation matrix for the element |
Q | External element forces | |
hydyn | Data for hydrodynamic force calculation for this element | |
envir | Environmental data | |
[in] | time | Current simulation time |
[in] | iter | Iteration counter |
[out] | ierr | Error flag |
|
private |
Calculates Morison force contributions for a two-noded element.
[in] | elmId | ID string of the element to calculate for |
[in] | nedof | Dimension of the element matrices |
[in] | triads | The triads connected to this user-defined element |
[in] | Tlg | Local-to-global transformation matrix for the element |
[in] | urd | Element velocity vector, in global coordinates |
[in] | urdd | Element acceleration vector, in global coordinates |
C | Element damping matrix | |
M | Element mass matrix | |
Q | External element forces | |
hydyn | Data for hydrodynamic force calculation for this element | |
envir | Environmental data | |
[in] | time | Current simulation time |
[in] | istep | Time increment counter |
[in] | iter | Iteration counter |
[out] | ierr | Error flag |
subroutine userdefelroutinesmodule::initializeude | ( | type(idtype), intent(in) | elmId, |
integer, intent(in) | etype, | ||
integer, intent(in) | nedof, | ||
type(triadptrtype), dimension(:), intent(in) | triads, | ||
integer, dimension(:), pointer | iwork, | ||
real(dp), dimension(:), pointer | rwork, | ||
integer, intent(out) | ierr | ||
) |
Initializes a user-defined element.
[in] | elmId | Id of the user-defined element to initialize |
[in] | etype | User-defined element type flag |
[in] | nedof | Dimension of the element matrices |
[in] | triads | The triads connected to this user-defined element |
iwork | Integer work array for this user-defined element | |
rwork | Real work array for this user-defined element | |
[out] | ierr | Error flag |
|
private |
Updates a user-defined element.
[in] | elmId | Id of the user-defined element to update |
[in] | etype | User-defined element type flag |
[in] | nedof | Dimension of the element matrices |
[in] | triads | The triads connected to this user-defined element |
[in] | engines | The engines connected to this user-defined element |
iwork | Integer work array for this user-defined element | |
rwork | Real work array for this user-defined element | |
hydyn | Data for hydrodynamic force calculation for this element | |
envir | Environmental data | |
[out] | K | Tangent stiffness matrix |
[out] | C | Damping matrix |
[out] | M | Mass matrix |
[out] | Fs | Internal elastic forces |
[out] | Fd | Damping forces |
[out] | Fi | Intertia forces |
[out] | Q | External forces |
[out] | Tlg | Local-to-global transformation matrix for the element |
[in] | t | Current simulation time |
[in] | dt | Time increment size |
[in] | istep | Time increment counter |
[in] | iter | Iteration counter |
[out] | ierr | Error flag |
This is the main work-horse for the user-defined element objects. It is responsible for calculation of all tangent matrices and associated right-hand-side force vectors eminating from the linearized dynamic equilibrium equation. The subroutine is typically invoked once per Newton iteration for each element.
subroutine userdefelroutinesmodule::updateudes | ( | type(userdefeltype), dimension(:), intent(inout) | elms, |
type(environmenttype), intent(inout) | env, | ||
real(dp), intent(in) | time, | ||
real(dp), intent(in) | timeStep, | ||
integer, intent(in) | istep, | ||
integer, intent(in) | iter, | ||
integer, intent(inout) | ierr | ||
) |
Updates all user-defined elements in the model.
elms | Array of all user-defined elements in the model | |
env | Environmental data | |
[in] | time | Current simulation time |
[in] | timeStep | Time increment size |
[in] | istep | Time increment counter |
[in] | iter | Iteration counter |
[out] | ierr | Error flag |