LBL logo

Buildings.Electrical.Transmission.BaseClasses

Package that contains partial models for lines and cables

Information

This package contains partial models that describe electric lines and cables.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine PartialBaseLine Partial cable line dispersion model
Buildings.Electrical.Transmission.BaseClasses.PartialLine PartialLine Partial cable line dispersion model
Buildings.Electrical.Transmission.BaseClasses.PartialNetwork PartialNetwork Partial model that represent an electric network
Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortInductance PartialTwoPortInductance Partial model of an inductive element that links two electrical connectors
Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortRLC PartialTwoPortRLC Partial model of an RLC element that links two electrical connectors
Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortResistance PartialTwoPortResistance Partial model of a resistive element that links two electrical connectors
Buildings.Electrical.Transmission.BaseClasses.BaseCable BaseCable Record that contains the properties of a generic cable

Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine

Partial cable line dispersion model

Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine

Information

This partial model contains parameters and variables needed to parametrize a generic cable. The resistance, inductance and capacitance are computed by the functions associated to the type of cable selected. The type of cable is specified using a record that inherits from Buildings.Electrical.Transmission.BaseClasses.BaseCable such as ( Buildings.Electrical.Transmission.LowVoltageCables.Generic or Buildings.Electrical.Transmission.MediumVoltageCables.Generic). The record contains functions that depending on the properties of cable compute its resistance, inductance or capacitance.

The model has two parameters use_C and modelMode that change the behaviour of the model. It is possible to include the effects of a capacity or select the model to be dynamic or steady state. More information are available in the line models that extends this partial model.

Commercial cable mode

If mode = commercial, the user can select the type of cable from a list of commercial cables. The cables are divided in three different categories:

The details and type of cables can be found in Buildings.Electrical.Transmission.LowVoltageCables and Buildings.Electrical.Transmission.MediumVoltageCables.

Automatic cable mode

If mode = automatic, the type of cable is automatically selected depending on the value of the parameters V_nominal and P_nominal.

Note:

More details about the functions that compute the type of cable and its properties can be found in Buildings.Electrical.Transmission.Functions.

The parameter commercialCable is assumed to be Buildings.Electrical.Transmission.LowVoltageCables.Generic. The parameter is replaceable so it can be redeclared using a different type, for example Buildings.Electrical.Transmission.MediumVoltageCables.Generic.
The example models Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.AClineMedium and Buildings.Electrical.AC.ThreePhasesBalanced.Lines.Examples.ACSimpleGridMedium show how this can be done.

Parameters

TypeNameDefaultDescription
Lengthl Length of the line [m]
PowerP_nominal Nominal power of the line [W]
VoltageV_nominal Nominal voltage of the line [V]
Model
Assumptions
Booleanuse_CfalseSet to true to add a capacitance in the center of the line
LoadmodelModeBuildings.Electrical.Types.L...Select between steady state and dynamic model
Thermal
Booleanuse_TfalseIf true, enables the input for the temperature of the cable
TemperatureTCableT_refFixed temperature of the cable [K]
Tech. specification
Auto/Manual mode
CableModemodeBuildings.Electrical.Types.C...Select if choosing the cable automatically or between a list of commercial options
Manual mode
GenericcommercialCableredeclare parameter Building...Commercial cables options

Connectors

TypeNameDescription
input RealInputTTemperature of the cable

Modelica definition

