model Resistor "Multiphase linear resistor"
extends Interfaces.TwoPlug;
parameter Modelica.SIunits.Resistance R_ref[m](start = fill(1, m)) "Reference resistances at T_ref";
parameter Modelica.SIunits.Temperature T_ref[m] = fill(293.15, m) "Reference temperatures";
parameter Modelica.SIunits.LinearTemperatureCoefficient alpha_ref[m] = zeros(m) "Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
extends Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort(final mh = m, T = T_ref);
QuasiStationary.SinglePhase.Basic.Resistor resistor[m](final R_ref = R_ref, final T_ref = T_ref, final alpha_ref = alpha_ref, each final useHeatPort = useHeatPort, final T = T) annotation (Placement(transformation(extent = {
{-10, -10},
{10, 10}})));
equation
connect(resistor.heatPort,heatPort) annotation (Line(
points = {
{0, -10},
{0, -32.5},
{0, -55},
{0, -100}},
color = {191, 0, 0}));
connect(resistor.pin_n,plugToPins_n.pin_n) annotation (Line(
points = {
{10, 0},
{39, 0},
{68, 0}},
color = {85, 170, 255}));
connect(plugToPins_p.pin_p,resistor.pin_p) annotation (Line(
points = {
{-68, 0},
{-53.5, 0},
{-39, 0},
{-10, 0}},
color = {85, 170, 255}));
annotation (
Icon(graphics = {
Line(
points = {
{60, 0},
{90, 0}},
color = {85, 170, 255}),
Line(
points = {
{-90, 0},
{-60, 0}},
color = {85, 170, 255}),
Rectangle(
extent = {
{-70, 30},
{70, -30}},
lineColor = {85, 170, 255},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),
Text(
extent = {
{-150, 90},
{150, 50}},
textString = "%name",
lineColor = {0, 0, 255}),
Text(
extent = {
{150, -80},
{-150, -40}},
textString = "m=%m")}),
Documentation(info = "<html>\n<p>\nThe linear resistor connects the complex voltages <code><u>v</u></code> with the complex\ncurrents <code><u>i</u></code> by <code><u>i</u>*R = <u>v</u></code>,\nusing <code>m</code> <a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Resistor\">single phase Resistors</a>.\n</p>\n\n<p>\nThe resistor model also has <code>m</code> optional\n<a href=\"modelica://Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort\">conditional heat ports</a>.\nA linear temperature dependency of the resistances for enabled heat ports is also taken into account.\n</p>\n\n<h4>See also</h4>\n<p>\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Resistor\">Resistor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Conductor\">Conductor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Capacitor\">Capacitor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Inductor\">Inductor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Impedance\">Impedance</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Admittance\">Admittance</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableResistor\">Variable resistor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableConductor\">Variable conductor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableCapacitor\">Variable capacitor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableInductor\">Variable inductor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableImpedance\">Variable impedance</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.VariableAdmittance\">Variable admittance</a>\n</p>\n</html>"));
end Resistor;