namespace JSBSim {
-static const char *IdSrc = "$Id: FGTurbine.cpp,v 1.27 2010/05/24 11:26:37 jberndt Exp $";
+static const char *IdSrc = "$Id: FGTurbine.cpp,v 1.31 2011/03/03 12:16:26 jberndt Exp $";
static const char *IdHdr = ID_TURBINE;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
BypassRatio = BleedDemand = 0.0;
IdleThrustLookup = MilThrustLookup = MaxThrustLookup = InjectionLookup = 0;
N1_spinup = 1.0; N2_spinup = 3.0;
+ EPR = 1.0;
ResetToIC();
void FGTurbine::ResetToIC(void)
{
+
+ FGEngine::ResetToIC();
+
N1 = N2 = 0.0;
N2norm = 0.0;
correctedTSFC = TSFC;
// The main purpose of Calculate() is to determine what phase the engine should
// be in, then call the corresponding function.
-double FGTurbine::Calculate(void)
+void FGTurbine::Calculate(void)
{
double thrust;
+ RunPreFunctions();
+
TAT = (Auxiliary->GetTotalTemperature() - 491.69) * 0.5555556;
double qbar = Auxiliary->Getqbar();
dt = FDMExec->GetDeltaT() * Propulsion->GetRate();
default: thrust = Off();
}
- thrust = Thruster->Calculate(thrust); // allow thruster to modify thrust (i.e. reversing)
+ Thruster->Calculate(thrust); // allow thruster to modify thrust (i.e. reversing)
- return thrust;
+ RunPostFunctions();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MaxThrustLookup = new FGFunction(PropertyManager, function_element, property_prefix);
} else if (name == "Injection") {
InjectionLookup = new FGFunction(PropertyManager, function_element, property_prefix);
- } else {
- cerr << "Unknown function type: " << name << " in turbine definition." <<
- endl;
}
}
PropertyManager->Tie( property_name.c_str(), &Seized);
property_name = base_property_name + "/stalled";
PropertyManager->Tie( property_name.c_str(), &Stalled);
+ property_name = base_property_name + "/bleed-factor";
+ PropertyManager->Tie( property_name.c_str(), (FGTurbine*)this, &FGTurbine::GetBleedDemand, &FGTurbine::SetBleedDemand);
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%