partial model PartialBaseLine "Partial cable line dispersion model" parameter Modelica.SIunits.Length l(min=0) "Length of the line"; parameter Modelica.SIunits.Power P_nominal(min=0) "Nominal power of the line"; parameter Modelica.SIunits.Voltage V_nominal(min=0, start=220) "Nominal voltage of the line"; final parameter Modelica.SIunits.Frequency f_n = 50 "Frequency considered in the definition of cables properties"; parameter Boolean use_C = false "Set to true to add a capacitance in the center of the line"; parameter Buildings.Electrical.Types.Load modelMode=Buildings.Electrical.Types.Load.FixedZ_steady_state "Select between steady state and dynamic model"; parameter Boolean use_T = false "If true, enables the input for the temperature of the cable"; parameter Modelica.SIunits.Temperature TCable = T_ref "Fixed temperature of the cable"; parameter Buildings.Electrical.Types.CableMode mode=Buildings.Electrical.Types.CableMode.automatic "Select if choosing the cable automatically or between a list of commercial options"; replaceable parameter Buildings.Electrical.Transmission.LowVoltageCables.Generic commercialCable constrainedby Buildings.Electrical.Transmission.BaseClasses.BaseCable "Commercial cables options"; final parameter Modelica.SIunits.Temperature T_ref = commercialCable.T_ref "Reference temperature of the line"; final parameter Modelica.SIunits.Temperature M = commercialCable.M "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; final parameter Modelica.SIunits.Resistance R = commercialCable.lineResistance(l, f_n, commercialCable) "Resistance of the cable"; final parameter Modelica.SIunits.Inductance L = commercialCable.lineInductance(l, f_n, commercialCable) "Inductance of the cable due to mutual and self inductance"; final parameter Modelica.SIunits.Capacitance C = commercialCable.lineCapacitance(l, f_n, commercialCable) "Capacitance of the cable"; Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature cableTemp "Temperature of the cable"; Modelica.Blocks.Interfaces.RealInput T if use_T "Temperature of the cable"; Modelica.Blocks.Sources.RealExpression cableTemperature(y=T_in) "Temperature of the cable"; protected Modelica.Blocks.Interfaces.RealInput T_in "Internal variable for conditional temperature"; equation assert(L>=0 and R>=0 and C>=0, "The parameters R,L,C must be positive. Check cable properties and size."); connect(T_in, T); if not use_T then T_in = TCable; end if; connect(cableTemperature.y, cableTemp.T); end PartialBaseLine;

Buildings.Electrical.Transmission.BaseClasses.PartialLine Buildings.Electrical.Transmission.BaseClasses.PartialLine

Partial cable line dispersion model

Buildings.Electrical.Transmission.BaseClasses.PartialLine

Information

This partial model extends the model Buildings.Electrical.Transmission.Base.PartialBaseLine. It adds two generalized electric connectors.

Note:

See Buildings.Electrical.Transmission.Base.PartialBaseLine for more information.

Extends from Buildings.Electrical.Interfaces.PartialTwoPort (Model of a generic two port component with phase systems), Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine (Partial cable line dispersion model).

Parameters

TypeNameDefaultDescription
replaceable package PhaseSystem_pPartialPhaseSystemPhase system of terminal p
replaceable package PhaseSystem_nPartialPhaseSystemPhase system of terminal n
Terminalterminal_nredeclare replaceable Buildi...Electric terminal side p
Terminalterminal_predeclare replaceable Buildi...Electric terminal side n
Lengthl Length of the line [m]
PowerP_nominal Nominal power of the line [W]
VoltageV_nominal Nominal voltage of the line [V]
Model
Assumptions
Booleanuse_CfalseSet to true to add a capacitance in the center of the line
LoadmodelModeBuildings.Electrical.Types.L...Select between steady state and dynamic model
Thermal
Booleanuse_TfalseIf true, enables the input for the temperature of the cable
TemperatureTCableT_refFixed temperature of the cable [K]
Tech. specification
Auto/Manual mode
CableModemodeBuildings.Electrical.Types.C...Select if choosing the cable automatically or between a list of commercial options
Manual mode
GenericcommercialCableredeclare parameter Building...Commercial cables options

Connectors

TypeNameDescription
Terminalterminal_nElectric terminal side p
Terminalterminal_pElectric terminal side n
input RealInputTTemperature of the cable

Modelica definition

