29inline DragFactors Factors(
double rho,
double cdNormal,
double cdTangential,
double diskD,
double diskT,
double cableD)
31 return {DiskBase::DragForceNormal(rho, cdNormal, diskD, diskT, cableD, 1.0, 1.0),
32 DiskBase::DragForceTangential(rho, cdTangential, diskD, diskT, cableD, 1.0, 1.0)};
42inline void Decompose(
const double n[3],
const double v[3],
double vNormal[3],
double vTang[3])
44 const double along = n[0] * v[0] + n[1] * v[1] + n[2] * v[2];
45 for (
int i = 0; i < 3; i++) {
46 vNormal[i] = along * n[i];
47 vTang[i] = v[i] - vNormal[i];
52inline double Norm(
const double w[3])
54 return std::sqrt(w[0] * w[0] + w[1] * w[1] + w[2] * w[2]);
69 double vNormal[3], vTang[3];
71 const double speedNormal =
Norm(vNormal);
72 const double speedTang =
Norm(vTang);
73 for (
int i = 0; i < 3; i++)
74 force[i] = -k.
normal * speedNormal * vNormal[i] - k.
tangential * speedTang * vTang[i];
90 double vNormal[3], vTang[3];
92 const double speedNormal =
Norm(vNormal);
93 const double speedTang =
Norm(vTang);
94 for (
int i = 0; i < 3; i++) {
95 for (
int j = 0; j < 3; j++) {
96 const double identity = (i == j) ? 1.0 : 0.0;
97 const double projNormal = n[i] * n[j];
98 const double projTang = identity - projNormal;
99 double dNormal = speedNormal * projNormal;
100 if (speedNormal > 0.0) dNormal += vNormal[i] * vNormal[j] / speedNormal;
101 double dTang = speedTang * projTang;
102 if (speedTang > 0.0) dTang += vTang[i] * vTang[j] / speedTang;
Quadratic drag on a Net/Disk (MARE-0098).
Definition DiskDrag.h:11
void Decompose(const double n[3], const double v[3], double vNormal[3], double vTang[3])
Splits a velocity into its components along and across the disk axis.
Definition DiskDrag.h:42
double Norm(const double w[3])
Euclidean length of a 3-vector.
Definition DiskDrag.h:52
void DragForce(const double n[3], const double relVel[3], const DragFactors &k, double force[3])
The drag force on the disk (lead ruling R24).
Definition DiskDrag.h:67
DragFactors Factors(double rho, double cdNormal, double cdTangential, double diskD, double diskT, double cableD)
The drag factors of a disk, with the areas of DiskBase.
Definition DiskDrag.h:29
void DragVelocityJacobian(const double n[3], const double relVel[3], const DragFactors &k, double dForceDv[9])
The derivative of DragForce with respect to relVel, for a fixed axis.
Definition DiskDrag.h:88
The factor ½ρCA of each drag component.
Definition DiskDrag.h:14
double tangential
½ρ C_t A_t, with the edge area A_t [kg/m].
Definition DiskDrag.h:16
double normal
½ρ C_n A_n, with the face area A_n [kg/m].
Definition DiskDrag.h:15