Description: "Package that contains functions to compute cable properties"

- Home > Modelica

## Buildings.Electrical.Transmission.Functions

Package that contains functions to compute cable properties

### Information

This package contains various functions that are used to compute cable properties and select the default cable during automatic parametrization.

Extends from Modelica.Icons.Package (Icon for standard packages).

### Package Content

Name | Description
--- | ---
R_AC_correction | This function computes the correction factor of the DC resistance for AC systems at 60 Hz
computeGMD | This function computes the geometric mean distance of a three-phase transmission line
computeGMR | This function computes the geometric mean radius of a cable with 1 to 4 conductors
selectCable_low | This function is used to automatically select the type of cable for low voltages
selectCable_med | This function is used to automatically select the type of cable for medium voltages
selectVoltageLevel | This function computes the voltage level (low, medium or high) given the nominal voltage

## Buildings.Electrical.Transmission.Functions.R_AC_correction

This function computes the correction factor of the DC resistance for AC systems at 60 Hz

### Information

This function computes a correction factor for adapting the DC resistance when working with AC voltages. The correction factor assumes f = 60 Hz.

The correction is based on the type of cabel (AWG or kcmil) and the material.

Type (AWG or kcmil) | Material | Correction factor
--- | --- | ---
1/0 | Aluminium | 1.0
2/0 | Aluminium | 1.001
3/0 | Aluminium | 1.001
4/0 | Aluminium | 1.001
250 | Aluminium | 1.002
300 | Aluminium | 1.003
350 | Aluminium | 1.004
400 | Aluminium | 1.005
500 | Aluminium | 1.007
600 | Aluminium | 1.010
700 | Aluminium | 1.013
750 | Aluminium | 1.015
800 | Aluminium | 1.017
1000 | Aluminium | 1.026
1250 | Aluminium | 1.040
1500 | Aluminium | 1.058
1750 | Aluminium | 1.079
2000 | Aluminium | 1.100
2500 | Aluminium | 1.142

Type (AWG or kcmil) | Material | Correction factor
--- | --- | ---
1/0 | Copper | 1.0
2/0 | Copper | 1.001
3/0 | Copper | 1.002
4/0 | Copper | 1.004
250 | Copper | 1.005
300 | Copper | 1.006
350 | Copper | 1.009
400 | Copper | 1.011
500 | Copper | 1.018
600 | Copper | 1.025
700 | Copper | 1.034
750 | Copper | 1.039
800 | Copper | 1.044
1000 | Copper | 1.067
1250 | Copper | 1.102
1500 | Copper | 1.142
1750 | Copper | 1.185
2000 | Copper | 1.233
2500 | Copper | 1.326

### Inputs

Type | Name | Default | Description
--- | --- | --- | ---
String | size |  | Size of the commercial cable (AWG or kcmil)
Material | material |  | Material of the cable

### Outputs

Type | Name | Description
--- | --- | ---
Real | correction | Correction factor

### Modelica definition