partial model PartialLine "Partial cable line dispersion model" extends Buildings.Electrical.Interfaces.PartialTwoPort; extends Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine; Real VoltageLosses(unit = "1") = abs(PhaseSystem_p.systemVoltage(terminal_p.v) - PhaseSystem_n.systemVoltage(terminal_n.v))/ Buildings.Utilities.Math.Functions.smoothMax( PhaseSystem_p.systemVoltage(terminal_p.v), PhaseSystem_n.systemVoltage(terminal_n.v), 1.0) "Percentage of voltage losses across the line"; protected parameter Integer n_ = size(terminal_n.i,1) "Number of cables"; parameter Real nominal_i_ = P_nominal / V_nominal "Nominal current flowing through the line"; parameter Real nominal_v_ = V_nominal "Nominal voltage of the line"; end PartialLine;

Buildings.Electrical.Transmission.BaseClasses.PartialNetwork Buildings.Electrical.Transmission.BaseClasses.PartialNetwork

Partial model that represent an electric network

Buildings.Electrical.Transmission.BaseClasses.PartialNetwork

Information

This partial model represents a generalized electrical network.

The model has three main components. The parameter grid declares the type Buildings.Electrical.Transmission.Grids.PartialGrid that contains the information about the topology of the network, such as the number of nodes, how they are connected, and the length of each connection. The parameter terminal[...] declares an array of generalized electric connectors that are associated to each node of the grid. The parameter lines[...] is an array of type Buildings.Electrical.Transmission.Base.PartialBaseLine that represent the cables in the grid.

Note:

This is a partial model that once extended can represent either DC or AC networks. This model is based on the assumption that the topology of the network does not depend on the type of cables that connect the nodes.

Parameters

TypeNameDefaultDescription
VoltageV_nominal Nominal voltage of the lines in the network [V]
PartialGridgridredeclare parameter Building...Record that describe the grid with the number of nodes, links, connections, etc.
BaseTerminalterminal[grid.nNodes]redeclare Buildings.Electric...Electric terminals for each node of the network
PartialBaseLinelines[grid.nLinks]redeclare Buildings.Electric...Array of line models, each line connecting two nodes of the grid

Connectors

TypeNameDescription
BaseTerminalterminal[grid.nNodes]Electric terminals for each node of the network

Modelica definition

partial model PartialNetwork "Partial model that represent an electric network" parameter Modelica.SIunits.Voltage V_nominal(min=0, start = 110) "Nominal voltage of the lines in the network"; replaceable parameter Buildings.Electrical.Transmission.Grids.PartialGrid grid "Record that describe the grid with the number of nodes, links, connections, etc."; replaceable Buildings.Electrical.Interfaces.BaseTerminal terminal[grid.nNodes] "Electric terminals for each node of the network"; replaceable Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine lines[grid.nLinks]( each mode=Buildings.Electrical.Types.CableMode.commercial, l=grid.l[:, 1], each P_nominal=1000, each V_nominal=V_nominal) "Array of line models, each line connecting two nodes of the grid"; end PartialNetwork;

Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortInductance Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortInductance

Partial model of an inductive element that links two electrical connectors

Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortInductance

Information

Partial model of an inductance that links two generalized electrical connectors.

Extends from Interfaces.PartialTwoPort (Model of a generic two port component with phase systems).

Parameters

TypeNameDefaultDescription
replaceable package PhaseSystem_pPartialPhaseSystemPhase system of terminal p
replaceable package PhaseSystem_nPartialPhaseSystemPhase system of terminal n
Terminalterminal_nredeclare replaceable Buildi...Electric terminal side p
Terminalterminal_predeclare replaceable Buildi...Electric terminal side n
InductanceL Inductance [H]

Connectors

TypeNameDescription
Terminalterminal_nElectric terminal side p
Terminalterminal_pElectric terminal side n

Modelica definition

partial model PartialTwoPortInductance "Partial model of an inductive element that links two electrical connectors" extends Interfaces.PartialTwoPort; parameter Modelica.SIunits.Inductance L "Inductance"; equation Connections.branch(terminal_p.theta, terminal_n.theta); terminal_p.theta = terminal_n.theta; terminal_p.i = - terminal_n.i; end PartialTwoPortInductance;

Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortRLC Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortRLC

