[resolves #423][partial] BarrowmanCalculator no longer multiplies instanced leaf nodes.
This commit is contained in:
parent
7e5ab5de32
commit
4cb8a03454
@ -195,30 +195,17 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
|||||||
calcObj.calculateNonaxialForces(conditions, forces, warnings);
|
calcObj.calculateNonaxialForces(conditions, forces, warnings);
|
||||||
|
|
||||||
|
|
||||||
// // to account for non axi-symmetric rockets such as a Delta-IV heavy, or a Falcon-9 Heavy
|
// previous unstable version
|
||||||
// if(( ! component.isAxisymmetric()) &&( component instanceof RingInstanceable )){
|
// int instanceCount = component.getLocations().length;
|
||||||
// RingInstanceable ring = (RingInstanceable)component;
|
final boolean isAssembly = (component.allowsChildren() && (component.getInstanceCount() > 1));
|
||||||
// forces.setAxisymmetric(false);
|
|
||||||
// total.setAxisymmetric(false);
|
// we will need to adjust the calculations *somehow* here...
|
||||||
//
|
|
||||||
// // TODO : Implement Best-Case, Worst-Case Cp calculations
|
|
||||||
// double minAngle = ring.getAngularOffset(); // angle of minimum CP, MOI
|
|
||||||
// double maxAngle = minAngle+Math.PI/2; // angle of maximum CP, MOI
|
|
||||||
//
|
|
||||||
// // worst case: ignore the CP contribution from *twin* externals
|
|
||||||
// // NYI
|
|
||||||
//
|
|
||||||
// // best case: the twins contribute their full CP broadside
|
|
||||||
// // NYI
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
int instanceCount = component.getLocations().length;
|
|
||||||
Coordinate x_cp_comp = forces.getCP();
|
Coordinate x_cp_comp = forces.getCP();
|
||||||
Coordinate x_cp_weighted = x_cp_comp.setWeight(x_cp_comp.weight * instanceCount);
|
Coordinate x_cp_weighted = x_cp_comp.setWeight(x_cp_comp.weight);
|
||||||
Coordinate x_cp_absolute = component.toAbsolute(x_cp_weighted)[0];
|
Coordinate x_cp_absolute = component.toAbsolute(x_cp_weighted)[0];
|
||||||
forces.setCP(x_cp_absolute);
|
forces.setCP(x_cp_absolute);
|
||||||
double CN_instanced = forces.getCN() * instanceCount;
|
double CN_instanced = forces.getCN();
|
||||||
forces.setCm(CN_instanced * forces.getCP().x / conditions.getRefLength());
|
forces.setCm(CN_instanced * forces.getCP().x / conditions.getRefLength());
|
||||||
|
|
||||||
if (map != null) {
|
if (map != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user