adjusted cp to change based on a component's instance count
This commit is contained in:
parent
29ec764b61
commit
7882304839
@ -204,8 +204,14 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
// Call calculation method
|
// Call calculation method
|
||||||
forces.zero();
|
forces.zero();
|
||||||
calcMap.get(component).calculateNonaxialForces(conditions, forces, warnings);
|
calcMap.get(component).calculateNonaxialForces(conditions, forces, warnings);
|
||||||
forces.setCP(component.toAbsolute(forces.getCP())[0]);
|
|
||||||
forces.setCm(forces.getCN() * forces.getCP().x / conditions.getRefLength());
|
int instanceCount = component.getLocation().length;
|
||||||
|
Coordinate x_cp_comp = forces.getCP();
|
||||||
|
Coordinate x_cp_weighted = x_cp_comp.setWeight(x_cp_comp.weight * instanceCount);
|
||||||
|
Coordinate x_cp_absolute = component.toAbsolute(x_cp_weighted)[0];
|
||||||
|
forces.setCP(x_cp_absolute);
|
||||||
|
double CN_instanced = forces.getCN() * instanceCount;
|
||||||
|
forces.setCm(CN_instanced * forces.getCP().x / conditions.getRefLength());
|
||||||
|
|
||||||
if (map != null) {
|
if (map != null) {
|
||||||
AerodynamicForces f = map.get(component);
|
AerodynamicForces f = map.get(component);
|
||||||
@ -664,9 +670,9 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
FinSet f = (FinSet) c;
|
FinSet f = (FinSet) c;
|
||||||
mul += 0.6 * Math.min(f.getFinCount(), 4) * f.getFinArea() *
|
mul += 0.6 * Math.min(f.getFinCount(), 4) * f.getFinArea() *
|
||||||
MathUtil.pow3(Math.abs(f.toAbsolute(new Coordinate(
|
MathUtil.pow3(Math.abs(f.toAbsolute(new Coordinate(
|
||||||
((FinSetCalc) calcMap.get(f)).getMidchordPos()))[0].x
|
((FinSetCalc) calcMap.get(f)).getMidchordPos()))[0].x
|
||||||
- cgx)) /
|
- cgx)) /
|
||||||
(conditions.getRefArea() * conditions.getRefLength());
|
(conditions.getRefArea() * conditions.getRefLength());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user