Hello! I'm remaking vessel modules for the Mercury capsule, and having some trouble with the aerodynamic definitions.
I found coefficients for drag (cd), moment (cm) and lift (cl) in NTRS document 19710069960 (specifically pages 25-27).
I must admit: I'm not much used to aerodynamics, so my implementation could be wrong. But what I've done is to have the values for cd, cm and cl in the vertical lift function (vlift), and cd and cl in the horizontal lift (hlift), while setting cm = 0 in hlift, and halving the cd and cl from hlift and vlift, so that the sum of the cd is the original value from the NTRS document.
But, the problem is in the rotation. The cm orients the spacecraft blunt side first, as in real life. But historically, a 10 degree per second rotation was applied with roll thruster during reentry. During my simulation, the capsule simply refuses to roll. See video here
What changes do I need to do to make the capsule orient itself correctly when entering the atmosphere, but still allow rolling of the capsule?
The vlift and hlift functions are here:
The thrusters should have pressure-independent thrust/isp, and should give a 1 deg/s^2 acceleration. But also an initial roll is dampened by the airfoils.
So what have I done wrong?
Also, as a sidequestion: on page 27 of the NTRS document, at 0 deg angle and mach 0 the cd is listed as 1.00. Is it fair to assume that this is the actual cd, or do you imagine it has been normalised? I must say I haven't read the entire 111 page document, but haven't found a specific indication for normalisation so far.
---------- Post added 19th Nov 2019 at 08:49 ---------- Previous post was 18th Nov 2019 at 22:23 ----------
And this is how the airfoils are created, by the way:
I.e. assuming capsule diameter 1.89 m and contact surface [math]\frac{\pi d^2}{4}[/math]
---------- Post added at 12:24 ---------- Previous post was at 08:49 ----------
I just discovered API call SetRotDrag, so I got the main question answered myself.
I found coefficients for drag (cd), moment (cm) and lift (cl) in NTRS document 19710069960 (specifically pages 25-27).
I must admit: I'm not much used to aerodynamics, so my implementation could be wrong. But what I've done is to have the values for cd, cm and cl in the vertical lift function (vlift), and cd and cl in the horizontal lift (hlift), while setting cm = 0 in hlift, and halving the cd and cl from hlift and vlift, so that the sum of the cd is the original value from the NTRS document.
But, the problem is in the rotation. The cm orients the spacecraft blunt side first, as in real life. But historically, a 10 degree per second rotation was applied with roll thruster during reentry. During my simulation, the capsule simply refuses to roll. See video here
The vlift and hlift functions are here:
PHP:
void ProjectMercury::vlift(VESSEL* v, double aoa, double M, double Re, void* context, double* cl, double* cm, double* cd)
{
static const double cmp[13] = { // for mach 1
0, -0.204, -0.193, -0.238, -0.337, -0.223, 0.03, 0.23, 0.31, 0.235, 0.194, 0.192, 0
};
static const double clp[13] = { // for mach 1
0, -0.42, -0.04, 0.38, -0.38, -0.45, 0.06, 0.4, 0.24, -0.38, 0.02, 0.42, 0.0
};
// cd is dependent on mach, for aoa 0
static const double mach[14] = {
0.0, 0.50, 0.7, 0.90, 1.00, 1.1, 1.30, 1.60, 2.00, 3.0, 5.00, 7.0, 9.6, 20.0
};
static const double cdp[14] = { // drag coeff at 0 AoA (blunt side first) for different mach numbers
1.0, 1.02, 1.1, 1.23, 1.34, 1.4, 1.46, 1.49, 1.53, 1.6, 1.56, 1.5, 1.5, 1.5
};
double aoastep = 30.0 * RAD;
aoa += PI;
int idx = max(0, min(11, (int)(aoa / aoastep)));
double d = aoa / aoastep - idx;
int i = 0;
while (i < 14 && M > mach[i])
{
i++;
}
double machFraction;
if (i == 14)
{
*cd = cdp[13];
}
else if (i == 0)
{
*cd = cdp[0];
}
else
{
*cd = cdp[i - 1] + (cdp[i] - cdp[i - 1]) * (M - mach[i - 1]) / (mach[i] - mach[i - 1]);
}
*cl = clp[idx] + (clp[idx + 1] - clp[idx]) * d;
*cm = cmp[idx] + (cmp[idx + 1] - cmp[idx]) * d;
*cd *= 0.5;
}
void ProjectMercury::hlift(VESSEL* v, double aoa, double M, double Re, void* context, double* cl, double* cm, double* cd)
{
static const double cmp[13] = {
0, 0.204, 0.193, 0.238, 0.337, 0.223, -0.03, -0.23, -0.31, -0.235, -0.194, -0.192, 0
};
static const double clp[13] = {
0, -0.42, -0.04, 0.38, -0.38, -0.45, 0.06, -0.45, -0.38, 0.38, -0.04, -0.42, 0.0
};
static const double mach[14] = {
0.0, 0.50, 0.7, 0.90, 1.00, 1.1, 1.30, 1.60, 2.00, 3.0, 5.00, 7.0, 9.6, 20.0
};
static const double cdp[14] = { // drag coeff at 0 AoA (blunt side first) for different mach numbers
1.0, 1.02, 1.1, 1.23, 1.34, 1.4, 1.46, 1.49, 1.53, 1.6, 1.56, 1.5, 1.5, 1.5
};
int i = 0;
while (i < 14 && M > mach[i])
{
i++;
}
double machFraction;
if (i == 14)
{
*cd = cdp[13];
}
else if (i == 0)
{
*cd = cdp[0];
}
else
{
*cd = cdp[i - 1] + (cdp[i] - cdp[i - 1]) * (M - mach[i - 1]) / (mach[i] - mach[i - 1]);
}
double aoastep = 30.0 * RAD;
aoa += PI;
int idx = max(0, min(11, (int)(aoa / aoastep)));
double d = aoa / aoastep - idx;
*cl = clp[idx] + (clp[idx + 1] - clp[idx]) * d;
*cm = 0.0;
*cd *= 0.5;
}
The thrusters should have pressure-independent thrust/isp, and should give a 1 deg/s^2 acceleration. But also an initial roll is dampened by the airfoils.
So what have I done wrong?
Also, as a sidequestion: on page 27 of the NTRS document, at 0 deg angle and mach 0 the cd is listed as 1.00. Is it fair to assume that this is the actual cd, or do you imagine it has been normalised? I must say I haven't read the entire 111 page document, but haven't found a specific indication for normalisation so far.
---------- Post added 19th Nov 2019 at 08:49 ---------- Previous post was 18th Nov 2019 at 22:23 ----------
And this is how the airfoils are created, by the way:
PHP:
CreateAirfoil3(LIFT_VERTICAL, _V(0, 0, 0.635), vlift, NULL, 1.89, 1.89 * 1.89 * PI / 4.0, 1.0);
CreateAirfoil3(LIFT_HORIZONTAL, _V(0, 0, 0.635), hlift, NULL, 1.89, 1.89 * 1.89 * PI / 4.0, 1.0); // spherical symmetry
---------- Post added at 12:24 ---------- Previous post was at 08:49 ----------
I just discovered API call SetRotDrag, so I got the main question answered myself.