Partial model of an RLC element that links two electrical connectors

Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortRLC

Information

Partial model of a resistance that links two generalized electrical connectors.

The model computes a resistance R(T) that varies depending on the temperature T as

R(T) = Rref (M + T)/(M + Tref),

where the resistance Rref is the reference value of the resistance, M is the temperature coefficient of the cable material, and Tref is the reference temperature. The temperature T is the temperature of the heat port if useHeatPort = true.

The impedance L and the capacity C do not vary with respect to the temperature and are specified by the user.

Extends from Buildings.Electrical.Interfaces.PartialTwoPort (Model of a generic two port component with phase systems), Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network).

Parameters

TypeNameDefaultDescription
replaceable package PhaseSystem_pPartialPhaseSystemPhase system of terminal p
replaceable package PhaseSystem_nPartialPhaseSystemPhase system of terminal n
Terminalterminal_nredeclare replaceable Buildi...Electric terminal side p
Terminalterminal_predeclare replaceable Buildi...Electric terminal side n
BooleanuseHeatPortfalse=true, if HeatPort is enabled
TemperatureTT_refFixed device temperature if useHeatPort = false [K]
ResistanceR Resistance at temperature T_ref [Ohm]
TemperatureT_ref298.15Reference temperature [K]
TemperatureM507.65Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref)) [K]
CapacitanceC Capacity [F]
InductanceL Inductance [H]
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Connectors

TypeNameDescription
Terminalterminal_nElectric terminal side p
Terminalterminal_pElectric terminal side n
HeatPort_aheatPort 

Modelica definition

partial model PartialTwoPortRLC "Partial model of an RLC element that links two electrical connectors" extends Buildings.Electrical.Interfaces.PartialTwoPort; extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(T = T_ref); parameter Modelica.SIunits.Resistance R "Resistance at temperature T_ref"; parameter Modelica.SIunits.Temperature T_ref = 298.15 "Reference temperature"; parameter Modelica.SIunits.Temperature M = 507.65 "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; parameter Modelica.SIunits.Capacitance C "Capacity"; parameter Modelica.SIunits.Inductance L "Inductance"; parameter Modelica.SIunits.Voltage V_nominal(min=0, start = 110) "Nominal voltage (V_nominal >= 0)"; Modelica.SIunits.Resistance R_actual "Actual resistance = R*(M + T_heatPort)/(M + T_ref) "; equation Connections.branch(terminal_p.theta, terminal_n.theta); terminal_p.theta = terminal_n.theta; assert(R_actual>=0, "The value of R_actual must be positive, check reference and actual temperatures"); R_actual = R*(M + Modelica.SIunits.Conversions.to_degC(T_heatPort))/ (M + Modelica.SIunits.Conversions.to_degC(T_ref)); end PartialTwoPortRLC;

Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortResistance Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortResistance

Partial model of a resistive element that links two electrical connectors

Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortResistance

Information

Partial model of a resistance that links two generalized electrical connectors.

The model computes a resistance R(T) that varies depending on the temperature T as

R(T) = Rref (M + T)/(M + Tref),

where the resistance Rref is the reference value of the resistance, M is the temperature coefficient of the cable material, and Tref is the reference temperature. The temperature T is the temperature of the heat port if useHeatPort = true.

Extends from Interfaces.PartialTwoPort (Model of a generic two port component with phase systems), Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network).

Parameters

TypeNameDefaultDescription
replaceable package PhaseSystem_pPartialPhaseSystemPhase system of terminal p
replaceable package PhaseSystem_nPartialPhaseSystemPhase system of terminal n
Terminalterminal_nredeclare replaceable Buildi...Electric terminal side p
Terminalterminal_predeclare replaceable Buildi...Electric terminal side n
BooleanuseHeatPortfalse=true, if HeatPort is enabled
TemperatureTT_refFixed device temperature if useHeatPort = false [K]
ResistanceR Resistance at temperature T_ref [Ohm]
TemperatureT_ref298.15Reference temperature [K]
TemperatureM507.65Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref)) [K]

