Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modelica/Electrical/Analog/Basic/Potentiometer.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ model Potentiometer "Adjustable resistor"
"Resistance at temperature T_ref";
parameter SI.Temperature T_ref=293.15 "Reference temperature";
parameter SI.LinearTemperatureCoefficient alpha=0
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))";
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref)))";
extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(T=T_ref);
parameter Boolean useRinput=false "Use input for 0<r<1 (else constant)"
annotation (
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Electrical/Analog/Basic/Resistor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ model Resistor "Ideal linear electrical resistor"
"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))";
"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);
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Electrical/Analog/Basic/VariableResistor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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))";
"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
Expand Down
78 changes: 39 additions & 39 deletions Modelica/Electrical/Analog/Lines/M_OLine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public
parameter Boolean useInternalGround=true "= true if internal ground is used, otherwise use reference pin"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
parameter SI.LinearTemperatureCoefficient alpha_R=0
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref)))";
parameter SI.LinearTemperatureCoefficient alpha_G=0
"Temperature coefficient of conductance (G_actual = G/(1 + alpha*(heatPort.T - T_ref))";
"Temperature coefficient of conductance (G_actual = G/(1 + alpha*(heatPort.T - T_ref)))";
parameter Boolean useHeatPort=false "= true, if heatPort is enabled"
annotation (
Evaluate=true,
Expand Down Expand Up @@ -66,9 +66,9 @@ public
parameter Real Gl[dim_vector_lgc]=fill(1, dim_vector_lgc)
"Conductance matrix";
parameter SI.LinearTemperatureCoefficient alpha_R
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref)))";
parameter SI.LinearTemperatureCoefficient alpha_G
"Temperature coefficient of conductance (G_actual = G/(1 + alpha*(heatPort.T - T_ref))";
"Temperature coefficient of conductance (G_actual = G/(1 + alpha*(heatPort.T - T_ref)))";
parameter Boolean useHeatPort=false "= true, if heatPort is enabled"
annotation (
Evaluate=true,
Expand Down Expand Up @@ -172,7 +172,7 @@ public
parameter Real Ll[dim_vector_lgc]=fill(1, dim_vector_lgc)
"Inductance matrix";
parameter SI.LinearTemperatureCoefficient alpha_R
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref)))";
parameter Boolean useHeatPort=false "= true, if HeatPort is enabled"
annotation (
Evaluate=true,
Expand Down Expand Up @@ -309,36 +309,36 @@ equation
extent={{-150,130},{150,90}},
textString="%name",
textColor={0,0,255})}), Documentation(info="<html>
<p>The <code>M_OLine</code> is a multi line model which consists of several segments
and several single lines. Each segment consists of resistors and inductors that
are connected in series in each single line, and of capacitors and conductors both
<p>The <code>M_OLine</code> is a multi line model which consists of several segments
and several single lines. Each segment consists of resistors and inductors that
are connected in series in each single line, and of capacitors and conductors both
between the lines and to the ground. The inductors are coupled to each other like in the
<a href=\"modelica://Modelica.Electrical.Analog.Basic.M_Transformer\">M_Transformer</a> model.
<a href=\"modelica://Modelica.Electrical.Analog.Basic.M_Transformer\">M_Transformer</a> model.
The following picture shows the schematic of a segment with four single lines (lines=4):</p>

<blockquote>
<img src=\"modelica://Modelica/Resources/Images/Electrical/Analog/Lines/segment.png\"
alt=\"segment.png\">
</blockquote>

<p>Note that the user can choose whether the optional &quot;refPin&quot;
is active (so that it can be connected to any other pin),
otherwise the internal &quot;ground&quot; is used.
<p>Note that the user can choose whether the optional &quot;refPin&quot;
is active (so that it can be connected to any other pin),
otherwise the internal &quot;ground&quot; is used.
This is done with the checkbox useInternalGround, true by default
(for compatibility with previous versions).
Obviously the potential of the internal ground is always zero,
Obviously the potential of the internal ground is always zero,
its current can be accessed for plotting.</p>

<p>The complete multi line consists of N segments and an auxiliary segment_last:</p>

<p align=\"center\"><code>-- segment_1 -- segment_2 -- ... -- segment_N -- segment_last --</code></p>

<p>In the picture of the segment can be seen, that a single segment is asymmetrical.
Connecting such asymmetrical segments in a series forces also an asymmetrical multi line.
To design a symmetrical model which is useful for coupling and which guaranties the same pin properties,
in <code>segment_1</code> only half valued resistors and inductors are used.
The remaining resistors and inductors are at the other end of the line within
the auxiliary <code>segment_last</code>. For the example with 4 lines the schematic of
<p>In the picture of the segment can be seen, that a single segment is asymmetrical.
Connecting such asymmetrical segments in a series forces also an asymmetrical multi line.
To design a symmetrical model which is useful for coupling and which guaranties the same pin properties,
in <code>segment_1</code> only half valued resistors and inductors are used.
The remaining resistors and inductors are at the other end of the line within
the auxiliary <code>segment_last</code>. For the example with 4 lines the schematic of
<code>segment_last</code> is like this:</p>

<blockquote>
Expand All @@ -347,75 +347,75 @@ the auxiliary <code>segment_last</code>. For the example with 4 lines the schema
</blockquote>

<p>The number of the capacitors and conductors depends on the number of single lines that are used,
because each line is coupled to every other line by both a capacitor and a conductor.
One line consists of <strong>at least two segments</strong>.
Inside the model <code>M_OLine</code> the model <code>segment</code> is used.
This model represents one segment which is build as described above.
For modelling the inductances and their mutual couplings the model
<a href=\"modelica://Modelica.Electrical.Analog.Basic.M_Transformer\">M_Transformer</a> is used.
To fill the resistance vector, resistance values as many as lines are needed, e.g.,
if there are four lines, four resistances are needed. For example for a microelectronic line
because each line is coupled to every other line by both a capacitor and a conductor.
One line consists of <strong>at least two segments</strong>.
Inside the model <code>M_OLine</code> the model <code>segment</code> is used.
This model represents one segment which is build as described above.
For modelling the inductances and their mutual couplings the model
<a href=\"modelica://Modelica.Electrical.Analog.Basic.M_Transformer\">M_Transformer</a> is used.
To fill the resistance vector, resistance values as many as lines are needed, e.g.,
if there are four lines, four resistances are needed. For example for a microelectronic line
of 0.1m length, a sensible resistance-vector would be R=[4.76e5, 1.72e5, 1.72e5, 1.72e5].</p>

<p>Filling the matrices of the inductances, capacitances and conductances is a bit more complicated,
because those components occur also between two lines and not only (like the resistor) in one line.
The entries of the matrices are given by the user in form of a vector.
The entries of the matrices are given by the user in form of a vector.
The vector length <code>dim_vector_lgc</code> is calculated by:</p>

<blockquote>
<pre>dim_vector_lgc = lines*(lines+1)/2</pre>
</blockquote>

<p>Inside the model a symmetrical inductance matrix, a symmetrical capacitance matrix and
a symmetrical conductance matrix are built out of the entries of the vectors given by the user.
a symmetrical conductance matrix are built out of the entries of the vectors given by the user.
The way of building is the same for each matrix, so the approach for filling one of the matrices
will be shown in the the example below.</p>

<h5>Example</h5>

<p>The number of lines is assumed to be four. To build the matrix, the model needs the
values from the main diagonal and from the positions that are below the main diagonal.
<p>The number of lines is assumed to be four. To build the matrix, the model needs the
values from the main diagonal and from the positions that are below the main diagonal.
To get the following matrix</p>

<blockquote>
<img src=\"modelica://Modelica/Resources/Images/Electrical/Analog/Lines/M_OLine-eqMatrix.png\" alt=\"Matrix\"/>
</blockquote>

<p>the vector with dim_vector_lgc=4*5/2=10 has to appear in the following way:
<p>the vector with dim_vector_lgc=4*5/2=10 has to appear in the following way:
vector = [<strong>1</strong>, 0.1, 0.2, 0.4, <strong>2</strong>, 0.3 0.5, <strong>3</strong>, 0.6, <strong>4</strong>]</p>

<p>For the example of a microelectronic line of 0.1m length,
which is used as default example for the <code>M_OLine</code> model,
<p>For the example of a microelectronic line of 0.1m length,
which is used as default example for the <code>M_OLine</code> model,
a sensible inductance-matrix would be:</p>

<blockquote>
<img src=\"modelica://Modelica/Resources/Images/Electrical/Analog/Lines/M_OLine-eqL.png\" alt=\"L\"/>
</blockquote>

<p>For the example of a microelectronic line of 0.1m length, which is used as default example
<p>For the example of a microelectronic line of 0.1m length, which is used as default example
for the <code>M_OLine</code> model, a sensible capacitance-matrix would be:</p>

<blockquote>
<img src=\"modelica://Modelica/Resources/Images/Electrical/Analog/Lines/M_OLine-eqC.png\" alt=\"C\"/>
</blockquote>

<p>For the example of a microelectronic line of 0.1m length, which is used as default example
<p>For the example of a microelectronic line of 0.1m length, which is used as default example
for the <code>M_OLine</code> model, a sensible conductance-matrix would be:</p>

<blockquote>
<img src=\"modelica://Modelica/Resources/Images/Electrical/Analog/Lines/M_OLine-eqG.png\" alt=\"G\"/>
</blockquote>

<p>The user has the possibility to enable a conditional heatport. If so, the <code>M_OLine</code>
<p>The user has the possibility to enable a conditional heatport. If so, the <code>M_OLine</code>
can be connected to a thermal network. If the parameter <code>alpha</code> is set to a value different than zero,
the <code>M_OLine</code> becomes temperature sensitive due to their resistors which resistances
the <code>M_OLine</code> becomes temperature sensitive due to their resistors which resistances
are calculated by</p>

<blockquote>
<pre>R_actual = R*(1 + alpha*(heatPort.T - T_ref))</pre>
</blockquote>

<p>and conductors calculated by</p>
<p>and conductors calculated by</p>

<blockquote>
<pre>G_actual = G/(1 + alpha*(heatPort.T - T_ref))</pre>
Expand Down
6 changes: 3 additions & 3 deletions Modelica/Electrical/Analog/Lines/OLine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ model OLine "Lossy Transmission Line"
start=1) "Length of line";
parameter Integer N(final min=1, start=1) "Number of lumped segments";
parameter SI.LinearTemperatureCoefficient alpha_R=0
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref)))";
parameter SI.LinearTemperatureCoefficient alpha_G=0
"Temperature coefficient of conductance (G_actual = G/(1 + alpha*(heatPort.T - T_ref))";
"Temperature coefficient of conductance (G_actual = G/(1 + alpha*(heatPort.T - T_ref)))";
parameter Boolean useHeatPort=false "= true, if heatPort is enabled"
annotation (
Evaluate=true,
Expand All @@ -48,7 +48,7 @@ model OLine "Lossy Transmission Line"
iconTransformation(extent={{-110,-110},{-90,-90}})));
output SI.Voltage v[N]=G.v "Voltages at the connections of the elements";
output SI.Current i[N+1]=R.i "Currents at the connections of the elements";
/*
/*
The components R[N+1], L[N+1], C[N] and G[N] have been protected in the previous release(s)
to avoid excessive size of simulation results.
Voltages and currents at the connections are now mirrored to alias variables
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Electrical/Analog/Lines/ULine.mo
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ model ULine "Lossy RC Line"
start=1) "Length of line";
parameter Integer N(final min=1, start=1) "Number of lumped segments";
parameter SI.LinearTemperatureCoefficient alpha=0
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R*(1 + alpha*(heatPort.T - T_ref)))";
parameter Boolean useHeatPort=false "= true, if heatPort is enabled"
annotation (
Evaluate=true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ model Admittance "Polyphase linear admittance"
parameter SI.Temperature T_ref[m]=fill(293.15, m)
"Reference temperatures";
parameter SI.LinearTemperatureCoefficient alpha_ref[m]=zeros(m)
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Polyphase.Interfaces.ConditionalHeatPort(final mh=m, T=T_ref);
parameter Boolean frequencyDependent = false "Consider frequency dependency, if true"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ model Impedance "Polyphase linear impedance"
parameter SI.Temperature T_ref[m]=fill(293.15, m)
"Reference temperatures";
parameter SI.LinearTemperatureCoefficient alpha_ref[m]=zeros(m)
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Polyphase.Interfaces.ConditionalHeatPort(final mh=m, T=T_ref);
parameter Boolean frequencyDependent = false "Consider frequency dependency, if true"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ model Resistor "Polyphase linear resistor"
"Reference temperatures";
parameter SI.LinearTemperatureCoefficient alpha_ref[m]=
zeros(m)
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Polyphase.Interfaces.ConditionalHeatPort(
final mh=m, T=T_ref);
QuasiStatic.SinglePhase.Basic.Resistor resistor[m](
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ model VariableAdmittance "Polyphase variable admittance"
parameter SI.Temperature T_ref[m]=fill(293.15, m)
"Reference temperatures";
parameter SI.LinearTemperatureCoefficient alpha_ref[m]=zeros(m)
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Polyphase.Interfaces.ConditionalHeatPort(final mh=m, T=T_ref);
parameter Boolean frequencyDependent = false "Consider frequency dependency, if true"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ model VariableConductor "Polyphase variable conductor"
"Reference temperatures";
parameter SI.LinearTemperatureCoefficient alpha_ref[m]=
zeros(m)
"Temperature coefficient of resistance (G_actual = G_ref/(1 + alpha_ref*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (G_actual = G_ref/(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Polyphase.Interfaces.ConditionalHeatPort(
final mh=m, T=T_ref);
Modelica.Blocks.Interfaces.RealInput G_ref[m](each unit="S")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ model VariableImpedance "Polyphase variable impedance"
parameter SI.Temperature T_ref[m]=fill(293.15, m)
"Reference temperatures";
parameter SI.LinearTemperatureCoefficient alpha_ref[m]=zeros(m)
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Polyphase.Interfaces.ConditionalHeatPort(final mh=m, T=T_ref);
parameter Boolean frequencyDependent = false "Consider frequency dependency, if true"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ model VariableResistor "Polyphase variable resistor"
"Reference temperatures";
parameter SI.LinearTemperatureCoefficient alpha_ref[m]=
zeros(m)
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
"Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Polyphase.Interfaces.ConditionalHeatPort(
final mh=m, T=T_ref);
Modelica.Blocks.Interfaces.RealInput R_ref[m](each unit="Ohm")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ model Admittance "Single-phase linear admittance"
import Modelica.ComplexMath.conj;
parameter SI.ComplexAdmittance Y_ref(re(start=1),im(start=0)) "Complex admittance G_ref + j*B_ref";
parameter SI.Temperature T_ref=293.15 "Reference temperature";
parameter SI.LinearTemperatureCoefficient alpha_ref=0 "Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
parameter SI.LinearTemperatureCoefficient alpha_ref=0 "Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(T=T_ref);
parameter Boolean frequencyDependent = false "Consider frequency dependency, if true"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ model Impedance "Single-phase linear impedance"
import Modelica.ComplexMath.conj;
parameter SI.ComplexImpedance Z_ref(re(start=1),im(start=0)) "Complex impedance R_ref + j*X_ref";
parameter SI.Temperature T_ref=293.15 "Reference temperature";
parameter SI.LinearTemperatureCoefficient alpha_ref=0 "Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
parameter SI.LinearTemperatureCoefficient alpha_ref=0 "Temperature coefficient of resistance (R_actual = R_ref*(1 + alpha_ref*(heatPort.T - T_ref)))";
extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort(T=T_ref);
parameter Boolean frequencyDependent = false "Consider frequency dependency, if true"
annotation(Evaluate=true, HideResult=true, choices(checkBox=true));
Expand Down
Loading