function R_AC_correction "This function computes the correction factor of the DC resistance for AC systems at 60 Hz" input String size "Size of the commercial cable (AWG or kcmil)"; input Buildings.Electrical.Transmission.Types.Material material "Material of the cable"; output Real correction "Correction factor"; algorithm if material == Buildings.Electrical.Transmission.Types.Material.Al then if size == "1/0" then correction := 1.0; elseif size == "2/0" then correction := 1.001; elseif size == "3/0" then correction := 1.001; elseif size == "4/0" then correction := 1.001; elseif size == "250" then correction := 1.002; elseif size == "300" then correction := 1.003; elseif size == "350" then correction := 1.004; elseif size == "400" then correction := 1.005; elseif size == "500" then correction := 1.007; elseif size == "600" then correction := 1.01; elseif size == "700" then correction := 1.013; elseif size == "750" then correction := 1.015; elseif size == "800" then correction := 1.017; elseif size == "1000" then correction := 1.026; elseif size == "1250" then correction := 1.04; elseif size == "1500" then correction := 1.058; elseif size == "1750" then correction := 1.079; elseif size == "2000" then correction := 1.1; elseif size == "2500" then correction := 1.142; else correction := 1.0; end if; elseif material == Buildings.Electrical.Transmission.Types.Material.Cu then if size == "1/0" then correction := 1.0; elseif size == "2/0" then correction := 1.001; elseif size == "3/0" then correction := 1.002; elseif size == "4/0" then correction := 1.004; elseif size == "250" then correction := 1.005; elseif size == "300" then correction := 1.006; elseif size == "350" then correction := 1.009; elseif size == "400" then correction := 1.011; elseif size == "500" then correction := 1.018; elseif size == "600" then correction := 1.025; elseif size == "700" then correction := 1.034; elseif size == "750" then correction := 1.039; elseif size == "800" then correction := 1.044; elseif size == "1000" then correction := 1.067; elseif size == "1250" then correction := 1.102; elseif size == "1500" then correction := 1.142; elseif size == "1750" then correction := 1.185; elseif size == "2000" then correction := 1.233; elseif size == "2500" then correction := 1.326; else correction := 1.0; end if; else assert(material <> Buildings.Electrical.Transmission.Types.Material.Al and material <> Buildings.Electrical.Transmission.Types.Material.Cu, "In function Buildings.Electrical.Transmission.Functions.R_AC_Correction, does not support material " + String(material) + ". The selected cable has the R_AC_Correction of the Copper.", level= AssertionLevel.warning); correction := 1.0; end if; end R_AC_correction;

## Buildings.Electrical.Transmission.Functions.computeGMD

This function computes the geometric mean distance of a three-phase transmission line

### Information

This function computes the Geometric Mean Distance of a cable.

The GMD is computed as

GMD = (d1 d2 d3)1/3,

where d1, d2, and d3 are the distances between the conductors.

### Inputs

Type | Name | Default | Description
--- | --- | --- | ---
Length | d1 |  | Distance between conductors [m]
Length | d2 | d1 | Distance between conductors [m]
Length | d3 | 2*d1 | Distance between conductors [m]

### Outputs

Type | Name | Description
--- | --- | ---
Length | GMD | Geometric Mean Distance [m]

### Modelica definition

function computeGMD "This function computes the geometric mean distance of a three-phase transmission line" input Modelica.SIunits.Length d1 "Distance between conductors"; input Modelica.SIunits.Length d2 = d1 "Distance between conductors"; input Modelica.SIunits.Length d3 = 2*d1 "Distance between conductors"; output Modelica.SIunits.Length GMD "Geometric Mean Distance"; algorithm GMD := (d1*d2*d3)^(1.0/3.0); end computeGMD;

## Buildings.Electrical.Transmission.Functions.computeGMR

This function computes the geometric mean radius of a cable with 1 to 4 conductors

### Information

This function computes the Geometric Mean Radius (GMR) of a cable.

The GMR is computed as follow, depending on the number of conductors N that are part of the cable, and the diamater of the conductor d.

Equation | Condition
--- | ---
0.7788 (d/2) | N = 1
d1/2 | N = 2
d2/3 | N = 3
d2/3 | N = 4

### Inputs

Type | Name | Default | Description
--- | --- | --- | ---
Length | d |  | Diameter of the conductor [m]
Integer | N | 1 | Number of conductors

### Outputs

Type | Name | Description
--- | --- | ---
Length | GMR | Geometric Mean Radius [m]

### Modelica definition

function computeGMR "This function computes the geometric mean radius of a cable with 1 to 4 conductors" input Modelica.SIunits.Length d "Diameter of the conductor"; input Integer N = 1 "Number of conductors"; output Modelica.SIunits.Length GMR "Geometric Mean Radius"; algorithm assert(N > 0 and N < 5, "The number of conductors N must be between 1 and 4, received N=" + String(N) + "."); if N==1 then GMR := 0.5*d*0.7788; elseif N==2 then GMR := sqrt(d); elseif N==3 then GMR := (d^2)^(1/3); else // N == 4 GMR := 1.09*(d^3)^(1/4); end if; end computeGMR;

## Buildings.Electrical.Transmission.Functions.selectCable_low

This function is used to automatically select the type of cable for low voltages

### Information

This function selects the default cable for a low voltage transmission line.

