16#include "CPrintDuringExec.h"
19#define MYMAX(x,y) (x) > (y) ? (x) : (y)
20#define MYMIN(x,y) (x) < (y) ? (x) : (y)
23static const double gd_PI = 3.14159265358979323846;
107 ISignalPort* m_M_load;
108 ISignalPort* m_N_eng_SP;
109 ISignalPort* m_pInM_SP;
110 ISignalPort* m_MinLambda_SP;
133 IMEP = IP = M_CC = W_InM = T_ExP = X = W_ExP = W_fuel = Lambda = 0;
170 M_eng = N_eng = P_eng = 0;
189 W_trb = T_cmp = W_cmp = M_trb = M_cmp = N_TC = k = PR_trb = PR_cmp = 1;
209 double MaxFuelPrCycle;
214 MaxFuelPrCycle = FuelPrCycle = 1e-3;
272 CCIEngine(
const string& simobjectname, ISimObjectCreator*
const creator);
277 const double* out_CC_IP(
const double T,
const double*
const X);
278 const double* out_CC_Lambda(
const double T,
const double*
const X);
279 const double* out_CC_M_CC(
const double T,
const double*
const X);
280 const double* out_CC_T_ExP(
const double T,
const double*
const X);
281 const double* out_CC_W_ExP(
const double T,
const double*
const X);
282 const double* out_CC_W_fuel(
const double T,
const double*
const X);
283 const double* out_CC_W_InM(
const double T,
const double*
const X);
284 const double* out_CC_X(
const double T,
const double*
const X);
287 const double* out_InM_p(
const double T,
const double*
const X);
290 const double* out_ExM_p(
const double T,
const double*
const X);
293 const double* out_CS_M_eng(
const double T,
const double*
const X);
294 const double* out_CS_N_eng(
const double T,
const double*
const X);
295 const double* out_CS_P_eng(
const double T,
const double*
const X);
298 const double* out_TC_K_cmp(
const double T,
const double*
const X);
299 const double* out_TC_M_trb(
const double T,
const double*
const X);
300 const double* out_TC_M_cmp(
const double T,
const double*
const X);
301 const double* out_TC_PR_cmp(
const double T,
const double*
const X);
302 const double* out_TC_PR_trb(
const double T,
const double*
const X);
303 const double* out_TC_T_cmp(
const double T,
const double*
const X);
304 const double* out_TC_W_cmp(
const double T,
const double*
const X);
305 const double* out_TC_W_trb(
const double T,
const double*
const X);
306 const double* out_TC_N_TC(
const double T,
const double*
const X);
309 const double* out_IC_T_IC(
const double T,
const double*
const X);
312 const double* out_ECU_FuelPrCyc(
const double T,
const double*
const X);
313 const double* out_ECU_MaxFuelPrCyc(
const double T,
const double*
const X);
314 const double* out_ECU_WGOpening(
const double T,
const double*
const X);
317 void OdeFcn(
const double T,
const double *
const X,
double *
const XDot,
const bool bIsMajorTimeStep);
319#ifdef FH_VISUALIZATION
322 virtual void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
325 virtual void RenderUpdate(
const double T,
const double*
const X);
333 double IntegratorAntiWindup(
const double*
const adX,
StateType *p_StateInfo,
double Dot);
339 double CalcCS(
const double T,
const double*
const X);
341 double CalcECUWG(
const double T,
const double*
const X);
342 double CalcECUMaxFuelPrCycle(
const double T,
const double*
const X);
343 double CalcECUFuelPrCycle(
const double T,
const double*
const X);
346 double PIController(
PIType *p_PI,
StateType *p_State,
const double*
const adX);
367 CPrintDuringExec* m_Print;
369#ifdef FH_VISUALIZATION
370 Ogre::SceneNode* m_RenderNode;
Definition: CIEngine.h:269
ModelInType m_InMod
Model input indexes.
Definition: CIEngine.h:362
const double * out_CC_IMEP(const double T, const double *const X)
Output functions.
CCIEngine(const string &simobjectname, ISimObjectCreator *const creator)
The constructor sets the pointer to the output object and the parser object.
bool LoadParameterFile(ISimObjectCreator *creator)
Loads engine parameters from xml file.
void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
ModParType m_ModPar
Model parameters.
Definition: CIEngine.h:349
ModVarType m_Var
Model variables used in the different submodels.
Definition: CIEngine.h:365
StateType mS_p_InM
States.
Definition: CIEngine.h:352
Definition: CIEngine.h:120
Definition: CIEngine.h:43
Definition: CIEngine.h:163
Definition: CIEngine.h:67
Definition: CIEngine.h:206
Definition: CIEngine.h:151
Definition: CIEngine.h:61
Definition: CIEngine.h:32
Definition: CIEngine.h:235
Definition: CIEngine.h:195
Definition: CIEngine.h:83
Definition: CIEngine.h:139
Definition: CIEngine.h:55
Definition: CIEngine.h:89
Definition: CIEngine.h:220
Definition: CIEngine.h:106
Definition: CIEngine.h:256
Definition: CIEngine.h:245
Definition: CIEngine.h:176
Definition: CIEngine.h:74