Beispiel #1
0
        //**************************************************************METHODS***************************************************************

        private void calculateInfo()
        {
            // We have Krms, so we can calculate the following for the FIRST iteration
            double TOInitial = 0;
            double TOUlt     = 0;

            for (int i = 0; i < topOilTemp.Length; i++)
            {
                // If we are at the first iteration We must calculate the Tau at this iteration
                if (i == 0)
                {
                    // Initial TO before iterations
                    TOInitial = (xfrmr.getdeltaThetaTO_R()) * Math.Pow(((kRMS * kRMS * xfrmr.getR()) + 1) / (xfrmr.getR() + 1), xfrmr.getN());
                    // Now that we have this, we can find the current iteration value
                    TOUlt = (xfrmr.getdeltaThetaTO_R()) * Math.Pow(((perUnitValues[i] * perUnitValues[i] * xfrmr.getR()) + 1) / (xfrmr.getR() + 1), xfrmr.getN());

                    // Calculate Tau
                    calculateTauTO(TOUlt, TOInitial, i);

                    // Use Top Oil Initial for Krms as First TO Value
                    topOilTemp[i] = TOInitial;

                    // Next find HotSpot Temperature
                    hotSpotTemp[i] = xfrmr.getdeltaThetaHS_R() * Math.Pow(perUnitValues[i], 2 * xfrmr.getM());

                    // Get Hottest Spot Temperautre
                    hottestSpotTemp[i] = topOilTemp[i] + hotSpotTemp[i] + xfrmr.getAmbientTemp();

                    // Continue the rest of the loop
                    continue;
                }

                // Initial TO before iterations
                TOInitial = topOilTemp[i - 1];
                // Now that we have this, we can find the current iteration value
                TOUlt = (xfrmr.getdeltaThetaTO_R()) * Math.Pow(((perUnitValues[i] * perUnitValues[i] * xfrmr.getR()) + 1) / (xfrmr.getR() + 1), xfrmr.getN());

                // Calculate Tau
                calculateTauTO(TOUlt, TOInitial, i);

                // Use Top Oil Initial for Krms as First TO Value
                topOilTemp[i] = (TOUlt * (1 - Math.Exp(-t / tauTO[i]))) + (TOInitial * Math.Exp(-t / tauTO[i]));

                // Next find HotSpot Temperature
                hotSpotTemp[i] = xfrmr.getdeltaThetaHS_R() * Math.Pow(perUnitValues[i], 2 * xfrmr.getM());

                // Get Hottest Spot Temperautre
                hottestSpotTemp[i] = topOilTemp[i] + hotSpotTemp[i] + xfrmr.getAmbientTemp();
            }
        }
Beispiel #2
0
 private void calculateHottestSpotTemp()
 {
     for (int i = 0; i < hottestSpotTemp.Length; i++)
     {
         hottestSpotTemp[i] = Math.Round(topOilTemp[i] + hotSpotTemp[i] + xfrmr.getAmbientTemp(), 2);
     }
 }
Beispiel #3
0
        //**************************************************************METHODS***************************************************************

        private void calculateInfo()
        {
            // We have Krms, so we can calculate the following for the FIRST iteration
            double TOInitial = 0;
            double TOUlt     = 0;

            for (int i = 0; i < topOilTemp.Length; i++)
            {
                // If we are at the first iteration We must calculate the Tau at this iteration
                if (i == 0)
                {
                    // Initial TO before iterations
                    TOInitial = (xfrmr.getdeltaThetaTO_R()) * Math.Pow(((kRMS * kRMS * xfrmr.getR()) + 1) / (xfrmr.getR() + 1), xfrmr.getN());
                    // Now that we have this, we can find the current iteration value
                    TOUlt = (xfrmr.getdeltaThetaTO_R()) * Math.Pow(((perUnitValues[i] * perUnitValues[i] * xfrmr.getR()) + 1) / (xfrmr.getR() + 1), xfrmr.getN());

                    // Calculate Tau
                    calculateTauTO(TOUlt, TOInitial, i);

                    // Use Top Oil Initial for Krms as First TO Value
                    topOilTemp[i] = TOInitial;

                    // Next find HotSpot Temperature
                    hotSpotTemp[i] = xfrmr.getdeltaThetaHS_R() * Math.Pow(perUnitValues[i], 2 * xfrmr.getM());

                    // Get Hottest Spot Temperautre
                    hottestSpotTemp[i] = topOilTemp[i] + hotSpotTemp[i] + xfrmr.getAmbientTemp();

                    // Continue the rest of the loop
                    continue;
                }

                // Initial TO before iterations
                TOInitial = topOilTemp[i - 1];
                // Now that we have this, we can find the current iteration value
                TOUlt = (xfrmr.getdeltaThetaTO_R()) * Math.Pow(((perUnitValues[i] * perUnitValues[i] * xfrmr.getR()) + 1) / (xfrmr.getR() + 1), xfrmr.getN());

                // Calculate Tau
                calculateTauTO(TOUlt, TOInitial, i);

                // Use Top Oil Initial for Krms as First TO Value
                topOilTemp[i] = (TOUlt * (1 - Math.Exp(-t / tauTO[i]))) + (TOInitial * Math.Exp(-t / tauTO[i]));

                // Next find HotSpot Temperature
                hotSpotTemp[i] = xfrmr.getdeltaThetaHS_R() * Math.Pow(perUnitValues[i], 2 * xfrmr.getM());

                // Get Hottest Spot Temperautre
                hottestSpotTemp[i] = topOilTemp[i] + hotSpotTemp[i] + xfrmr.getAmbientTemp();

                // Check threshold
                if (hottestSpotTemp[i] > threshold)
                {
                    perUnitValues[i] = perUnitValues[i] - 0.01;
                    i--;
                }

                // Check if max is below threshold. If so increase it, until it is below threshold
                // Make sure to stop increasing it at a certain point or else infinite loop!
            }

            this.maxPerUnit = perUnitValues.Max();
        }