The function takes as inputs the nominal voltage Vnominal and the nominal power Pnominal. It computes the maximum current current that can flow through the cable as

IMAX = SF Pnominal / Vnominal,

where SF is the safety factor. By default the safety factor is equal to 1.2.

Using IMAX, the function selects the smallest cable that has an ampacity higher than IMAX. The cables are selected from Buildings.Electrical.Transmission.LowVoltageCables.

### Inputs

Type | Name | Default | Description
--- | --- | --- | ---
Power | P_nominal | 0 | Rated power [W]
Voltage | V_nominal | 0 | Rated voltage [V]

### Outputs

Type | Name | Description
--- | --- | ---
Generic | cable | Cable

### Modelica definition

function selectCable_low "This function is used to automatically select the type of cable for low voltages" input Modelica.SIunits.Power P_nominal = 0 "Rated power"; input Modelica.SIunits.Voltage V_nominal = 0 "Rated voltage"; output Buildings.Electrical.Transmission.LowVoltageCables.Generic cable "Cable"; protected parameter Real safety_factor = 1.2; Modelica.SIunits.Current I_nominal "Nominal current flowing through the line"; Buildings.Electrical.Transmission.LowVoltageCables.Cu10 cu10; Buildings.Electrical.Transmission.LowVoltageCables.Cu20 cu20; Buildings.Electrical.Transmission.LowVoltageCables.Cu25 cu25; Buildings.Electrical.Transmission.LowVoltageCables.Cu35 cu35; Buildings.Electrical.Transmission.LowVoltageCables.Cu50 cu50; Buildings.Electrical.Transmission.LowVoltageCables.Cu95 cu95; Buildings.Electrical.Transmission.LowVoltageCables.Cu100 cu100; algorithm assert(Transmission.Functions.selectVoltageLevel(V_nominal) == Buildings.Electrical.Types.VoltageLevel.Low, "In function Buildings.Electrical.Transmission.Functions.selectCable_low, cable autosizing has a nominal Voltage " + String(V_nominal) + " [V]. The low voltage cables do not support such a voltage level.", level=AssertionLevel.error); // Check if it's possible to compute the current if V_nominal > 0 then I_nominal :=safety_factor*P_nominal/V_nominal; else I_nominal :=0; end if; // Assumed the material is Copper if I_nominal < cu10.Amp then cable := cu10; elseif I_nominal >= cu10.Amp and I_nominal < cu20.Amp then cable := cu20; elseif I_nominal >= cu20.Amp and I_nominal < cu25.Amp then cable := cu25; elseif I_nominal >= cu25.Amp and I_nominal < cu35.Amp then cable := cu35; elseif I_nominal >= cu35.Amp and I_nominal < cu50.Amp then cable := cu50; elseif I_nominal >= cu50.Amp and I_nominal < cu95.Amp then cable := cu95; elseif I_nominal >= cu95.Amp and I_nominal < cu100.Amp then cable := cu100; else assert(I_nominal < cu100.Amp, "In function Buildings.Electrical.Transmission.Functions.selectCable_low, cable autosizing does not support a current of " + String(I_nominal) + " [A]. The selected cable will be undersized.", level=AssertionLevel.warning); cable := cu100; end if; end selectCable_low;

## Buildings.Electrical.Transmission.Functions.selectCable_med

This function is used to automatically select the type of cable for medium voltages

### Information

This function selects the default cable for a medium voltage transmission line.

The function takes as inputs the nominal voltage Vnominal and the nominal power Pnominal. It computes the maximum current current that can flow through the cable as

IMAX = SF Pnominal / Vnominal,

where SF is the safety factor. By default the safety factor is equal to 1.2.

Using IMAX, the function selects the smallest cable that has an ampacity higher than IMAX. The cables are selected from Buildings.Electrical.Transmission.MediumVoltageCables.

### Inputs

Type | Name | Default | Description
--- | --- | --- | ---
Power | P_nominal | 0 | Rated power [W]
Voltage | V_nominal | 0 | Rated voltage [V]

### Outputs

Type | Name | Description
--- | --- | ---
Generic | cable | Cable

### Modelica definition

