Skip to content

Component Analysis window isn't properly reporting multiple instances of components #1440

@mvccogo

Description

@mvccogo

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;
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions