Пример #1
0
        // Calculate the Conductor Actual Volts for a commercial network using the passed in upstream volts, load and cable properties.
        public bool ConductorActualVoltsCommercial(double upstreamVolts, double load, double powerFactor, double length, CommonDT.CableProperties cableProperties,
                                                   ref double actualVolts)
        {
            bool returnValue = false;

            try
            {
                double nc       = m_NumberOfCablesPerPhase;
                double derating = m_DeratingValue / 100;
                double Rdc      = cableProperties.Rdc25;
                double TZero    = cableProperties.Tzero;
                double TcMax    = cableProperties.Tc;
                double TAmbient = cableProperties.Tcmin;
                double Amps     = cableProperties.Ampacity;
                double X        = cableProperties.X;
                double lt       = load / powerFactor * 1000 / (3 * m_Voltage3Phase);
                double Tc       = (TcMax - TAmbient) / Math.Pow((Amps * nc * derating), 2) * Math.Pow(lt, 2) + TAmbient;
                double Rdcnm    = Rdc * (Tc + TZero) / (25 + TZero) * 1000;
                double Rac      = Rdcnm * (1 + 11 / Math.Pow((Rdcnm + 4 / Rdcnm - 2.56 / Math.Pow(Rdcnm, 2)), 2)) / 1000;

                actualVolts = upstreamVolts - lt * length / 1000 / nc * (Rac * Math.Cos(Math.Acos(powerFactor)) + X * Math.Sin(Math.Acos(powerFactor)));

                returnValue = true;
            }
            catch (Exception ex)
            {
                returnValue = false;
                MessageBox.Show(m_Application.ApplicationWindow, ConstantsDT.ERROR_SC_CALCULATE_CONDUCTOR_VDROP + ": " + ex.Message, ConstantsDT.APPLICATION_NAME, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            return(returnValue);
        }
Пример #2
0
        // Calculate the Conductor Vlmag using the upstream vlmag, upstream voltage, cable properties and load.
        public bool ConductorVlmag(double upstreamVlmag, double upstreamVoltage, double length, CommonDT.CableProperties cableProperties, double load,
                                   double powerFactor, ref double vlmag)
        {
            bool returnValue = false;

            try
            {
                double Rdc      = cableProperties.Rdc25;
                double TcMax    = cableProperties.Tc;
                double TAmbient = cableProperties.Tcmin;
                double Amps     = cableProperties.Ampacity;
                double TZero    = cableProperties.Tzero;
                double ODin     = cableProperties.OdInches;
                double DCin     = cableProperties.DcInches;
                double LoadAmps = load * 1000 / upstreamVlmag;
                double rf       = Math.Sqrt(1 - Math.Pow(powerFactor, 2));
                double GMRin    = cableProperties.Gmrf * DCin / 2;
                double X        = 0.2794 / 5.28 * Math.Log10(ODin / GMRin);
                double Tc       = (TcMax - TAmbient) / Math.Pow(Amps, 2) * Math.Pow(LoadAmps, 2) + TAmbient;
                double Rdcnm    = Rdc * (Tc + TZero) / (25 + TZero) * 1000;
                double Rac      = Rdcnm * (1 + 11 / Math.Pow((Rdcnm + 4 / Rdcnm - 2.56 / Math.Pow(Rdcnm, 2)), 2)) / 1000;
                double alpha    = Math.Asin(m_NeutralVDropFactor * length / 1000 * LoadAmps * (X * powerFactor - Rac * rf) / upstreamVlmag);

                vlmag = upstreamVlmag * Math.Cos(alpha) - m_NeutralVDropFactor * length / 1000 * LoadAmps * (Rac * powerFactor + X * rf);

                if (double.IsNaN(vlmag))
                {
                    vlmag = 0;
                }

                returnValue = true;
            }
            catch (Exception ex)
            {
                returnValue = false;
                MessageBox.Show(m_Application.ApplicationWindow, ConstantsDT.ERROR_SC_CALCULATE_CONDUCTOR_VLMAG + ": " + ex.Message, ConstantsDT.APPLICATION_NAME, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            return(returnValue);
        }
Пример #3
0
        // Calculate the Conductor Voltage Drop for a commercial network using the passed in upstream voltage, cable properties, load and customer count.
        //  Both the summer and winter voltage drop will be calculated. The larger voltage drop will be returned.
        public bool ConductorVoltageDropCommercial(double upstreamVolts, double loadSummer, double loadWinter, double length, CommonDT.CableProperties cableProperties,
                                                   ref string season, ref double voltageDrop, ref double voltageDropVolts, ref double voltageDropPct, ref double actualVolts)
        {
            double actualVoltsSummer = 0;
            double actualVoltsWinter = 0;

            bool returnValue = false;

            try
            {
                ConductorActualVoltsCommercial(upstreamVolts, loadSummer, m_PowerFactorSummer, length, cableProperties, ref actualVoltsSummer);
                ConductorActualVoltsCommercial(upstreamVolts, loadWinter, m_PowerFactorWinter, length, cableProperties, ref actualVoltsWinter);

                if (actualVoltsSummer <= actualVoltsWinter)
                {
                    actualVolts = actualVoltsSummer;
                    season      = "Summer";
                }
                else
                {
                    actualVolts = actualVoltsWinter;
                    season      = "Winter";
                }

                voltageDrop      = actualVolts / m_VoltageFactor;
                voltageDropPct   = (upstreamVolts - actualVolts) / actualVolts * 100;
                voltageDropVolts = voltageDropPct * m_VoltageSecondary;

                returnValue = true;
            }
            catch (Exception ex)
            {
                returnValue = false;
                MessageBox.Show(m_Application.ApplicationWindow, ConstantsDT.ERROR_SC_CALCULATE_CONDUCTOR_VDROP + ": " + ex.Message, ConstantsDT.APPLICATION_NAME, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            return(returnValue);
        }
Пример #4
0
        // Calculate the Conductor Voltage Drop using the passed in upstream voltage, cable properties, load and customer count.
        //  Both the summer and winter voltage drop will be calculated. The larger voltage drop will be returned.
        public bool ConductorVoltageDrop(double upstreamVlmag, double upstreamVoltage, double length, CommonDT.CableProperties cableProperties, double loadSummer, double loadWinter,
                                         double customerCount, ref string season, ref double voltageDrop, ref double voltageDropVolts, ref double voltageDropPct, ref double vlmag)
        {
            double vlmagSummer   = 0;
            double vlmagWinter   = 0;
            double loadKVASummer = 0;
            double loadKVAWinter = 0;
            bool   returnValue   = false;

            try
            {
                LoadKVA(loadSummer, loadWinter, customerCount, ref loadKVASummer, ref loadKVAWinter);

                ConductorVlmag(upstreamVlmag, upstreamVoltage, length, cableProperties, loadKVASummer, m_PowerFactorSummer, ref vlmagSummer);
                ConductorVlmag(upstreamVlmag, upstreamVoltage, length, cableProperties, loadKVAWinter, m_PowerFactorWinter, ref vlmagWinter);

                if (vlmagSummer <= vlmagWinter)
                {
                    vlmag  = vlmagSummer;
                    season = "Summer";
                }
                else
                {
                    vlmag  = vlmagWinter;
                    season = "Winter";
                }

                voltageDrop      = Math.Round(vlmag / 2, 1);
                voltageDropPct   = (upstreamVlmag - vlmag) / vlmag * 100;
                voltageDropVolts = upstreamVoltage - voltageDrop;

                returnValue = true;
            }
            catch (Exception ex)
            {
                returnValue = false;
                MessageBox.Show(m_Application.ApplicationWindow, ConstantsDT.ERROR_SC_CALCULATE_CONDUCTOR_VDROP + ": " + ex.Message, ConstantsDT.APPLICATION_NAME, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            return(returnValue);
        }