Modelica.Electrical.Analog.Basic.Resistor Modelica.Electrical.Analog.Basic.Resistor

Ideal linear electrical resistor

Modelica.Electrical.Analog.Basic.Resistor

Information

The linear resistor connects the branch voltage v with the branch current i by i*R = v. The Resistance R is allowed to be positive, zero, or negative.

Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n), 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
ResistanceR Resistance at temperature T_ref [Ohm]
TemperatureT_ref300.15Reference temperature [K]
LinearTemperatureCoefficientalpha0Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref)) [1/K]
BooleanuseHeatPortfalse=true, if heatPort is enabled
TemperatureTT_refFixed device temperature if useHeatPort = false [K]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin
HeatPort_aheatPortConditional heat port

Modelica definition

model Resistor "Ideal linear electrical resistor" parameter SI.Resistance R(start=1) "Resistance at temperature T_ref"; parameter SI.Temperature T_ref=300.15 "Reference temperature"; parameter SI.LinearTemperatureCoefficient alpha=0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; extends Modelica.Electrical.Analog.Interfaces.OnePort; extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(T=T_ref); SI.Resistance R_actual "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; equation assert((1 + alpha*(T_heatPort - T_ref)) >= Modelica.Constants.eps, "Temperature outside scope of model!"); R_actual = R*(1 + alpha*(T_heatPort - T_ref)); v = R_actual*i; LossPower = v*i; end Resistor;

Modelica.Electrical.Analog.Basic.Inductor Modelica.Electrical.Analog.Basic.Inductor

Ideal linear electrical inductor

Modelica.Electrical.Analog.Basic.Inductor

Information

The linear inductor connects the branch voltage v with the branch current i by v = L * di/dt. The Inductance L is allowed to be positive, or zero.

Extends from Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).

Parameters

TypeNameDefaultDescription
InductanceL Inductance [H]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model Inductor "Ideal linear electrical inductor" extends Interfaces.OnePort(i(start=0)); parameter SI.Inductance L(start=1) "Inductance"; equation L*der(i) = v; end Inductor;

Modelica.Electrical.Analog.Basic.Capacitor Modelica.Electrical.Analog.Basic.Capacitor

Ideal linear electrical capacitor

Modelica.Electrical.Analog.Basic.Capacitor

Information

The linear capacitor connects the branch voltage v with the branch current i by i = C * dv/dt. The Capacitance C is allowed to be positive or zero.

Extends from Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n).

Parameters

TypeNameDefaultDescription
CapacitanceC Capacitance [F]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin

Modelica definition

model Capacitor "Ideal linear electrical capacitor" extends Interfaces.OnePort(v(start=0)); parameter SI.Capacitance C(start=1) "Capacitance"; equation i = C*der(v); end Capacitor;

Modelica.Electrical.Analog.Basic.Ground Modelica.Electrical.Analog.Basic.Ground

Ground node

Modelica.Electrical.Analog.Basic.Ground

Information

Ground of an electrical circuit. The potential at the ground node is zero. Every electrical circuit has to contain at least one ground object.

Connectors

TypeNameDescription
Pinp 

Modelica definition

model Ground "Ground node" Interfaces.Pin p; equation p.v = 0; end Ground;

Modelica.Electrical.Analog.Basic.VariableResistor Modelica.Electrical.Analog.Basic.VariableResistor

Ideal linear electrical resistor with variable resistance

Modelica.Electrical.Analog.Basic.VariableResistor

Information

The linear resistor connects the branch voltage v with the branch current i by
i*R = v
The Resistance R is given as input signal.

Attention!!!
It is recommended that the R signal should not cross the zero value. Otherwise depending on the surrounding circuit the probability of singularities is high.

Extends from Modelica.Electrical.Analog.Interfaces.OnePort (Component with two electrical pins p and n and current i from p to n), 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
TemperatureT_ref300.15Reference temperature [K]
LinearTemperatureCoefficientalpha0Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref)) [1/K]
BooleanuseHeatPortfalse=true, if heatPort is enabled
TemperatureTT_refFixed device temperature if useHeatPort = false [K]

Connectors

TypeNameDescription
PositivePinpPositive pin (potential p.v > n.v for positive voltage drop v)
NegativePinnNegative pin
HeatPort_aheatPortConditional heat port
input RealInputR[Ohm]

Modelica definition

model VariableResistor "Ideal linear electrical resistor with variable resistance" parameter SI.Temperature T_ref=300.15 "Reference temperature"; parameter SI.LinearTemperatureCoefficient alpha=0 "Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))"; extends Modelica.Electrical.Analog.Interfaces.OnePort; extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(T=T_ref); SI.Resistance R_actual "Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))"; Modelica.Blocks.Interfaces.RealInput R(unit="Ohm"); equation assert((1 + alpha*(T_heatPort - T_ref)) >= Modelica.Constants.eps, "Temperature outside scope of model!"); R_actual = R*(1 + alpha*(T_heatPort - T_ref)); v = R_actual*i; LossPower = v*i; end VariableResistor;

Automatically generated Mon Sep 11 16:11:50 2017.