FEDEM Solver
R8.0
Source code of the dynamics solver
|
Module with subroutines for hydrodynamic load calculations. More...
Data Types | |
interface | updateatconvergence |
Updates hydrodynamics quantities after a time step is converged. More... | |
Functions/Subroutines | |
subroutine, public | initfluidmotions (time, env, triads, sups, ierr) |
Initializes the fluid particle motion cache for all triads in water. More... | |
logical function, public | getcalculatedfluidmotion (triad, elev, fvel, facc) |
Returns the latest calculated fluid particle motion at a triad. More... | |
real(dp) function | watersurfacenormal (normal, gravity, Tlg) |
Returns the water surface normal vector in local coordinate system. More... | |
subroutine | evaluatewave (waveFunc, waveTheory, Twave, g, depth, Xg, time, scale, wave, dynp, stat) |
Evaluates the wave profile, velocity and acceleration at a point. More... | |
subroutine | evaluatecurrent (currFunc, dirFunc, Tsea, Xg, time, scale, cvel, stat) |
Evaluates the sea current velocity at the given point and time. More... | |
subroutine | evaluatesea (env, g, time, istep, inod, x, waterMotion, stat) |
Evaluates the sea state at the given point and time. More... | |
real(dp) function, public | getwaveelevation (env, Xg, time, stat) |
Returns the wave height at the given point and time. More... | |
subroutine, public | getseastate (env, time, Xg, sea, stat) |
Evaluates the sea state at the given point and time. More... | |
subroutine, public | initiatehydrodynbodies (sups, elms, env, restart, ierr) |
Initiates all hydrodynamic bodies in the model. More... | |
subroutine | updatehydrodynbody (hydyn, triads, supTr, sLev, gravity, g, wb, ierr) |
Updates the hydrodynamic body quantities. More... | |
subroutine | getbeamlength (triad1, triad2, normal, h1, h2, Tlg, weight, Lb, C0b, iEnd) |
Computes the buoyancy length and center for a two-noded beam. More... | |
subroutine, public | getmorisonforces (beamId, triads, supTr, urd, urdd, Q, eMa, eCd, hydyn, env, time, istep, iter, ierr) |
Calculates Morison force contributions for a two-noded beam element. More... | |
subroutine, public | getbuoyancyforces (supId, triads, supTr, hydyn, env, g, time, iter, Q, ierr) |
Calculates buoyancy force resultant for a superelement or beam. More... | |
subroutine, public | getdragforces (Fd, sup, hydyn, env, time, dt, ierr) |
Calculates drag (and slam) forces for a (partly) submerged body. More... | |
subroutine | updatehydrodynamicsatconvergence (hydyn, supTr, ierr) |
Updates the HydroDynType object after convergence has been achieved. More... | |
subroutine, public | closehydrodyn (lpu) |
Closes the hydrodynamics module and report some timings. More... | |
subroutine, public | diffractioncalc (env, waveFunc, ierr) |
Performs diffraction analysis using Nemoh. More... | |
subroutine, public | getdiffractionforces (Q, sup, hydyn, env, time, ierr) |
Extracts the diffraction force at a given time for a superelement. More... | |
Variables | |
real(dp), dimension(:,:), allocatable, save | watermotion |
Fluid particle motions. More... | |
integer, dimension(:), allocatable, save | calcwmotion |
Have calculated motions? More... | |
real(dp), parameter | eps_p = 1.0e-16_dp |
Zero tolerance. More... | |
Module with subroutines for hydrodynamic load calculations.
This module deals with the calculation of hydrodynamic loads (buoyancy, inertia loads due to added mass, damping forces due to drag, etc.) for beam- and superelements. It also manages the evaluation of the fluid particle motions, which are needed in the hydrodynamic load calculations.
Some 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, public hydrodynamicsmodule::closehydrodyn | ( | integer, intent(in) | lpu | ) |
Closes the hydrodynamics module and report some timings.
[in] | lpu | File unit number for res-file output |
subroutine, public hydrodynamicsmodule::diffractioncalc | ( | type(environmenttype), intent(in) | env, |
type(functiontype), intent(in) | waveFunc, | ||
integer, intent(out) | ierr | ||
) |
Performs diffraction analysis using Nemoh.
[in] | env | Environmental data |
[in] | waveFunc | The wave function to use in the diffraction analysis |
[out] | ierr | Error flag |
subroutine hydrodynamicsmodule::evaluatecurrent | ( | type(functiontype), pointer | currFunc, |
type(functiontype), pointer | dirFunc, | ||
real(dp), dimension(3,4), intent(in) | Tsea, | ||
real(dp), dimension(3), intent(in) | Xg, | ||
real(dp), intent(in) | time, | ||
real(dp), intent(in) | scale, | ||
real(dp), dimension(3), intent(out) | cvel, | ||
integer, intent(inout) | stat | ||
) |
Evaluates the sea current velocity at the given point and time.
[in] | currFunc | The sea current velocity function to evaluate for |
[in] | dirFunc | The sea current direction function |
[in] | Tsea | Coordinate system for the sea current |
[in] | Xg | Global coordinates of the evaluation point |
[in] | time | Current simulation time |
[in] | scale | Scaling factor |
[out] | cvel | Sea current velocity in global axis directions |
stat | Status flag (negative on error exit). 1 = The point is below or on the water surface. 2 = The point is above the water surface (no kinematics). |
|
private |
Evaluates the sea state at the given point and time.
[in] | env | Environmental data |
[in] | g | Gravitation constant |
[in] | time | Current simulation time |
[in] | istep | Time increment counter |
[in] | inod | Nodal number of sea kinematics evaluation point |
[in] | x | Global coordinates of sea kinematics evaluation point |
[out] | waterMotion | Sea kinematics state at current point. waterMotion(1:3) = Projection of point x onto the current sea surface. waterMotion(4:6) = Particle velocity at point x in global coordinates. waterMotion(7:9) = Particle acceleration at point x in global coordinates. |
stat | Status flag (negative on error exit) |
subroutine hydrodynamicsmodule::evaluatewave | ( | type(functiontype), intent(in) | waveFunc, |
integer, intent(in) | waveTheory, | ||
real(dp), dimension(3,4), intent(in) | Twave, | ||
real(dp), intent(in) | g, | ||
real(dp), intent(in) | depth, | ||
real(dp), dimension(3), intent(in) | Xg, | ||
real(dp), intent(in) | time, | ||
real(dp), intent(in) | scale, | ||
real(dp), dimension(3,3), intent(out) | wave, | ||
real(dp), intent(out), optional | dynp, | ||
integer, intent(inout) | stat | ||
) |
Evaluates the wave profile, velocity and acceleration at a point.
[in] | waveFunc | The wave function to evaluate for |
[in] | waveTheory | Flag indicating which wave theory to use |
[in] | Twave | Wave coordinate system (axis directions and origin) |
[in] | g | Gravitation constant |
[in] | depth | Water depth (zero means infinite) |
[in] | Xg | Global coordinates of the evaluation point |
[in] | time | Current simulation time |
[in] | scale | Scaling factor |
[out] | wave | Wave kinematics quantities at the evaluation point. wave(:,1) = Projection of point coordinates onto the current sea surface. wave(:,2) = Water particle velocity. wave(:,3) = Water particle acceleration. |
[out] | dynp | Dynamic pressure (optional) |
stat | Status flag (negative on error exit). 1 = The point is below or on the water surface. 2 = The point is above the water surface (no kinematics). |
The calculated wave kinematics quantities are referring to the global coordinate system, unless when stat is negative on entry. In the latter case the wave coordinate system is used.
subroutine hydrodynamicsmodule::getbeamlength | ( | type(triadtype), intent(in) | triad1, |
type(triadtype), intent(in) | triad2, | ||
real(dp), dimension(3), intent(in) | normal, | ||
real(dp), intent(in) | h1, | ||
real(dp), intent(in) | h2, | ||
real(dp), dimension(3,4), intent(in), optional | Tlg, | ||
real(dp), dimension(2), intent(out), optional | weight, | ||
real(dp), intent(out) | Lb, | ||
real(dp), dimension(3), intent(out), optional | C0b, | ||
integer, intent(out), optional | iEnd | ||
) |
Computes the buoyancy length and center for a two-noded beam.
[in] | triad1 | Triad art first end of the beam |
[in] | triad2 | Triad art second end of the beam |
[in] | normal | Normal vector of the water surface in global coordinates |
[in] | h1 | Height of the water surface along the normal vector for end 1 |
[in] | h2 | Height of the water surface along the normal vector for end 2 |
[in] | Tlg | Local to global transformation matrix for the beam element |
[out] | weight | Buoyancy weight factors |
[out] | Lb | Length of the submerged part of the beam (buoyancy length) |
[out] | C0b | Centre of buoyancy |
[out] | iEnd | Which end is below the water surface, if partly submerged. iEnd < 0 : This element is completely submerged. iEnd = 0 : This element is completely in the air. |
subroutine, public hydrodynamicsmodule::getbuoyancyforces | ( | character(len=*), intent(in) | supId, |
type(triadptrtype), dimension(:), intent(in) | triads, | ||
real(dp), dimension(:,:), intent(in) | supTr, | ||
type(hydrodyntype), intent(inout) | hydyn, | ||
type(environmenttype), intent(inout) | env, | ||
real(dp), intent(out) | g, | ||
real(dp), intent(in) | time, | ||
integer, intent(in) | iter, | ||
real(dp), dimension(:), intent(inout), optional | Q, | ||
integer, intent(out) | ierr | ||
) |
Calculates buoyancy force resultant for a superelement or beam.
[in] | supId | ID string of the superelement used in feedback messages |
[in] | triads | Triads connected to the superelement |
[in] | supTr | Position matrix for the superelement |
hydyn | Data for hydrodynamic force calculation | |
env | Environmental data | |
[out] | g | Gravitation constant |
[in] | time | Current simulation time |
[in] | iter | Iteration counter |
Q | External nodal forces for beams, including buoyancy on output | |
[out] | ierr | Error flag |
The contributions to the external load vector form the hydrostatic buoyancy may optionally be calculated, but only for two-noded elements.
logical function, public hydrodynamicsmodule::getcalculatedfluidmotion | ( | type(triadtype), intent(in) | triad, |
real(dp), intent(out), optional | elev, | ||
real(dp), dimension(3), intent(out), optional | fvel, | ||
real(dp), dimension(3), intent(out), optional | facc | ||
) |
Returns the latest calculated fluid particle motion at a triad.
[in] | triad | The triad object to get particle motion data for |
[out] | elev | Sea surface elevation at the triad location |
[out] | fvel | Water particle velocity at the triad location |
[out] | facc | Water particle acceleration at the triad location |
subroutine, public hydrodynamicsmodule::getdiffractionforces | ( | real(dp), dimension(:), intent(inout) | Q, |
type(supeltype), intent(in) | sup, | ||
type(hydrodyntype), intent(inout) | hydyn, | ||
type(environmenttype), intent(in) | env, | ||
real(dp), intent(in) | time, | ||
integer, intent(inout) | ierr | ||
) |
Extracts the diffraction force at a given time for a superelement.
Q | External forces at centre of gravity including diffraction effects | |
[in] | sup | Superelement to extract diffraction forces |
hydyn | Data for hydrodynamic force calculation | |
[in] | env | Environmental data |
[in] | time | Current simulation time |
ierr | Error flag |
subroutine, public hydrodynamicsmodule::getdragforces | ( | real(dp), dimension(:), intent(inout) | Fd, |
type(supeltype), intent(in) | sup, | ||
type(hydrodyntype), intent(inout) | hydyn, | ||
type(environmenttype), intent(in) | env, | ||
real(dp), intent(in) | time, | ||
real(dp), intent(in) | dt, | ||
integer, intent(inout) | ierr | ||
) |
Calculates drag (and slam) forces for a (partly) submerged body.
Fd | Damping forces at the centre of gravity due to drag and slam | |
[in] | sup | Superelement to calculate damping forces for |
hydyn | Data for hydrodynamic force calculation | |
[in] | env | Environmental data |
[in] | time | Current simulation time |
[in] | dt | Time increment size |
ierr | Error flag |
subroutine, public hydrodynamicsmodule::getmorisonforces | ( | character(len=*), intent(in) | beamId, |
type(triadptrtype), dimension(:), intent(in) | triads, | ||
real(dp), dimension(:,:), intent(in) | supTr, | ||
real(dp), dimension(:), intent(in) | urd, | ||
real(dp), dimension(:), intent(in) | urdd, | ||
real(dp), dimension(:), intent(inout) | Q, | ||
real(dp), dimension(:,:), intent(out) | eMa, | ||
real(dp), dimension(:,:), intent(out) | eCd, | ||
type(hydrodyntype), intent(inout) | hydyn, | ||
type(environmenttype), intent(inout) | env, | ||
real(dp), intent(in) | time, | ||
integer, intent(in) | istep, | ||
integer, intent(in) | iter, | ||
integer, intent(out) | ierr | ||
) |
Calculates Morison force contributions for a two-noded beam element.
[in] | beamId | ID string of the beam element used in feedback messages |
[in] | triads | Triads connected to the beam elements |
[in] | supTr | Position matrix for the beam element |
[in] | urd | Nodal velocities in local coordinates |
[in] | urdd | Nodal accelerations in local coordinates |
Q | External nodal forces with added mass, drag and buoyancy terms | |
[out] | eMa | Element added mass matrix |
[out] | eCd | Element damping matrix due to drag |
hydyn | Data for hydrodynamic force calculation | |
env | Environmental data | |
[in] | time | Current simulation time |
[in] | istep | Time increment counter |
[in] | iter | Iteration counter |
[out] | ierr | Error flag |
The inertia- and damping forces due to added mass and drag are calculated for a two-noded element assuming a circular cross section. The corresponding left-hand side matrix contributions are also calculated. Buoyancy forces are also calculated, but no load-correction stiffness.
subroutine, public hydrodynamicsmodule::getseastate | ( | type(environmenttype), intent(in) | env, |
real(dp), intent(in) | time, | ||
real(dp), dimension(3), intent(in) | Xg, | ||
real(dp), dimension(:), intent(out) | sea, | ||
integer, intent(out) | stat | ||
) |
Evaluates the sea state at the given point and time.
[in] | env | Environmental data |
[in] | time | Current simulation time |
[in] | Xg | Global coordinates of sea kinematics evaluation point |
[out] | sea | Sea kinematics state at current point. sea(1:3) = Particle velocity at point Xg in global coordinates. sea(4:6) = Particle acceleration at point Xg in global coordinates. sea(7) = Dynamic pressure at point Xg in global coordinates. |
[out] | stat | Status flag (negative on error exit) |
real(dp) function, public hydrodynamicsmodule::getwaveelevation | ( | type(environmenttype), intent(in) | env, |
real(dp), dimension(3), intent(in) | Xg, | ||
real(dp), intent(in) | time, | ||
integer, intent(out) | stat | ||
) |
Returns the wave height at the given point and time.
[in] | env | Environmental data |
[in] | Xg | Global coordinates of sea kinematics evaluation point |
[in] | time | Current simulation time |
[out] | stat | Status flag (negative on error exit) |
subroutine, public hydrodynamicsmodule::initfluidmotions | ( | real(dp), intent(in) | time, |
type(environmenttype), intent(in) | env, | ||
type(triadtype), dimension(:), intent(in) | triads, | ||
type(supeltype), dimension(:), intent(in) | sups, | ||
integer, intent(out) | ierr | ||
) |
Initializes the fluid particle motion cache for all triads in water.
[in] | time | Current simulation time |
[in] | env | Environmental data |
[in] | triads | All triads in the model |
[in] | sups | All superelements in the model |
[out] | ierr | Error flag |
subroutine, public hydrodynamicsmodule::initiatehydrodynbodies | ( | type(supeltype), dimension(:), intent(inout) | sups, |
type(userdefeltype), dimension(:), intent(inout) | elms, | ||
type(environmenttype), intent(in) | env, | ||
logical, intent(in) | restart, | ||
integer, intent(out) | ierr | ||
) |
Initiates all hydrodynamic bodies in the model.
sups | All superelements in the model | |
elms | All user-defined elements in the model | |
[in] | env | Environmental data |
[in] | restart | If .true., this is a restart simulation |
[out] | ierr | Error flag |
|
private |
Updates the HydroDynType object after convergence has been achieved.
hydyn | Data for hydrodynamic force calculation | |
[in] | supTr | Position matrix for the superelement to update for |
[out] | ierr | Error flag |
subroutine hydrodynamicsmodule::updatehydrodynbody | ( | type(hydrodyntype), intent(inout) | hydyn, |
type(triadptrtype), dimension(:), intent(in) | triads, | ||
real(dp), dimension(:,:), intent(in) | supTr, | ||
real(dp), intent(in) | sLev, | ||
real(dp), dimension(3), intent(in) | gravity, | ||
real(dp), intent(out), optional | g, | ||
real(dp), dimension(2), intent(out), optional | wb, | ||
integer, intent(out) | ierr | ||
) |
Updates the hydrodynamic body quantities.
hydyn | Data for hydrodynamic force calculation | |
[in] | triads | Triads on the superelement to update hydrodynamics for |
[in] | supTr | Superelement position matrix |
[in] | sLev | Current sea level |
[in] | gravity | Global gravitation vector |
[out] | g | Gravitation constant |
[out] | wb | Buoyancy weight factors for two-noded beams |
[out] | ierr | Error flag |
real(dp) function hydrodynamicsmodule::watersurfacenormal | ( | real(dp), dimension(3), intent(out) | normal, |
real(dp), dimension(3), intent(in) | gravity, | ||
real(dp), dimension(:,:), intent(in), optional | Tlg | ||
) |
Returns the water surface normal vector in local coordinate system.
[out] | normal | Unit normal vector for the water surface |
[in] | gravity | Global gravitation vector |
[in] | Tlg | Local to global transformation matrix (optional) |
|
private |
Have calculated motions?
|
private |
Zero tolerance.
|
private |
Fluid particle motions.