modelResistor

Ideal linear electrical resistor

Extends from Buildings.Electrical.Interfaces.ResistiveLoad (Partial model of a resistive load), Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network).

Information

Model of a linear DC resistor that can vary with respect to temperature.

The model implements the Ohm's law

V = R(T) i.

The resistance R(T) varies depending on the temperature T as

R(T) = R (1 + α (T - Tref)),

where the resistance R is the reference value of the resistance, α is the linear temperature coefficient, and Tref is the reference temperature. The temperature T is the temperature of the heat port if useHeatPort = true.

Parameters

TypeNameDefaultDescription
BooleanuseHeatPort (from ConditionalHeatPort)false= true, if heatPort is enabled
SI.TemperatureT (from ConditionalHeatPort)293.15Fixed device temperature if useHeatPort = false
Modelica.Units.SI.ResistanceRResistance at temperature T_ref
Modelica.Units.SI.TemperatureT_ref300.15Reference temperature
Modelica.Units.SI.LinearTemperatureCoefficientalpha0Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))
Modeling assumption
Booleanlinearized (from Load)falseIf true, the load model is linearized
Buildings.Electrical.Types.Loadmode (from Load)Buildings.Electrical.Types.Load.FixedZ_steady_stateType of load model (e.g., steady state, dynamic, prescribed power consumption, etc.)
Nominal conditions
Modelica.Units.SI.PowerP_nominal (from Load)0Nominal power (negative if consumed, positive if generated). Used if mode <> Buildings.Electrical.Types.Load.VariableZ_P_input
Modelica.Units.SI.VoltageV_nominal (from Load)Nominal voltage (V_nominal >= 0)
Initialization
Buildings.Electrical.Types.InitModeinitMode (from Load)Buildings.Electrical.Types.InitMode.linearizedInitialization mode for homotopy operator

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputy (from Load)Fraction of the nominal power consumed
Modelica.Blocks.Interfaces.RealInputPow (from Load)Power consumed
Buildings.Electrical.Interfaces.Terminalterminal (from Load)Generalized electric terminal
Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_aheatPort (from ConditionalHeatPort)Conditional heat port

Components

TypeNameDefaultDescription
Modelica.Units.SI.Voltage[:]v (from Load)terminal.vVoltage vector
Modelica.Units.SI.Current[:]i (from Load)terminal.iCurrent vector
Modelica.Units.SI.Power[PhaseSystem.n]S (from Load)PhaseSystem.phasePowers_vi(v, -i)Phase powers
Modelica.Units.SI.PowerP (from Load)Power of the load (negative if consumed, positive if fed into the electrical grid)
SI.PowerLossPower (from ConditionalHeatPort)Loss power leaving component via heatPort
SI.TemperatureT_heatPort (from ConditionalHeatPort)Temperature of heatPort
Modelica.Units.SI.ResistanceR_actualActual resistance = R*(1 + alpha*(T_heatPort - T_ref))

Revisions

  • November 2, 2024, by Michael Wetter:
    Changed guarding against division by zero.
    This is for Buildings #4032.
  • November 3, 2015, by Michael Wetter:
    Set default value for P_nominal to avoid an error when translating the model in Dymola's pedantic mode.
  • May 14, 2015, by Marco Bonvini:
    Changed parent class to Buildings.Electrical.Interfaces.ResistiveLoad in order to help openmodelica parsing the model. This fixes issue #415.
  • February 1, 2013, by Thierry S. Nouidui:
    First implementation.
  • May 28, 2014, by Marco Bonvini:
    Revised model and documentation.