Pin CP to axis when calculating in BarrowmanCalculator.calculateNonAxialForces()

It turns out that the assumption of radial symmetry is absolutely pervasive in our CP calculations.  Looking at FinSetCalc.calculateNonAxialForces(), we don't actually compute the CP of a fin -- we calculate its X value, and pin it to Y=Z=0.

The only exception to this is in BarrowmanCalculator.calculateNonAxialForces(), where the pinning only takes place if there are three or more fins in a FinSet.  If we remove the test for number of fins in the FinSet, we are in essence making the assumption that there are more fins *somewhere* which will end up being radially symmetric.
This commit is contained in:
JoePfeiffer 2020-05-06 16:57:04 -06:00
parent 73dd6b7e7a
commit f0e5902e00
2 changed files with 2 additions and 10 deletions

View File

@ -204,8 +204,7 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
Coordinate cp_inst = instanceForces.getCP();
Coordinate cp_abs = context.transform.transform(cp_inst);
if ((comp instanceof FinSet) && (((FinSet)comp).getFinCount() > 2))
cp_abs = cp_abs.setY(0.0).setZ(0.0);
cp_abs = cp_abs.setY(0.0).setZ(0.0);
// if( 1e-6 < cp_inst.weight) {
// System.err.println("_________ cp:inst: (rel): " + cp_inst.toString());

View File

@ -338,20 +338,13 @@ public class BarrowmanCalculatorTest {
// results with and without it
// cpNoPods (0.34125,0.00000,0.00000,w=16.20502) -- interference disabled
// cpNoPods (0.34797,0.00000,0.00000,w=19.34773) -- interference enabled
// another note: the fact that this is seen as three one-fin
// FinSets instead of a single three-fin FinSet means the CP
// will be off-axis (one of the fins is taken as having an
// angle of 0 to the airstream, so it has no contribution).
// This doesn't turn out to cause a problem in an actual
// simulation.
final Coordinate cpNoPods = calcNoPods.getCP(configNoPods, conditionsNoPods, warningsNoPods);
final Coordinate cpPods = calcPods.getCP(configPods, conditionsPods, warningsPods);
System.out.printf("with pods %s\n", cpPods.toString());
System.out.printf("without pods %s\n", cpNoPods.toString());
assertEquals(" Alpha III With Pods rocket cp x value is incorrect:", cpNoPods.x - 0.002788761352, cpPods.x, EPSILON);
assertEquals(" Alpha III With Pods rocket cp y value is incorrect:", cpNoPods.y - 0.005460218430206499, cpPods.y, EPSILON);
assertEquals(" Alpha III With Pods rocket cp y value is incorrect:", cpNoPods.y, cpPods.y, EPSILON);
assertEquals(" Alpha III With Pods rocket cp z value is incorrect:", cpNoPods.z, cpPods.z, EPSILON);
assertEquals(" Alpha III With Pods rocket CNa value is incorrect:", cpPods.weight, cpNoPods.weight - 3.91572, EPSILON);
}