Buildings.Electrical.DC.Lines

Package with models for DC electrical lines

Information

This package contains models for lines for DC circuits.

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

Package Content

Name Description
Buildings.Electrical.DC.Lines.Line Line Model of a DC electrical line
Buildings.Electrical.DC.Lines.TwoPortRCLine TwoPortRCLine Model of a two port DC resistance and capacity (T-model)
Buildings.Electrical.DC.Lines.TwoPortResistance TwoPortResistance Model of a two port DC resistance
Buildings.Electrical.DC.Lines.Examples Examples Package with example models

Buildings.Electrical.DC.Lines.Line Buildings.Electrical.DC.Lines.Line

Model of a DC electrical line

Buildings.Electrical.DC.Lines.Line

Information

This model represents a DC cable. The model is based on Buildings.Electrical.DC.Lines.TwoPortRCLine and provides functionalities to parametrize the values of R and C either using commercial cables or using default values.

Extends from Buildings.Electrical.Transmission.BaseClasses.PartialLine (Partial cable line dispersion model).

Parameters

TypeNameDefaultDescription
replaceable package PhaseSystem_pPartialPhaseSystemPhase system of terminal p
replaceable package PhaseSystem_nPartialPhaseSystemPhase system of terminal 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
LoadmodelModeTypes.Load.FixedZ_steady_stateSelect 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
GenericcommercialCableBuildings.Electrical.Transmi...Commercial cables options

Connectors

TypeNameDescription
replaceable package PhaseSystem_pPhase system of terminal p
replaceable package PhaseSystem_nPhase system of terminal n
input RealInputTTemperature of the cable

Modelica definition

model Line "Model of a DC electrical line" extends Buildings.Electrical.Transmission.BaseClasses.PartialLine( redeclare package PhaseSystem_p = PhaseSystems.TwoConductor, redeclare package PhaseSystem_n = PhaseSystems.TwoConductor, redeclare Interfaces.Terminal_n terminal_n, redeclare Interfaces.Terminal_p terminal_p, final modelMode=Types.Load.FixedZ_steady_state, commercialCable=Buildings.Electrical.Transmission.Functions.selectCable_low (P_nominal, V_nominal)); TwoPortRCLine lineRC( final useHeatPort=true, final R=R, final V_nominal=V_nominal, final T_ref=T_ref, final M=M, final C=C, final use_C=use_C); equation connect(terminal_n, lineRC.terminal_n); connect(lineRC.terminal_p, terminal_p); connect(cableTemp.port, lineRC.heatPort); end Line;

Buildings.Electrical.DC.Lines.TwoPortRCLine Buildings.Electrical.DC.Lines.TwoPortRCLine

Model of a two port DC resistance and capacity (T-model)

Buildings.Electrical.DC.Lines.TwoPortRCLine

Information

This model represents a series of two resistances and a capacitance that connect two DC interfaces. This model can be used to represent a cable in a DC grid.

The model represents the lumped resistances and capacity (T-model) as shown in the figure below.

image

As can be seen in the figure, the resistance R is split in two halves and the capacitance is located in the center. The capacitance in the center is optional and can be selected using the boolean flag use_C = true. The model is either dynamic or static depending on the presence of the capacitive effect.

Extends from Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortRLC (Partial model of an RLC element that links two electrical connectors).

Parameters

TypeNameDefaultDescription
replaceable package PhaseSystem_pPartialPhaseSystemPhase system of terminal p
replaceable package PhaseSystem_nPartialPhaseSystemPhase system of terminal 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]
InductanceL0Inductance [H]
VoltageVc_startV_nominalInitial value of the voltage of the capacitance in the middle of the line [V]
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]
Model
Assumptions
Booleanuse_CfalseSet to true to add a capacitance in the center of the line

Connectors

TypeNameDescription
replaceable package PhaseSystem_pPhase system of terminal p
replaceable package PhaseSystem_nPhase system of terminal n
HeatPort_aheatPortConditional heat port

Modelica definition

model TwoPortRCLine "Model of a two port DC resistance and capacity (T-model)" extends Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortRLC( redeclare package PhaseSystem_p = PhaseSystems.TwoConductor, redeclare package PhaseSystem_n = PhaseSystems.TwoConductor, redeclare Interfaces.Terminal_n terminal_n, redeclare Interfaces.Terminal_p terminal_p, final L=0); parameter Boolean use_C=false "Set to true to add a capacitance in the center of the line"; parameter Modelica.SIunits.Voltage Vc_start=V_nominal "Initial value of the voltage of the capacitance in the middle of the line"; Modelica.SIunits.Voltage Vc(start=Vc_start, stateSelect=StateSelect.prefer) "Voltage of the capacitor"; initial equation if C > 0 and use_C then Vc = Vc_start; end if; equation terminal_p.v[1] - (Vc + terminal_p.v[2]) = terminal_p.i[1]*R_actual/2; terminal_n.v[1] - (Vc + terminal_p.v[2]) = terminal_n.i[1]*R_actual/2; if C > 0 and use_C then C*der(Vc) = terminal_p.i[1] + terminal_n.i[1]; else Vc = 0.5*(terminal_p.v[1] - terminal_p.v[2] + terminal_n.v[1] - terminal_n.v[ 2]); end if; terminal_p.v[2] = terminal_n.v[2]; terminal_p.i[2] + terminal_n.i[2] = 0; // Joule losses LossPower = R_actual/2*terminal_p.i[1]^2 + R_actual/2*terminal_n.i[1]^2; end TwoPortRCLine;

Buildings.Electrical.DC.Lines.TwoPortResistance Buildings.Electrical.DC.Lines.TwoPortResistance

Model of a two port DC resistance

Buildings.Electrical.DC.Lines.TwoPortResistance

Information

This model represents a resistance that connect two DC interfaces. This model can be used to represent a cable in a DC grid.

The model represents the lumped resistance as shown in the figure below.

image

Extends from Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortResistance (Partial model of a resistive element that links two electrical connectors).

Parameters

TypeNameDefaultDescription
replaceable package PhaseSystem_pPartialPhaseSystemPhase system of terminal p
replaceable package PhaseSystem_nPartialPhaseSystemPhase system of terminal 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
replaceable package PhaseSystem_pPhase system of terminal p
replaceable package PhaseSystem_nPhase system of terminal n
HeatPort_aheatPortConditional heat port

Modelica definition

model TwoPortResistance "Model of a two port DC resistance" extends Buildings.Electrical.Transmission.BaseClasses.PartialTwoPortResistance ( redeclare package PhaseSystem_p = PhaseSystems.TwoConductor, redeclare package PhaseSystem_n = PhaseSystems.TwoConductor, redeclare Interfaces.Terminal_n terminal_n, redeclare Interfaces.Terminal_p terminal_p); equation // Voltage drop on the resistance lumped on connection between terminals // p.v[1] and n.v[1] terminal_p.v[1] - terminal_n.v[1] = terminal_p.i[1]*R_actual; terminal_p.v[2] = terminal_n.v[2]; // Joule losses LossPower = R_actual*terminal_p.i[1]^2; end TwoPortResistance;