|
|
| NetElement3N (const std::string netName, const unsigned long iID, const NetElementDef *netPanel, const double dRho_water, const double knotDiameter, const double knotMomStiff, const double dKknotMomStiff_contact, const net_solidity::PanelSolidity &solidity, const double dampingRatio) |
| | The constructor.
|
| |
|
| ~NetElement3N (void) |
| | The destructor.
|
| |
|
| NetElement3N (const NetElement3N &)=delete |
| |
|
NetElement3N & | operator= (const NetElement3N &)=delete |
| |
| template<class T > |
| void | AddNodeForces (const hydrodynamics::PanelLoadLaw &law, const hydrodynamics::Fluid &fluid, const T *const posA_ned, const T *const posB_ned, const T *const posC_ned, const T *const velA_ned, const T *const velB_ned, const T *const velC_ned, const T *const waterVel_ned, T *const nodeAforce_ned, T *const nodeBforce_ned, T *const nodeCforce_ned, double addedLinearDrag=0.0, const hydrodynamics::PanelClampLog *clampLog=nullptr) const |
| |
| void | NodeForceJacobian (const hydrodynamics::PanelLoadLaw &law, const hydrodynamics::Fluid &fluid, const double posA_ned[3], const double posB_ned[3], const double posC_ned[3], const double velA_ned[3], const double velB_ned[3], const double velC_ned[3], const double waterVel_ned[3], double addedLinearDrag, double dF[3][6][9]) const |
| |
| hydrodynamics::PanelLoad< double > | EvaluatePanelLoad (const hydrodynamics::PanelLoadLaw &law, const hydrodynamics::Fluid &fluid, const double *const posA_ned, const double *const posB_ned, const double *const posC_ned, const double elementVel[3], const double waterVel_ned[3], double &area) const |
| |
|
bool | HasBarDirections () const |
| | True when the bar directions are defined, which needs a non-zero mesh determinant.
|
| |
|
double | Solidity (double meshOpeningAngle) const |
| | The solidity of the element at the given mesh half opening angle [rad].
|
| |
|
double | Solidity (const double *const posA_ned, const double *const posB_ned, const double *const posC_ned) const |
| | The solidity of the element at the given node positions, global frame.
|
| |
|
double | WakeSolidity (const double *const posA_ned, const double *const posB_ned, const double *const posC_ned) const |
| | The solidity the element hands to its wake source at the given node positions, global frame (NetSolidity.h WakeSolidity, R56).
|
| |
|
double | CalcNodeInertia (int node) |
| | Calculates the inertia of a node.
|
| |
template<class T >
| void NetElement3N::AddNodeForces |
( |
const hydrodynamics::PanelLoadLaw & |
law, |
|
|
const hydrodynamics::Fluid & |
fluid, |
|
|
const T *const |
posA_ned, |
|
|
const T *const |
posB_ned, |
|
|
const T *const |
posC_ned, |
|
|
const T *const |
velA_ned, |
|
|
const T *const |
velB_ned, |
|
|
const T *const |
velC_ned, |
|
|
const T *const |
waterVel_ned, |
|
|
T *const |
nodeAforce_ned, |
|
|
T *const |
nodeBforce_ned, |
|
|
T *const |
nodeCforce_ned, |
|
|
double |
addedLinearDrag = 0.0, |
|
|
const hydrodynamics::PanelClampLog * |
clampLog = nullptr |
|
) |
| const |
|
inline |
Adds this element's contribution to the forces on its three nodes.
Templated on the scalar type: over double it is the force function, over sfh::ad::Dual<N> it gives the element's exact Jacobian (NodeForceJacobian). The solidity comes from the element's rule (NetSolidity.h), at the mesh opening angle of the given positions, and the hydrodynamic force from one evaluation of law (NetElement3NForces.h).
- Parameters
-
| [in] | law | The panel load law. |
| [in] | fluid | Density and kinematic viscosity. |
| [in] | posA_ned | Position of node A, global frame. |
| [in] | posB_ned | Position of node B, global frame. |
| [in] | posC_ned | Position of node C, global frame. |
| [in] | velA_ned | Velocity of node A, global frame. |
| [in] | velB_ned | Velocity of node B, global frame. |
| [in] | velC_ned | Velocity of node C, global frame. |
| [in] | waterVel_ned | Free-stream water velocity at the element, global frame. |
| [in,out] | nodeAforce_ned | Accumulator for the force on node A. |
| [in,out] | nodeBforce_ned | Accumulator for the force on node B. |
| [in,out] | nodeCforce_ned | Accumulator for the force on node C. |
| [in] | addedLinearDrag | Additional linear drag per node. |
| [in] | clampLog | Receives the load law's clamp flags (MARE-0140); none when null. |
| void NetElement3N::NodeForceJacobian |
( |
const hydrodynamics::PanelLoadLaw & |
law, |
|
|
const hydrodynamics::Fluid & |
fluid, |
|
|
const double |
posA_ned[3], |
|
|
const double |
posB_ned[3], |
|
|
const double |
posC_ned[3], |
|
|
const double |
velA_ned[3], |
|
|
const double |
velB_ned[3], |
|
|
const double |
velC_ned[3], |
|
|
const double |
waterVel_ned[3], |
|
|
double |
addedLinearDrag, |
|
|
double |
dF[3][6][9] |
|
) |
| const |
|
inline |
The exact Jacobian of the node forces AddNodeForces adds: the derivatives of the forces on A, B and C with respect to the positions and velocities of A, B and C.
Forward-mode AD over sfh::ad::Dual<12> (MARE-0205). Nine slots carry the positions. The node velocities enter the force only through their mean, in the load law, and linearly, in the damping (NetElement3NForces.h, AddNodeForces and CalcDampingForces). So the three remaining slots carry the three components of all three velocities at once: their gradient on node n's force is G_n = sum_m dF_n/dv_m = L'/3 - (a/3) I, where L' is the law's derivative with respect to the mean velocity and a the added linear drag (the damping part cancels). Each velocity block is then dF_n/dv_m = (G_n + (a/3) I)/3 + c (1/3 - delta_nm) I - (a/3) delta_nm I, with c the damping coefficient: the Jacobian of AddNodeForces over Dual<18>, to rounding, at about half its cost.
- Parameters
-
| [in] | law | The panel load law. |
| [in] | fluid | Density and kinematic viscosity. |
| [in] | posA_ned | Position of node A, global frame (likewise B and C). |
| [in] | velA_ned | Velocity of node A, global frame (likewise B and C). |
| [in] | waterVel_ned | Free-stream water velocity at the element, a constant. |
| [in] | addedLinearDrag | Additional linear drag per node, as for AddNodeForces. |
| [out] | dF | dF[node][group], node 0..2 = A, B, C, group 0..2 = the positions of A, B, C and 3..5 their velocities; each block 3x3 row-major, dF[node][group][3 * j + k] = dF_j / dx_k. |