Conductor

model Conductor "Multiphase linear conductor"
    extends Interfaces.TwoPlug;

    parameter Modelica.SIunits.Conductance G_ref[m](start = fill(1, m)) "Reference conductances 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 conductance (G_actual = G_ref/(1 + alpha_ref*(heatPort.T - T_ref))";

    extends Modelica.Electrical.MultiPhase.Interfaces.ConditionalHeatPort(final mh = m, T = T_ref);

    QuasiStationary.SinglePhase.Basic.Conductor conductor[m](final G_ref = G_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(conductor.heatPort,heatPort) annotation (Line(
        points = {
            {0, -10}, 
            {0, -32.5}, 
            {0, -32.5}, 
            {0, -55}, 
            {0, -55}, 
            {0, -100}},
        color = {191, 0, 0}));
    connect(conductor.pin_n,plugToPins_n.pin_n) annotation (Line(
        points = {
            {10, 0}, 
            {39, 0}, 
            {39, 0}, 
            {68, 0}},
        color = {85, 170, 255}));
    connect(plugToPins_p.pin_p,conductor.pin_p) annotation (Line(
        points = {
            {-68, 0}, 
            {-53.5, 0}, 
            {-53.5, 0}, 
            {-39, 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, -80}, 
                    {-150, -40}},
                textString = "m=%m"), 
            Text(
                extent = {
                    {-150, 90}, 
                    {150, 50}},
                textString = "%name",
                lineColor = {0, 0, 255})}),
        Documentation(info = "<html>\n<p>\nThe linear resistor connects the complex currents <code><u>i</u></code> with the complex\nvoltages <code><u>v</u></code> by <code><u>v</u>*G = <u>i</u></code>,\nusing <code>m</code> <a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Conductor\">single phase Conductors</a>.\n</p>\n\n<p>\nThe conductor 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 conductances 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.Conductor\">Conductor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.MultiPhase.Basic.Resistor\">Resistor</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 Conductor;