Skip to content

Commit

Permalink
Fix clumsy find-replace
Browse files Browse the repository at this point in the history
  • Loading branch information
ferram4 committed May 22, 2017
1 parent 026d8ff commit dcbc1ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions FerramAerospaceResearch/FARAeroComponents/FARAeroSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public void ClearAeroSection()
handledAeroModulesIndexDict.Clear();
}

public void PredictionCalculateAeroForces(float atmDensity, float machNumber, float reynoldsPerUnitLength, float pseudode LavalNumber, float skinFrictionDrag, Vector3 vel, ferram4.FARCenterQuery center)
public void PredictionCalculateAeroForces(float atmDensity, float machNumber, float reynoldsPerUnitLength, float pseudoKnudsenNumber, float skinFrictionDrag, Vector3 vel, ferram4.FARCenterQuery center)
{
if (partData.Count == 0)
return;
Expand Down Expand Up @@ -351,7 +351,7 @@ public void PredictionCalculateAeroForces(float atmDensity, float machNumber, fl
nForce *= normalForceFactor;

double xForce = -skinFrictionForce * Math.Sign(cosAoA) * cosSqrAoA;
double localVelForce = xForce * pseudode LavalNumber;
double localVelForce = xForce * pseudoKnudsenNumber;
xForce -= localVelForce;

localVelForce = Math.Abs(localVelForce);
Expand Down Expand Up @@ -430,7 +430,7 @@ public void PredictionCalculateAeroForces(float atmDensity, float machNumber, fl
center.AddTorque(torqueVector);
}

public void FlightCalculateAeroForces(float atmDensity, float machNumber, float reynoldsPerUnitLength, float pseudode LavalNumber, float skinFrictionDrag)
public void FlightCalculateAeroForces(float atmDensity, float machNumber, float reynoldsPerUnitLength, float pseudoKnudsenNumber, float skinFrictionDrag)
{

double skinFrictionForce = skinFrictionDrag * xForceSkinFriction.Evaluate(machNumber); //this will be the same for each part, so why recalc it multiple times?
Expand Down Expand Up @@ -489,7 +489,7 @@ public void FlightCalculateAeroForces(float atmDensity, float machNumber, float
nForce *= normalForceFactor;

double xForce = -skinFrictionForce * Math.Sign(cosAoA) * cosSqrAoA;
double localVelForce = xForce * pseudode LavalNumber;
double localVelForce = xForce * pseudoKnudsenNumber;
xForce -= localVelForce;

localVelForce = Math.Abs(localVelForce);
Expand Down
8 changes: 4 additions & 4 deletions FerramAerospaceResearch/FARAeroComponents/FARVesselAero.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ private void CalculateAndApplyVesselAeroProperties()
reynoldsNumber = FARAeroUtil.CalculateReynoldsNumber(vessel.atmDensity, Length, vessel.srfSpeed, machNumber, FlightGlobals.getExternalTemperature((float)vessel.altitude, vessel.mainBody), vessel.mainBody.atmosphereAdiabaticIndex);
float skinFrictionDragCoefficient = (float)FARAeroUtil.SkinFrictionDrag(reynoldsNumber, machNumber);

float pseudode LavalNumber = (float)(machNumber / (reynoldsNumber + machNumber));
float pseudoKnudsenNumber = (float)(machNumber / (reynoldsNumber + machNumber));

Vector3 frameVel = Krakensbane.GetFrameVelocityV3f();

Expand All @@ -295,7 +295,7 @@ private void CalculateAndApplyVesselAeroProperties()
}*/

for (int i = 0; i < _currentAeroSections.Count; i++)
_currentAeroSections[i].FlightCalculateAeroForces(atmDensity, (float)machNumber, (float)(reynoldsNumber / Length), pseudode LavalNumber, skinFrictionDragCoefficient);
_currentAeroSections[i].FlightCalculateAeroForces(atmDensity, (float)machNumber, (float)(reynoldsNumber / Length), pseudoKnudsenNumber, skinFrictionDragCoefficient);

_vesselIntakeRamDrag.ApplyIntakeRamDrag((float)machNumber, vessel.srf_velocity.normalized, (float)vessel.dynamicPressurekPa);

Expand Down Expand Up @@ -328,10 +328,10 @@ public void SimulateAeroProperties(out Vector3 aeroForce, out Vector3 aeroTorque
float reynoldsPerLength = reynoldsNumber / (float)Length;
float skinFriction = (float)FARAeroUtil.SkinFrictionDrag(reynoldsNumber, machNumber);

float pseudode LavalNumber = machNumber / (reynoldsNumber + machNumber);
float pseudoKnudsenNumber = machNumber / (reynoldsNumber + machNumber);

for(int i = 0; i < _currentAeroSections.Count; i++)
_currentAeroSections[i].PredictionCalculateAeroForces(density, machNumber, reynoldsPerLength, pseudode LavalNumber, skinFriction, velocityWorldVector, center);
_currentAeroSections[i].PredictionCalculateAeroForces(density, machNumber, reynoldsPerLength, pseudoKnudsenNumber, skinFriction, velocityWorldVector, center);

for (int i = 0; i < _legacyWingModels.Count; i++)
_legacyWingModels[i].PrecomputeCenterOfLift(velocityWorldVector, machNumber, density, center);
Expand Down
Binary file not shown.
Binary file modified GameData/FerramAerospaceResearch/Plugins/ferramGraph.dll
Binary file not shown.

0 comments on commit dcbc1ac

Please sign in to comment.