//**************************************************************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(); }
private void calculateHotSpotTemp() { for (int i = 0; i < perUnitValues.Length; i++) { if (hottestSpotTemp[i] > 140) { hotSpotTemp[i] = Math.Round(xfrmr.getdeltaThetaHS_R() * Math.Pow(perUnitValues[i - 1], 2 * xfrmr.getM()), 2); } else if (hottestSpotTemp[i] < 140) { hotSpotTemp[i] = Math.Round(xfrmr.getdeltaThetaHS_R() * Math.Pow(perUnitValues[i], 2 * xfrmr.getM()), 2); } } }
private void calculateHotSpotTemp() { // Calculate Hot Spot Temperature for each load // Equation: DetaThetaHS = deltaThetaH,R * (K ^ 2m) for (int i = 0; i < perUnitValues.Length; i++) { hotSpotTemp[i] = Math.Round(xfrmr.getdeltaThetaHS_R() * Math.Pow(perUnitValues[i], 2 * xfrmr.getM()), 2); } }
//**************************************************************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(); } }