-
-
Notifications
You must be signed in to change notification settings - Fork 532
Closed
Labels
Description
Fin set friction drag seems to be bugged after the refactor #1280. When changing fin count, the total Fin Set friction drag does not change.
// iterate across component instances
final ArrayList<InstanceContext> contextList = entry.getValue();
for(InstanceContext context: contextList ) {
double componentFrictionCD = calcMap.get(c).calculateFrictionCD(conditions, componentCf, warningSet);
if (c instanceof SymmetricComponent) {
SymmetricComponent s = (SymmetricComponent) c;
bodyFrictionCD += componentFrictionCD;
final double componentMinX = context.getLocation().x;
minX = Math.min(minX, componentMinX);
final double componentMaxX = componentMinX + c.getLength();
maxX = Math.max(maxX, componentMaxX);
final double componentMaxR = Math.max(s.getForeRadius(), s.getAftRadius());
maxR = Math.max(maxR, componentMaxR);
} else {
otherFrictionCD += componentFrictionCD;
}
if (map != null) {
map.get(c).setFrictionCD(componentFrictionCD);
}
}I'm not sure if OR treats each fin as a component, but if it treats them as a FinSet I think this is iterating only once per fin set.
In FinSetCalc, a single fin planform area is being used:
public double calculateFrictionCD(FlightConditions conditions, double componentCf, WarningSet warnings) {
double cd = componentCf * (1 + 2 * thickness / macLength) * 2 * finArea / conditions.getRefArea();
return cd;
}