15#include "sfh/math/math.h"
21constexpr double kMaxCompressionSpeedSaturation = 1.0e2;
24constexpr double kMinLengthSaturation = 1.0e-3;
26constexpr double kMaxLengthSaturation = 1.0e4;
28namespace cable_axial_law
54inline Tension AxialTension(
const Element& element,
double length,
double compressionSpeed)
56 const double boundedLength = sfh::math::Bound(length, kMinLengthSaturation, kMaxLengthSaturation);
57 const double clampedSpeed = sfh::math::Bound(compressionSpeed, -kMaxCompressionSpeedSaturation, kMaxCompressionSpeedSaturation);
59 if (!(strain == strain))
63 const double sum = spring + damping;
69 const bool lengthOut = length < kMinLengthSaturation || length > kMaxLengthSaturation;
70 const bool speedOut = std::fabs(compressionSpeed) >= kMaxCompressionSpeedSaturation;
78inline double SpringTension(
const Element& element,
double strain)
80 return sfh::math::Bound(strain * element.stiffnessFactor * element.stiffness + (1.0 - element.stiffnessFactor) * element.meanTension, 0.0,
92inline void EndBlocks(
const Tension& tension,
const double direction[3],
double length,
const double relativeVelocity[3],
double dFA_dpB[9],
95 const double* e = direction;
97 for (
int k = 0; k < 3; k++)
98 s += relativeVelocity[k] * e[k];
100 for (
int k = 0; k < 3; k++)
101 relVelPerp[k] = relativeVelocity[k] - e[k] * s;
103 for (
int k = 0; k < 3; k++) {
104 for (
int j = 0; j < 3; j++) {
105 const double dij = (k == j) ? 1.0 : 0.0;
106 dFA_dpB[k * 3 + j] = (dij - e[k] * e[j]) * tension.value / length + e[k] * e[j] * tension.lengthSlope + e[k] * tension.speedSlope * relVelPerp[j] / length;
107 dFA_dvA[k * 3 + j] = tension.speedSlope * e[k] * e[j];
The axial properties of one element at one evaluation (CableElDynStiff::AxialElement).
Definition CableAxialLaw.h:32
double dampingCoeff
c < 0 [N s/m]; the law applies √eFactor.
Definition CableAxialLaw.h:37
double maxTension
[N].
Definition CableAxialLaw.h:38
double stiffnessFactor
eFactor in (0, 1]: the share of EA that acts at once.
Definition CableAxialLaw.h:35
double meanTension
The mean tension, held through the step, so it has no derivative (MARE-0359) [N].
Definition CableAxialLaw.h:36
double relaxedLength
L0 > 0 [m].
Definition CableAxialLaw.h:33
double stiffness
EA [N].
Definition CableAxialLaw.h:34
The tension at one state and its two slopes.
Definition CableAxialLaw.h:43
double lengthSlope
∂T/∂L = eFactor EA / L0; 0 where T is bounded or L is outside the length bounds [N/m].
Definition CableAxialLaw.h:46
double value
T in [0, maxTension] [N].
Definition CableAxialLaw.h:45
bool bounded
The unbounded sum is <= 0 or >= maxTension.
Definition CableAxialLaw.h:48
double speedSlope
∂T/∂s = c √eFactor; 0 where T is bounded or |s| >= kMaxCompressionSpeedSaturation [N s/m].
Definition CableAxialLaw.h:47
double strain
ε, from the bounded length; 0 if not a number.
Definition CableAxialLaw.h:44