Connectors

TypeNameDescription
Terminalterminal_nElectric terminal side p
Terminalterminal_pElectric terminal side n
HeatPort_aheatPort 

Modelica definition

partial model PartialTwoPortResistance "Partial model of a resistive element that links two electrical connectors" extends Interfaces.PartialTwoPort; extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(T = T_ref); parameter Modelica.SIunits.Resistance R "Resistance at temperature T_ref"; parameter Modelica.SIunits.Temperature T_ref = 298.15 "Reference temperature"; parameter Modelica.SIunits.Temperature M = 507.65 "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; Modelica.SIunits.Resistance R_actual "Actual resistance = R*(M + T_heatPort)/(M + T_ref) "; equation Connections.branch(terminal_p.theta, terminal_n.theta); terminal_p.theta = terminal_n.theta; assert(R_actual>=0, "The value of R_actual must be positive, check reference and actual temperatures."); R_actual = R*(M + Modelica.SIunits.Conversions.to_degC(T_heatPort))/ (M + Modelica.SIunits.Conversions.to_degC(T_ref)); terminal_p.i = - terminal_n.i; end PartialTwoPortResistance;

Buildings.Electrical.Transmission.BaseClasses.BaseCable

Record that contains the properties of a generic cable

Information

This record contains the basic properties to describe a commercial cable.

The low voltage and medium voltage cables extends this base records and add other specific parameters like the geometrical properties.

The record contains four partial replaceable functions used to compute the properties of the cable such its resistance, inductance or capacitance.

Parameters

TypeNameDefaultDescription
MaterialmaterialBuildings.Electrical.Transmi...Material of the cable
CurrentAmp0.0Ampacitance of the cable [A]
TemperatureT_ref298.15Reference cable temperature [K]
TemperatureM228.1 + 273.15Temperature constant of the material [K]
replaceable function lineResistance Function that computes the resistance of a cable
replaceable function lineInductance Function that computes the inductance of a cable
replaceable function lineCapacitance Function that computes the capacitance of a cable

Modelica definition

record BaseCable "Record that contains the properties of a generic cable" parameter Buildings.Electrical.Transmission.Types.Material material = Buildings.Electrical.Transmission.Types.Material.Al "Material of the cable"; parameter Modelica.SIunits.Current Amp(start=0.0)=0.0 "Ampacitance of the cable"; parameter Modelica.SIunits.Temperature T_ref = 298.15 "Reference cable temperature"; parameter Modelica.SIunits.Temperature M = 228.1 + 273.15 "Temperature constant of the material"; replaceable partial function lineResistance "Function that computes the resistance of a cable" extends Modelica.Icons.Function; input Modelica.SIunits.Length l "Length of the cable"; input Modelica.SIunits.Frequency f = 50 "Frequency considered in the definition of cables properties"; output Modelica.SIunits.Resistance R "Resistance of the cable"; protected parameter Modelica.SIunits.AngularVelocity omega = 2*Modelica.Constants.pi*f; end lineResistance; replaceable partial function lineInductance "Function that computes the inductance of a cable" extends Modelica.Icons.Function; input Modelica.SIunits.Length l "Length of the cable"; input Modelica.SIunits.Frequency f = 50 "Frequency considered in the definition of cables properties"; output Modelica.SIunits.Inductance L "Inductance of the cable"; protected parameter Modelica.SIunits.AngularVelocity omega = 2*Modelica.Constants.pi*f; end lineInductance; replaceable partial function lineCapacitance "Function that computes the capacitance of a cable" extends Modelica.Icons.Function; input Modelica.SIunits.Length l "Length of the cable"; input Modelica.SIunits.Frequency f = 50 "Frequency considered in the definition of cables properties"; output Modelica.SIunits.Capacitance C "Capacitance of the cable"; protected parameter Modelica.SIunits.AngularVelocity omega = 2*Modelica.Constants.pi*f; end lineCapacitance; end BaseCable;

Automatically generated Mon Jul 13 14:23:43 2015.