Fix typo in FinSetCalc

This commit is contained in:
JoePfeiffer 2022-04-15 17:04:36 -06:00
parent 827da6d73a
commit 3ef3bdcbab
2 changed files with 4 additions and 3 deletions

View File

@ -585,6 +585,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
final InstanceMap imap = configuration.getActiveInstances(); final InstanceMap imap = configuration.getActiveInstances();
for(Map.Entry<RocketComponent, ArrayList<InstanceContext>> entry: imap.entrySet() ) { for(Map.Entry<RocketComponent, ArrayList<InstanceContext>> entry: imap.entrySet() ) {
final RocketComponent c = entry.getKey(); final RocketComponent c = entry.getKey();
if (!c.isAerodynamic()) if (!c.isAerodynamic())
continue; continue;
@ -596,7 +597,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
double cd = calcMap.get(c).calculatePressureCD(conditions, stagnation, base, double cd = calcMap.get(c).calculatePressureCD(conditions, stagnation, base,
warningSet); warningSet);
total += cd; total += cd;
if (forceMap != null) { if (forceMap != null) {
forceMap.get(c).setPressureCD(cd); forceMap.get(c).setPressureCD(cd);
} }
@ -625,7 +626,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
} }
} }
} }
return total; return total;
} }

View File

@ -624,7 +624,7 @@ public class FinSetCalc extends RocketComponentCalc {
@Override @Override
public double calculateFrictionCD(FlightConditions conditions, double componentCf, WarningSet warnings) { public double calculateFrictionCD(FlightConditions conditions, double componentCf, WarningSet warnings) {
double cd = componentCf * (1 + 2 * thickness / macLength) * 2; double cd = componentCf * (1 + 2 * thickness / macLength) * 2 * finArea / conditions.getRefArea();
return cd; return cd;
} }