Example #1
0
        private double Off()
        {
            double qbar = FDMExec.Auxiliary.Qbar;

            running = false; EngStarting = false;

            fuelFlow_pph = Seek(fuelFlow_pph, 0, 800.0, 800.0);

            //allow the air turn with generator
            N1 = ExpSeek(N1, qbar / 15.0, Idle_Max_Delay * 2.5, Idle_Max_Delay * 5);

            OilTemp_degK = ExpSeek(OilTemp_degK, 273.15 + TAT, 400, 400);

            Eng_Temperature = ExpSeek(Eng_Temperature, TAT, 300, 400);
            double ITT_goal = ITT_N1.GetValue(N1, 0.1) + ((N1 > 20) ? 0.0 : (20 - N1) / 20.0 * Eng_Temperature);

            Eng_ITT_degC = ExpSeek(Eng_ITT_degC, ITT_goal, ITT_Delay, ITT_Delay * 1.2);

            OilPressure_psi = (N1 / 100.0 * 0.25 + (0.1 - (OilTemp_degK - 273.15) * 0.1 / 80.0) * N1 / 100.0) / 7692.0e-6; //from MPa to psi

            ConsumeFuel();                                                                                                 // for possible setting Starved = false when fuel tank
            // is refilled (fuel crossfeed etc.)

            if (Prop_RPM > 5)
            {
                return(-0.012);              // friction in engine when propeller spining (estimate)
            }
            return(0.0);
        }
Example #2
0
        private double SpinUp()
        {
            double EngPower_HP;

            running      = false;
            EngStarting  = true;
            fuelFlow_pph = 0.0;

            if (!GeneratorPower)
            {
                EngStarting = false;
                phase       = phaseType.tpOff;
                StartTime   = -1;
                return(0.0);
            }

            N1 = ExpSeek(N1, StarterN1, Idle_Max_Delay * 6, Idle_Max_Delay * 2.4);

            Eng_Temperature = ExpSeek(Eng_Temperature, TAT, 300, 400);
            double ITT_goal = ITT_N1.GetValue(N1, 0.1) + ((N1 > 20) ? 0.0 : (20 - N1) / 20.0 * Eng_Temperature);

            Eng_ITT_degC = ExpSeek(Eng_ITT_degC, ITT_goal, ITT_Delay, ITT_Delay * 1.2);

            OilTemp_degK = ExpSeek(OilTemp_degK, 273.15 + TAT, 400, 400);

            OilPressure_psi = (N1 / 100.0 * 0.25 + (0.1 - (OilTemp_degK - 273.15) * 0.1 / 80.0) * N1 / 100.0) / 7692.0e-6; //from MPa to psi
            NozzlePosition  = 1.0;

            EngPower_HP  = EnginePowerRPM_N1.GetValue(Prop_RPM, N1);
            EngPower_HP *= EnginePowerVC.GetValue();
            if (EngPower_HP > MaxPower)
            {
                EngPower_HP = MaxPower;
            }

            if (StartTime >= 0)
            {
                StartTime += dt;
            }
            if (StartTime > MaxStartingTime && MaxStartingTime > 0)
            { //start failed due timeout
                phase     = phaseType.tpOff;
                StartTime = -1;
            }

            ConsumeFuel(); // for possible setting Starved = false when fuel tank
            // is refilled (fuel crossfeed etc.)

            return(EngPower_HP);
        }
Example #3
0
        private double Start()
        {
            double EngPower_HP = 0.0, eff_coef;

            EngStarting = false;
            if ((N1 > 15.0) && !starved)
            {                    // minimum 15% N2 needed for start
                double old_N1 = N1;
                cranking = true; // provided for sound effects signal
                if (N1 < IdleN1)
                {
                    EngPower_HP  = EnginePowerRPM_N1.GetValue(Prop_RPM, N1);
                    EngPower_HP *= EnginePowerVC.GetValue();
                    if (EngPower_HP > MaxPower)
                    {
                        EngPower_HP = MaxPower;
                    }
                    N1              = ExpSeek(N1, IdleN1 * 1.1, Idle_Max_Delay * 4, Idle_Max_Delay * 2.4);
                    eff_coef        = 9.333 - (N1) / 12; // 430%Fuel at 60%N1
                    fuelFlow_pph    = PSFC * EngPower_HP * eff_coef;
                    Eng_Temperature = ExpSeek(Eng_Temperature, Eng_ITT_degC, 300, 400);
                    double ITT_goal = ITT_N1.GetValue((N1 - old_N1) * 300 + N1, 1);
                    Eng_ITT_degC = ExpSeek(Eng_ITT_degC, ITT_goal, ITT_Delay, ITT_Delay * 1.2);

                    OilPressure_psi = (N1 / 100.0 * 0.25 + (0.1 - (OilTemp_degK - 273.15) * 0.1 / 80.0) * N1 / 100.0) / 7692.0e-6; //from MPa to psi
                    OilTemp_degK    = Seek(OilTemp_degK, 353.15, 0.4 - N1 * 0.001, 0.04);
                }
                else
                {
                    phase        = phaseType.tpRun;
                    running      = true;
                    Starter      = false;
                    cranking     = false;
                    fuelFlow_pph = 0;
                    EngPower_HP  = 0.0;
                }
            }
            else
            {                 // no start if N2 < 15% or Starved
                phase   = phaseType.tpOff;
                Starter = false;
            }

            ConsumeFuel();

            return(EngPower_HP);
        }
Example #4
0
        private double Run()
        {
            //TODO check it. Not used double idlethrust, milthrust;
            double thrust = 0.0, EngPower_HP, eff_coef;

            running = true; Starter = false; EngStarting = false;

            //---
            double old_N1 = N1;

            N1 = ExpSeek(N1, IdleN1 + ThrottleCmd * N1_factor, Idle_Max_Delay, Idle_Max_Delay * 2.4);

            EngPower_HP  = EnginePowerRPM_N1.GetValue(Prop_RPM, N1);
            EngPower_HP *= EnginePowerVC.GetValue();
            if (EngPower_HP > MaxPower)
            {
                EngPower_HP = MaxPower;
            }

            eff_coef     = 9.333 - (N1) / 12; // 430%Fuel at 60%N1
            fuelFlow_pph = PSFC * EngPower_HP * eff_coef;

            Eng_Temperature = ExpSeek(Eng_Temperature, Eng_ITT_degC, 300, 400);
            double ITT_goal = ITT_N1.GetValue((N1 - old_N1) * 300 + N1, 1);

            Eng_ITT_degC = ExpSeek(Eng_ITT_degC, ITT_goal, ITT_Delay, ITT_Delay * 1.2);

            OilPressure_psi = (N1 / 100.0 * 0.25 + (0.1 - (OilTemp_degK - 273.15) * 0.1 / 80.0) * N1 / 100.0) / 7692.0e-6; //from MPa to psi
            //---
            EPR = 1.0 + thrust / MilThrust;

            OilTemp_degK = Seek(OilTemp_degK, 353.15, 0.4 - N1 * 0.001, 0.04);

            ConsumeFuel();

            if (Cutoff)
            {
                phase = phaseType.tpOff;
            }
            if (starved)
            {
                phase = phaseType.tpOff;
            }

            return(EngPower_HP);
        }