function selectCable_med "This function is used to automatically select the type of cable for medium voltages" input Modelica.SIunits.Power P_nominal = 0 "Rated power"; input Modelica.SIunits.Voltage V_nominal = 0 "Rated voltage"; output Buildings.Electrical.Transmission.MediumVoltageCables.Generic cable "Cable"; protected parameter Real safety_factor = 1.2; Modelica.SIunits.Current I_nominal "Nominal current flowing through the line"; Buildings.Electrical.Transmission.MediumVoltageCables.Annealed_Al_10 Al10; Buildings.Electrical.Transmission.MediumVoltageCables.Annealed_Al_30 Al30; Buildings.Electrical.Transmission.MediumVoltageCables.Annealed_Al_40 Al40; Buildings.Electrical.Transmission.MediumVoltageCables.Annealed_Al_350 Al350; Buildings.Electrical.Transmission.MediumVoltageCables.Annealed_Al_500 Al500; Buildings.Electrical.Transmission.MediumVoltageCables.Annealed_Al_1000 Al1000; Buildings.Electrical.Transmission.MediumVoltageCables.Annealed_Al_1500 Al1500; algorithm assert(Transmission.Functions.selectVoltageLevel(V_nominal) == Buildings.Electrical.Types.VoltageLevel.Medium, "In function Buildings.Electrical.Transmission.Functions.selectCable_med, cable autosizing has a nominal Voltage " + String(V_nominal) + " [V]. The medium voltage cables do not support such a voltage level.", level=AssertionLevel.error); // Check if it's possible to compute the current if V_nominal > 0 then I_nominal :=safety_factor*P_nominal/V_nominal; else I_nominal :=0; end if; // Assumed the material is Copper if I_nominal < Al10.Amp then cable := Al10; elseif I_nominal >= Al10.Amp and I_nominal < Al30.Amp then cable := Al30; elseif I_nominal >= Al30.Amp and I_nominal < Al40.Amp then cable := Al40; elseif I_nominal >= Al40.Amp and I_nominal < Al350.Amp then cable := Al350; elseif I_nominal >= Al350.Amp and I_nominal < Al500.Amp then cable := Al500; elseif I_nominal >= Al500.Amp and I_nominal < Al1000.Amp then cable := Al1000; elseif I_nominal >= Al1000.Amp and I_nominal < Al1500.Amp then cable := Al1500; else assert(I_nominal < Al1500.Amp, "Warning: In function Buildings.Electrical.Transmission.Functions.selectCable_med, cable autosizing does not support a current of " + String(I_nominal) + " [A]. The selected cable will be undersized.", level=AssertionLevel.warning); cable := Al10; end if; end selectCable_med;

## Buildings.Electrical.Transmission.Functions.selectVoltageLevel

This function computes the voltage level (low, medium or high) given the nominal voltage

### Information

This function computes the voltage level for a given voltage. The computation is as follows:

Condition | Voltage Level
--- | ---
0 ≤ V < 1 kV | Low voltage
1 kV ≤ V < 50 kV | Medium voltage
V ≥ 50 kV | HIgh voltage

### Inputs

Type | Name | Default | Description
--- | --- | --- | ---
Voltage | V |  | Nominal voltage [V]

### Outputs

Type | Name | Description
--- | --- | ---
VoltageLevel | level | Type of voltage level

### Modelica definition

function selectVoltageLevel "This function computes the voltage level (low, medium or high) given the nominal voltage" input Modelica.SIunits.Voltage V "Nominal voltage"; output Buildings.Electrical.Types.VoltageLevel level "Type of voltage level"; algorithm if V <= 0 then assert(V > 0, "In function Buildings.Electrical.Transmission.Functions.selectVoltageLevel, does not support a voltage of " + String(V) + " [V]. The selected voltage level will be assumed to be low.", level= AssertionLevel.warning); level := Buildings.Electrical.Types.VoltageLevel.Low; elseif V <= 1000 then level := Buildings.Electrical.Types.VoltageLevel.Low; elseif V > 1000 and V <= 50000 then level := Buildings.Electrical.Types.VoltageLevel.Medium; else level := Buildings.Electrical.Types.VoltageLevel.High; end if; end selectVoltageLevel;