From: Bertrand <bco...@us...> - 2017-02-26 12:09:49
|
Update of /cvsroot/jsbsim/JSBSim/src/models/propulsion In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14476/src/models/propulsion Modified Files: FGPropeller.cpp FGPropeller.h Log Message: The propeller required power was computed with an advance ratio which did not account for the engine tilt (using in.AeroUVW instead of localAeroVel). This is not supposed to make much difference but this patch brings consistency and saves a bit of computation since J is now only computed once. Index: FGPropeller.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/models/propulsion/FGPropeller.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -r1.58 -r1.59 *** FGPropeller.cpp 4 Jun 2016 11:06:51 -0000 1.58 --- FGPropeller.cpp 26 Feb 2017 12:09:46 -0000 1.59 *************** *** 188,191 **** --- 188,199 ---- //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + void FGPropeller::ResetToIC(void) + { + FGThruster::ResetToIC(); + Vinduced = 0.0; + } + + //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% // // We must be getting the aerodynamic velocity here, NOT the inertial velocity. *************** *** 212,220 **** HelicalTipMach = sqrt(Vtip*Vtip + Vel*Vel) / in.Soundspeed; - PowerAvailable = EnginePower - GetPowerRequired(); - if (RPS > 0.0) J = Vel / (Diameter * RPS); // Calculate J normally else J = Vel / Diameter; if (MaxPitch == MinPitch) { // Fixed pitch prop ThrustCoeff = cThrust->GetValue(J); --- 220,228 ---- HelicalTipMach = sqrt(Vtip*Vtip + Vel*Vel) / in.Soundspeed; if (RPS > 0.0) J = Vel / (Diameter * RPS); // Calculate J normally else J = Vel / Diameter; + PowerAvailable = EnginePower - GetPowerRequired(); + if (MaxPitch == MinPitch) { // Fixed pitch prop ThrustCoeff = cThrust->GetValue(J); *************** *** 287,297 **** double FGPropeller::GetPowerRequired(void) { ! double cPReq, J; ! double rho = in.Density; ! double Vel = in.AeroUVW(eU) + Vinduced; ! double RPS = RPM / 60.0; ! ! if (RPS != 0.0) J = Vel / (Diameter * RPS); ! else J = Vel / Diameter; if (MaxPitch == MinPitch) { // Fixed pitch prop --- 295,299 ---- double FGPropeller::GetPowerRequired(void) { ! double cPReq; if (MaxPitch == MinPitch) { // Fixed pitch prop *************** *** 350,356 **** if (CpMach) cPReq *= CpMach->GetValue(HelicalTipMach); double local_RPS = RPS < 0.01 ? 0.01 : RPS; ! PowerRequired = cPReq*local_RPS*local_RPS*local_RPS*D5*rho; vTorque(eX) = -Sense*PowerRequired / (local_RPS*2.0*M_PI); --- 352,359 ---- if (CpMach) cPReq *= CpMach->GetValue(HelicalTipMach); + double RPS = RPM / 60.0; double local_RPS = RPS < 0.01 ? 0.01 : RPS; ! PowerRequired = cPReq*local_RPS*local_RPS*local_RPS*D5*in.Density; vTorque(eX) = -Sense*PowerRequired / (local_RPS*2.0*M_PI); Index: FGPropeller.h =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/models/propulsion/FGPropeller.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** FGPropeller.h 2 Jan 2016 17:42:53 -0000 1.26 --- FGPropeller.h 26 Feb 2017 12:09:46 -0000 1.27 *************** *** 164,167 **** --- 164,169 ---- ~FGPropeller(); + void ResetToIC(void); + /** Sets the Revolutions Per Minute for the propeller. Normally the propeller instance will calculate its own rotational velocity, given the Torque |