diff --git a/Modelica/Blocks/Math.mo b/Modelica/Blocks/Math.mo index 0ffb0e28fd..17a2d5d57b 100644 --- a/Modelica/Blocks/Math.mo +++ b/Modelica/Blocks/Math.mo @@ -2607,9 +2607,9 @@ This block detects positive and negative peaks of differentiable and non-differe For differentiable input signals, an extremum is detected if the derivative of the input signal is zero.

-To handle non-differentiable input signals, the input signal u is conditioned by a first order with time constant T. -Like in the derivative block, -the derivative of the input signal is approximated by (u - x)/T. +To handle non-differentiable input signals, the input signal u is conditioned by a first order with time constant T. +Like in the derivative block, +the derivative of the input signal is approximated by (u - x)/T. This way even steps with local extrema just before and after the step are taken into account.

diff --git a/Modelica/Blocks/package.mo b/Modelica/Blocks/package.mo index e05280f660..2190133239 100644 --- a/Modelica/Blocks/package.mo +++ b/Modelica/Blocks/package.mo @@ -1669,9 +1669,9 @@ Note that the ContinuousSignalExtremaBlock detects extrema of both signals witho

The output of these blocks is updated after each period of the signal.

-Using a simple pulse series, these values can be calculated analytically. -Propagating these values as initial values for the output, -we can compare the numerical solution with the analytical solution: +Using a simple pulse series, these values can be calculated analytically. +Propagating these values as initial values for the output, +we can compare the numerical solution with the analytical solution: The output is constant from the beginning.

")); diff --git a/Modelica/Electrical/Analog/Basic/OpAmpDetailed.mo b/Modelica/Electrical/Analog/Basic/OpAmpDetailed.mo index 8ec0c9b92c..9492937692 100644 --- a/Modelica/Electrical/Analog/Basic/OpAmpDetailed.mo +++ b/Modelica/Electrical/Analog/Basic/OpAmpDetailed.mo @@ -124,7 +124,6 @@ model OpAmpDetailed "Detailed model of an operational amplifier" else result := (v_out - v_source)/Rout; end if; - return; annotation (Documentation(info="

Internal limitation function, designed for OpAmpDetailed, not for purpose of external usage.

")); @@ -148,7 +147,6 @@ model OpAmpDetailed "Detailed model of an operational amplifier" else result := q_sum; end if; - return; annotation (Documentation(info="

Internal limitation function, designed for OpAmpDetailed, not for purpose of external usage.

")); diff --git a/Modelica/Electrical/Analog/Basic/Potentiometer.mo b/Modelica/Electrical/Analog/Basic/Potentiometer.mo index 0aec7df5e9..e9945e05f6 100644 --- a/Modelica/Electrical/Analog/Basic/Potentiometer.mo +++ b/Modelica/Electrical/Analog/Basic/Potentiometer.mo @@ -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 For most applications it is sufficient to use default settings useFirstOrder=false (default on the Advanced-tab). In this case the intermediate voltage v_int is simply V0*v_in.
-In some applications it might be necessary to set useFirstOrder=true -to let the intermediate voltage v_int rise according to a firstOrder with time constant Tau. +In some applications it might be necessary to set useFirstOrder=true +to let the intermediate voltage v_int rise according to a firstOrder with time constant Tau. In that case the time constant Tau should fit to the dynamics of the input signal.

@@ -115,14 +115,14 @@ Intermediate voltage v_int is limited between positive supply and n

Initialization

-v_in.start and i_out.start are just helpful starting values during initialization, +v_in.start and i_out.start are just helpful starting values during initialization, it is unlikely that it is necessary to change the start values and / or to declare them as fixed.

If it is necessary to use useFirstOrder=true, it is essential to initialize intermediate voltage v_int correctly.
As a default, default initialization (Linear) is sufficient: v_int = V0*v_in.
-However, in some cases the initialization has more than one solution and it is desired to set -v_int at the positive supply (UpperLimit) or +However, in some cases the initialization has more than one solution and it is desired to set +v_int at the positive supply (UpperLimit) or v_int at the negative supply (LowerLimit).

")); diff --git a/Modelica/Electrical/Analog/Lines/M_OLine.mo b/Modelica/Electrical/Analog/Lines/M_OLine.mo index e135c02c72..5d09f2a147 100644 --- a/Modelica/Electrical/Analog/Lines/M_OLine.mo +++ b/Modelica/Electrical/Analog/Lines/M_OLine.mo @@ -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, @@ -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, @@ -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, @@ -309,11 +309,11 @@ equation extent={{-150,130},{150,90}}, textString="%name", textColor={0,0,255})}), Documentation(info=" -

The M_OLine 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 +

The M_OLine 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 -M_Transformer model. +M_Transformer model. The following picture shows the schematic of a segment with four single lines (lines=4):

@@ -321,24 +321,24 @@ The following picture shows the schematic of a segment with four single lines (l alt=\"segment.png\">
-

Note that the user can choose whether the optional "refPin" -is active (so that it can be connected to any other pin), -otherwise the internal "ground" is used. +

Note that the user can choose whether the optional "refPin" +is active (so that it can be connected to any other pin), +otherwise the internal "ground" 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.

The complete multi line consists of N segments and an auxiliary segment_last:

-- segment_1 -- segment_2 -- ... -- segment_N -- segment_last --

-

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 segment_1 only half valued resistors and inductors are used. -The remaining resistors and inductors are at the other end of the line within -the auxiliary segment_last. For the example with 4 lines the schematic of +

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 segment_1 only half valued resistors and inductors are used. +The remaining resistors and inductors are at the other end of the line within +the auxiliary segment_last. For the example with 4 lines the schematic of segment_last is like this:

@@ -347,19 +347,19 @@ the auxiliary segment_last. For the example with 4 lines the schema

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 at least two segments. -Inside the model M_OLine the model segment is used. -This model represents one segment which is build as described above. -For modelling the inductances and their mutual couplings the model -M_Transformer 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 at least two segments. +Inside the model M_OLine the model segment is used. +This model represents one segment which is build as described above. +For modelling the inductances and their mutual couplings the model +M_Transformer 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].

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 dim_vector_lgc is calculated by:

@@ -367,55 +367,55 @@ The vector length dim_vector_lgc is calculated by:

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.

Example
-

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. +

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

\"Matrix\"/
-

the vector with dim_vector_lgc=4*5/2=10 has to appear in the following way: +

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

-

For the example of a microelectronic line of 0.1m length, -which is used as default example for the M_OLine model, +

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

\"L\"/
-

For the example of a microelectronic line of 0.1m length, which is used as default example +

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

\"C\"/
-

For the example of a microelectronic line of 0.1m length, which is used as default example +

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

\"G\"/
-

The user has the possibility to enable a conditional heatport. If so, the M_OLine +

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

R_actual = R*(1 + alpha*(heatPort.T - T_ref))
-

and conductors calculated by

+

and conductors calculated by

G_actual = G/(1 + alpha*(heatPort.T - T_ref))
diff --git a/Modelica/Electrical/Analog/Lines/OLine.mo b/Modelica/Electrical/Analog/Lines/OLine.mo index 412306e6ca..31899c5e16 100644 --- a/Modelica/Electrical/Analog/Lines/OLine.mo +++ b/Modelica/Electrical/Analog/Lines/OLine.mo @@ -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, @@ -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 diff --git a/Modelica/Electrical/Analog/Lines/TLine.mo b/Modelica/Electrical/Analog/Lines/TLine.mo index 7749fc84dd..38379344c0 100644 --- a/Modelica/Electrical/Analog/Lines/TLine.mo +++ b/Modelica/Electrical/Analog/Lines/TLine.mo @@ -23,9 +23,9 @@ equation annotation (defaultComponentName="line", Documentation(info="

-Lossless transmission line with characteristic impedance Z0 and transmission delay TD. The lossless transmission line TLine is a two Port. -Both port branches consist of a resistor with characteristic impedance Z0 and a controlled voltage source that takes into consideration the transmission delay TD. -For further details see [Branin1967]. +Lossless transmission line with characteristic impedance Z0 and transmission delay TD. The lossless transmission line TLine is a two Port. +Both port branches consist of a resistor with characteristic impedance Z0 and a controlled voltage source that takes into consideration the transmission delay TD. +For further details see [Branin1967]. The model parameters can be derived from inductance and capacitance per length (L' resp. C'), i. e. Z0 = sqrt(L' / C').

@@ -34,7 +34,7 @@ There are three possibilities for specifying the transmission delay TD:

diff --git a/Modelica/Electrical/Analog/Lines/ULine.mo b/Modelica/Electrical/Analog/Lines/ULine.mo index 0bf91a3290..18c4ded5c2 100644 --- a/Modelica/Electrical/Analog/Lines/ULine.mo +++ b/Modelica/Electrical/Analog/Lines/ULine.mo @@ -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, diff --git a/Modelica/Electrical/Analog/Sources/DCPowerSupply.mo b/Modelica/Electrical/Analog/Sources/DCPowerSupply.mo index 383b7d1c88..f5955b54fb 100644 --- a/Modelica/Electrical/Analog/Sources/DCPowerSupply.mo +++ b/Modelica/Electrical/Analog/Sources/DCPowerSupply.mo @@ -82,8 +82,8 @@ equation textString="%P0")}), Documentation(info="

-This is a simple model of a DC power supply, as used in laboratories. -It can only work in one quadrant, i.e., positive voltage, delivering current. +This is a simple model of a DC power supply, as used in laboratories. +It can only work in one quadrant, i.e., positive voltage, delivering current. It has three limitations:

Explanations

-According to Fig. 1, a straight line between 0.1 and 0.9 of the amplitude is drawn. -The virtual start of the trajectory is defined by the intersection of this straight line and the abscissa. +According to Fig. 1, a straight line between 0.1 and 0.9 of the amplitude is drawn. +The virtual start of the trajectory is defined by the intersection of this straight line and the abscissa. The rise time T1 is defined as the time span between the virtual start of the trajectory and the point in time when the straight line reaches the amplitude. The decay time to half value T2 is defined as the time span between the virtual start and the point in time when the output falls below 0.5 of the amplitude.

diff --git a/Modelica/Electrical/Analog/Sources/LightningImpulseCurrent.mo b/Modelica/Electrical/Analog/Sources/LightningImpulseCurrent.mo index c0e216f1bc..9aec8d6e1a 100644 --- a/Modelica/Electrical/Analog/Sources/LightningImpulseCurrent.mo +++ b/Modelica/Electrical/Analog/Sources/LightningImpulseCurrent.mo @@ -22,7 +22,7 @@ model LightningImpulseCurrent "Lightning impulse current" -39.3},{50.9,-44.5},{60.8,-48.8},{70,-51.4}})}), Documentation(info="

-Lightning impulse current using either a double exponential function or a Heidler function, +Lightning impulse current using either a double exponential function or a Heidler function, see block LightningImpulse.

")); diff --git a/Modelica/Electrical/Analog/Sources/LightningImpulseVoltage.mo b/Modelica/Electrical/Analog/Sources/LightningImpulseVoltage.mo index 63974c8b5c..4f7e2278df 100644 --- a/Modelica/Electrical/Analog/Sources/LightningImpulseVoltage.mo +++ b/Modelica/Electrical/Analog/Sources/LightningImpulseVoltage.mo @@ -22,7 +22,7 @@ model LightningImpulseVoltage "Lightning impulse voltage" -39.3},{50.9,-44.5},{60.8,-48.8},{70,-51.4}})}), Documentation(info="

-Lightning impulse voltage using either a double exponential function or a Heidler function, +Lightning impulse voltage using either a double exponential function or a Heidler function, see block LightningImpulse.

")); diff --git a/Modelica/Electrical/Machines/BasicMachines/SynchronousMachines/SM_ElectricalExcited.mo b/Modelica/Electrical/Machines/BasicMachines/SynchronousMachines/SM_ElectricalExcited.mo index 970a215e10..f0d2254ae4 100644 --- a/Modelica/Electrical/Machines/BasicMachines/SynchronousMachines/SM_ElectricalExcited.mo +++ b/Modelica/Electrical/Machines/BasicMachines/SynchronousMachines/SM_ElectricalExcited.mo @@ -113,7 +113,7 @@ model SM_ElectricalExcited "Brush loss parameter record" annotation (Dialog(tab="Losses")); output SI.Voltage ve=pin_ep.v - pin_en.v "Excitation voltage"; - output SI.Current ie=pin_ep.i "Excitation current"; + output SI.Current ie(start=0)=pin_ep.i "Excitation current"; Machines.BasicMachines.Components.DamperCage damperCage( final Lrsigmad=Lrsigmad, final Lrsigmaq=Lrsigmaq, diff --git a/Modelica/Electrical/Machines/Examples/DCMachines/DCPM_Drive.mo b/Modelica/Electrical/Machines/Examples/DCMachines/DCPM_Drive.mo index 09b8f08ad8..6a4b61fd05 100644 --- a/Modelica/Electrical/Machines/Examples/DCMachines/DCPM_Drive.mo +++ b/Modelica/Electrical/Machines/Examples/DCMachines/DCPM_Drive.mo @@ -139,23 +139,23 @@ equation annotation (experiment(StopTime=2.0, Interval=1E-4, Tolerance=1E-6), Documentation( info="

-This example demonstrates how to use a coupling -to implement a drive consisting if two permanent magnet DC machines. -Note that dcpm1 is turning in the positive direction, whereas dcpm2 is turning in the opposite direction. -This is evident by comparing speedSensor1.w and speedSensor2.w. +This example demonstrates how to use a coupling +to implement a drive consisting if two permanent magnet DC machines. +Note that dcpm1 is turning in the positive direction, whereas dcpm2 is turning in the opposite direction. +This is evident by comparing speedSensor1.w and speedSensor2.w. Therefore, the armature of dcpm2 is connected reversed to the source.

-Machine dcpm1 starts the drive with a voltage ramp up to half of no-load speed, the armature of dcpm2 is not connected. -Since the induced voltage of dcpm2 is the same as that of dcdcInverter2, the switch is closed without any transient. -After that, the armature voltage of dcpm2 is slightly increased, causing dcpm2 to drive as motor and dcpm1 to brake as generator. -Therefore, the speed coupling.w increases. +Machine dcpm1 starts the drive with a voltage ramp up to half of no-load speed, the armature of dcpm2 is not connected. +Since the induced voltage of dcpm2 is the same as that of dcdcInverter2, the switch is closed without any transient. +After that, the armature voltage of dcpm2 is slightly increased, causing dcpm2 to drive as motor and dcpm1 to brake as generator. +Therefore, the speed coupling.w increases.

-Note that in stationary operation the battery only delivers the losses of both machines, since power is exchanged directly between both machines. -Only during short time spans with transient operation power is delivered back to the battery, -which is the case after accelerating the whole drive when angular velocity settles. -An additional energy storage between the battery and the inverters (like a large capacitor or a super capacitor) would help to avoid such situations +Note that in stationary operation the battery only delivers the losses of both machines, since power is exchanged directly between both machines. +Only during short time spans with transient operation power is delivered back to the battery, +which is the case after accelerating the whole drive when angular velocity settles. +An additional energy storage between the battery and the inverters (like a large capacitor or a super capacitor) would help to avoid such situations and to smooth possible current spikes.

")); diff --git a/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_DOL.mo b/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_DOL.mo index 06b690bc21..c9b2383125 100644 --- a/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_DOL.mo +++ b/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_DOL.mo @@ -41,7 +41,8 @@ model SMEE_DOL TrOperational=293.15, alpha20r=smeeData.alpha20r, alpha20e=smeeData.alpha20e, - TeOperational=293.15) + TeOperational=293.15, + ie(fixed=true)) annotation (Placement(transformation(extent={{-20,-50},{0,-30}}))); Machines.Sensors.RotorDisplacementAngle rotorDisplacementAngle(p=smee.p, m=m) annotation (Placement(transformation( @@ -132,7 +133,6 @@ model SMEE_DOL annotation (Placement(transformation(extent={{90,-50},{70,-30}}))); initial equation smee.is[1:2] = zeros(2); - smee.ie = 0; //conditional damper cage currents are defined as fixed start values equation connect(rotorDisplacementAngle.plug_n, smee.plug_sn) annotation (Line( diff --git a/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_LoadDump.mo b/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_LoadDump.mo index e3205571cd..ae7a3f2b27 100644 --- a/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_LoadDump.mo +++ b/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_LoadDump.mo @@ -55,7 +55,8 @@ model SMEE_LoadDump TrOperational=293.15, alpha20r=smeeData.alpha20r, alpha20e=smeeData.alpha20e, - TeOperational=293.15) + TeOperational=293.15, + ie(fixed=true)) annotation (Placement(transformation(extent={{0,-40},{20,-20}}))); parameter Machines.Utilities.SynchronousMachineData smeeData( SNominal=30e3, @@ -155,7 +156,6 @@ protected initial equation smee.idq_sr = zeros(2); //conditional damper cage currents are defined as fixed start values - smee.ie = 0; equation connect(terminalBox.plug_sn, smee.plug_sn) annotation (Line( points={{4,-20},{4,-20}}, diff --git a/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_Rectifier.mo b/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_Rectifier.mo index d3963a482d..fdd1ee3eca 100644 --- a/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_Rectifier.mo +++ b/Modelica/Electrical/Machines/Examples/SynchronousMachines/SMEE_Rectifier.mo @@ -49,7 +49,8 @@ model SMEE_Rectifier TrOperational=293.15, alpha20r=smeeData.alpha20r, alpha20e=smeeData.alpha20e, - TeOperational=293.15) + TeOperational=293.15, + ie(fixed=true)) annotation (Placement(transformation(extent={{0,-40},{20,-20}}))); parameter Machines.Utilities.SynchronousMachineData smeeData( SNominal=30e3, @@ -176,7 +177,6 @@ protected initial equation smee.is[1:2] = zeros(2); //conditional damper cage currents are defined as fixed start values - smee.ie = 0; equation connect(terminalBox.plug_sn, smee.plug_sn) annotation (Line( points={{4,-20},{4,-20}}, diff --git a/Modelica/Electrical/Machines/Utilities/Coupling.mo b/Modelica/Electrical/Machines/Utilities/Coupling.mo index 05bdfbbbb3..be6850b9c4 100644 --- a/Modelica/Electrical/Machines/Utilities/Coupling.mo +++ b/Modelica/Electrical/Machines/Utilities/Coupling.mo @@ -64,11 +64,11 @@ equation -10,-22},{10,-20},{10,-42},{-10,-40},{-10,-60}}, color={0,0,0})}), Documentation(info="

-This is a model of an ideal stiff coupling: -One device connected to the coupling is turning clockwise (looking at the shaft end), -the other device connected to the coupling is turning counter-clockwise (looking at the shaft end). -The torque at flange_b has the same magnitude as the torque at flange_a but opposite sign. -This is achieved by using an +This is a model of an ideal stiff coupling: +One device connected to the coupling is turning clockwise (looking at the shaft end), +the other device connected to the coupling is turning counter-clockwise (looking at the shaft end). +The torque at flange_b has the same magnitude as the torque at flange_a but opposite sign. +This is achieved by using an ideal gear with ratio = -1.

@@ -76,7 +76,7 @@ Variable w represents the angular velocity of flange_a and tau represents the torque transferred from flange_a to flange_b.

-This behaviour is essential when coupling electric machines. The usage is demonstrated +This behaviour is essential when coupling electric machines. The usage is demonstrated in the example Modelica.Electrical.Machines.Examples.DCMachines.DCPM_Drive.

")); diff --git a/Modelica/Electrical/Polyphase/Examples/TransformerYY.mo b/Modelica/Electrical/Polyphase/Examples/TransformerYY.mo index 9e3649db86..4820141564 100644 --- a/Modelica/Electrical/Polyphase/Examples/TransformerYY.mo +++ b/Modelica/Electrical/Polyphase/Examples/TransformerYY.mo @@ -81,12 +81,12 @@ equation

Simulate for 1 second (2 periods) and compare voltages and currents of source, transformer and load.

Note

-From the m currents m-1 have to be initialized with fixed = true, one of the m currents with fixed = false, +From the m currents m-1 have to be initialized with fixed = true, one of the m currents with fixed = false, due to the fact that the star connection enforces sum of the currents = 0.

-Tools are expected to present a proper initialization section of the menu of transformerL which allows -to set the start values of the m currents and the fixed attributes individually, i.e. as an array. +Tools are expected to present a proper initialization section of the menu of transformerL which allows +to set the start values of the m currents and the fixed attributes individually, i.e. as an array. Especially, a checkbox for the fixed attributes should be avoided.

diff --git a/Modelica/Electrical/PowerConverters/DCDC/Control/SignalPWM.mo b/Modelica/Electrical/PowerConverters/DCDC/Control/SignalPWM.mo index 5d837525e9..d00c81c7bb 100644 --- a/Modelica/Electrical/PowerConverters/DCDC/Control/SignalPWM.mo +++ b/Modelica/Electrical/PowerConverters/DCDC/Control/SignalPWM.mo @@ -138,7 +138,7 @@ equation Documentation(info="

This controller can be used both for DC/DC and AC/DC converters. -The signal input of the PWM controller is the duty cycle; the duty cycle is the ratio of the on time to the switching period. +The signal input of the PWM controller is the duty cycle; the duty cycle is the ratio of the on time to the switching period. The output firing signal is strictly determined by the actual duty cycle, indicated as d in Fig. 1.

@@ -152,7 +152,7 @@ The output firing signal is strictly determined by the actual duty cycle, indica

-The firing signal is generated by comparing the sampled duty cycle input with a periodic saw tooth +The firing signal is generated by comparing the sampled duty cycle input with a periodic saw tooth [Williams2006] or triangular signal (carrier).

@@ -160,12 +160,12 @@ The firing signal is generated by comparing the sampled duty cycle input with a

The user has the choice between two comparison modes:

-

commonComparison = true : -The result of the comparison dutyCyle > carrier is fed to fire_p, the inverse signal to fire_n. +

commonComparison = true : +The result of the comparison dutyCyle > carrier is fed to fire_p, the inverse signal to fire_n.

-

commonComparison = false: -The result of the comparison dutyCyle > carrier is fed to fire_p, -the result of the comparison (1 - dutyCyle) > carrier is fed to fire_n. +

commonComparison = false: +The result of the comparison dutyCyle > carrier is fed to fire_p, +the result of the comparison (1 - dutyCyle) > carrier is fed to fire_n. (The result is the same for the comparison dutyCycle > (1 - carrier), i.e. a signal shifted by 180°.)

")); diff --git a/Modelica/Electrical/PowerConverters/DCDC/HBridge.mo b/Modelica/Electrical/PowerConverters/DCDC/HBridge.mo index 2e9225d6c8..1439592392 100644 --- a/Modelica/Electrical/PowerConverters/DCDC/HBridge.mo +++ b/Modelica/Electrical/PowerConverters/DCDC/HBridge.mo @@ -159,8 +159,8 @@ See examples

Therefore a short circuit on the source is avoided intrinsically.

-If both versions are provided with the same (complementary) fire signals, identical results are obtained. -Additionally, two more switching states are possible: +If both versions are provided with the same (complementary) fire signals, identical results are obtained. +Additionally, two more switching states are possible: fire_p = fire_n = true (which means switching on both upper switches) and fire_p = fire_n = false (which means switching on both lower switches).

")); diff --git a/Modelica/Electrical/PowerConverters/Examples/DCDC/ChopperBuckBoost/ChopperBuckBoost_DutyCycle.mo b/Modelica/Electrical/PowerConverters/Examples/DCDC/ChopperBuckBoost/ChopperBuckBoost_DutyCycle.mo index d0bd392030..3fa9ebea51 100644 --- a/Modelica/Electrical/PowerConverters/Examples/DCDC/ChopperBuckBoost/ChopperBuckBoost_DutyCycle.mo +++ b/Modelica/Electrical/PowerConverters/Examples/DCDC/ChopperBuckBoost/ChopperBuckBoost_DutyCycle.mo @@ -16,22 +16,22 @@ equation Tolerance=1e-06), Documentation(info="

-This examples demonstrates bidirectional coupling of two batteries with different voltages as used in automotive. +This examples demonstrates bidirectional coupling of two batteries with different voltages as used in automotive. For idleDutyCycle = 1 - (VLV/VHV), no current is exchanged.

-Starting with dutyCycle < idleDutyCycle, the high voltage battery feeds the low voltage battery. -Changing the dutyCycle > idleDutyCycle, the low voltage battery feeds the high voltage battery. +Starting with dutyCycle < idleDutyCycle, the high voltage battery feeds the low voltage battery. +Changing the dutyCycle > idleDutyCycle, the low voltage battery feeds the high voltage battery.

-The capacitors are precharged to the battery voltages, but the inductor leads zero current. +The capacitors are precharged to the battery voltages, but the inductor leads zero current. The current sensor may be used to implement current control.

Control

For hints implementing control, see: -Stefan Norbert Matlok, -Digitale Regelung bidirektionaler Gleichspannungswandler +Stefan Norbert Matlok, +Digitale Regelung bidirektionaler Gleichspannungswandler (German, Digital control of bidirectional DC/DC converters), PhD thesis University Erlangen-Nuremberg 2020.

")); diff --git a/Modelica/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_TrianglePWM_RL.mo b/Modelica/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_TrianglePWM_RL.mo index 71671ff7b1..185e076f70 100644 --- a/Modelica/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_TrianglePWM_RL.mo +++ b/Modelica/Electrical/PowerConverters/Examples/DCDC/HBridge/HBridge_TrianglePWM_RL.mo @@ -28,10 +28,10 @@ equation annotation ( Documentation(info="

-This is the same example as HBridge_RL -but using a triangle (instead of a sawtooth) as pwm reference signal. -This enables an easy sampling of the current in the middle of the pwm period, which delivers with good approximation the mean current: -Compare meanCurrent.y and zeroOrderHold.y. +This is the same example as HBridge_RL +but using a triangle (instead of a sawtooth) as pwm reference signal. +This enables an easy sampling of the current in the middle of the pwm period, which delivers with good approximation the mean current: +Compare meanCurrent.y and zeroOrderHold.y. For discrete or quasi-continuous control it is essential to sample the correct mean current with low effort once during the pwm period.

"), diff --git a/Modelica/Electrical/QuasiStatic/Machines/BasicMachines/package.mo b/Modelica/Electrical/QuasiStatic/Machines/BasicMachines/package.mo index 962c3a6e5b..0bf33b4db1 100644 --- a/Modelica/Electrical/QuasiStatic/Machines/BasicMachines/package.mo +++ b/Modelica/Electrical/QuasiStatic/Machines/BasicMachines/package.mo @@ -35,8 +35,8 @@ package BasicMachines "Basic machine models"

Note

-Quasi-static AC machines (induction machines and synchronous machines) based on space phasor therory are not implemented. -Use quasi-static fundamental wave machines instead. +Quasi-static AC machines (induction machines and synchronous machines) based on space phasor therory are not implemented. +Use quasi-static fundamental wave machines instead. Fundamental wave machines (transient and quasi-static) are compatible with models based on space phasor theory with respect to connectors and parameters. For a discrimination of various machine models, see discrimination.

diff --git a/Modelica/Electrical/QuasiStatic/Machines/package.mo b/Modelica/Electrical/QuasiStatic/Machines/package.mo index 628dc2a535..6dfbd51098 100644 --- a/Modelica/Electrical/QuasiStatic/Machines/package.mo +++ b/Modelica/Electrical/QuasiStatic/Machines/package.mo @@ -37,7 +37,7 @@ Copyright © 1998-2025, Modelica Association and contributors

Note

Quasi-static DC machines are still operated with DC voltage and current, whereas the quasi-static transformers -are operated with sinusoidal voltages and currents represented by time phasors. +are operated with sinusoidal voltages and currents represented by time phasors. Quasi-static DC machine models therefore are part of the machines library.

diff --git a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Admittance.mo b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Admittance.mo index 1d4e46a56c..7619c7bece 100644 --- a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Admittance.mo +++ b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Admittance.mo @@ -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)); diff --git a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Impedance.mo b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Impedance.mo index a753d5c571..3a1cb5f634 100644 --- a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Impedance.mo +++ b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Impedance.mo @@ -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)); diff --git a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Resistor.mo b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Resistor.mo index 7d26280807..970391d9b4 100644 --- a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Resistor.mo +++ b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/Resistor.mo @@ -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]( diff --git a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableAdmittance.mo b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableAdmittance.mo index 4239db9991..c6d68de440 100644 --- a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableAdmittance.mo +++ b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableAdmittance.mo @@ -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)); diff --git a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableConductor.mo b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableConductor.mo index 23480b90bf..9b2e7649ce 100644 --- a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableConductor.mo +++ b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableConductor.mo @@ -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") diff --git a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableImpedance.mo b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableImpedance.mo index bf9fa1823a..b366d84970 100644 --- a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableImpedance.mo +++ b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableImpedance.mo @@ -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)); diff --git a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableResistor.mo b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableResistor.mo index da70323fb7..1e95b3c9f0 100644 --- a/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableResistor.mo +++ b/Modelica/Electrical/QuasiStatic/Polyphase/Basic/VariableResistor.mo @@ -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") diff --git a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Admittance.mo b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Admittance.mo index 8acbb0a3cb..ae2bbe01c1 100644 --- a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Admittance.mo +++ b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Admittance.mo @@ -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)); diff --git a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Impedance.mo b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Impedance.mo index 88f9db2cfb..37f5ea90d4 100644 --- a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Impedance.mo +++ b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Impedance.mo @@ -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)); diff --git a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Resistor.mo b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Resistor.mo index b3609ec83d..1ebc743bbd 100644 --- a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Resistor.mo +++ b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Resistor.mo @@ -5,7 +5,7 @@ model Resistor "Single-phase linear resistor" import Modelica.ComplexMath.conj; parameter SI.Resistance R_ref(start=1) "Reference resistance at T_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); SI.Resistance R_actual "Resistance = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))"; equation diff --git a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Transformer.mo b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Transformer.mo index cc600e2e78..77ff750bf8 100644 --- a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Transformer.mo +++ b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/Transformer.mo @@ -72,7 +72,7 @@ equation annotation ( Documentation(info="

The transformer is a two port. The left port voltage v1, left port current i1, right port voltage v2 and right port current i2 are connected by the following relation:

-
 
+
 | v1 |     | L1   M  |   | i1 |
 |    |  =  |         | . |    |
 | v2 |     | M    L2 |   | i2 |
diff --git a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableAdmittance.mo b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableAdmittance.mo
index 018de93e4c..303f457e6d 100644
--- a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableAdmittance.mo
+++ b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableAdmittance.mo
@@ -5,7 +5,7 @@ model VariableAdmittance "Single-phase variable admittance"
   import Modelica.ComplexMath.imag;
   import Modelica.ComplexMath.conj;
   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);
   Modelica.ComplexBlocks.Interfaces.ComplexInput Y_ref "Variable complex admittance"
     annotation (Placement(transformation(
diff --git a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableImpedance.mo b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableImpedance.mo
index 23820a370c..bd963bfd32 100644
--- a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableImpedance.mo
+++ b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableImpedance.mo
@@ -5,7 +5,7 @@ model VariableImpedance "Single-phase variable impedance"
   import Modelica.ComplexMath.imag;
   import Modelica.ComplexMath.conj;
   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);
   Modelica.ComplexBlocks.Interfaces.ComplexInput Z_ref "Variable complex impedance"
     annotation (Placement(transformation(
diff --git a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableResistor.mo b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableResistor.mo
index 0e12af0855..442d800058 100644
--- a/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableResistor.mo
+++ b/Modelica/Electrical/QuasiStatic/SinglePhase/Basic/VariableResistor.mo
@@ -4,7 +4,7 @@ model VariableResistor "Single-phase variable resistor"
   import Modelica.ComplexMath.real;
   import Modelica.ComplexMath.conj;
   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);
   SI.Resistance R_actual "Resistance = R_ref*(1 + alpha_ref*(heatPort.T - T_ref))";
   Modelica.Blocks.Interfaces.RealInput R_ref(unit="Ohm") "Variable resistance"
diff --git a/Modelica/Electrical/QuasiStatic/SinglePhase/Examples/MultipleResonance.mo b/Modelica/Electrical/QuasiStatic/SinglePhase/Examples/MultipleResonance.mo
index ac5647fba5..e9228299ae 100644
--- a/Modelica/Electrical/QuasiStatic/SinglePhase/Examples/MultipleResonance.mo
+++ b/Modelica/Electrical/QuasiStatic/SinglePhase/Examples/MultipleResonance.mo
@@ -83,7 +83,7 @@ equation
       Interval=0.0001),
       Documentation(info="
 

-The series resonance load circuit is fed by a voltage source with inner impedance. +The series resonance load circuit is fed by a voltage source with inner impedance. By using a transformer between source and load, we achieve multiple resonance by varying the source frequency:

    @@ -91,7 +91,7 @@ By using a transformer between source and load, we achieve multiple resonance by
  • parallel resonance: Im{Y}=0

-Plot currentSensor.abs_i and currentSensor.arg_i versus frequency, i.e. frequencySweep.y. +Plot currentSensor.abs_i and currentSensor.arg_i versus frequency, i.e. frequencySweep.y. Note that the behaviour is fundamentally different from that of a simple series resonance circuit.

")); diff --git a/Modelica/Magnetic/FluxTubes/Basic/ElectroMagneticConverter.mo b/Modelica/Magnetic/FluxTubes/Basic/ElectroMagneticConverter.mo index fe74f5290b..b7d9653548 100644 --- a/Modelica/Magnetic/FluxTubes/Basic/ElectroMagneticConverter.mo +++ b/Modelica/Magnetic/FluxTubes/Basic/ElectroMagneticConverter.mo @@ -18,7 +18,7 @@ model ElectroMagneticConverter "Ideal electromagnetic energy conversion" // For information only: SI.MagneticFlux Psi "Flux linkage"; - SI.Inductance L_stat "Static inductance abs(Psi/i)"; + SI.Inductance L_stat "Static inductance (valid if this coil is the only source)"; protected Real eps=100*Modelica.Constants.eps; @@ -38,7 +38,7 @@ equation // For information only Psi = N*Phi; // Use of abs() for positive results; due to Modelica sign conventions for flow into connectors - L_stat = noEvent(if abs(i) > eps then abs(Psi/i) else abs(Psi/eps)); + L_stat = if noEvent(abs(i) > eps) then abs(Psi/i) else abs(Psi/eps); annotation ( defaultComponentName="converter", @@ -164,9 +164,12 @@ v is the induced voltage in the coil due to the derivative of magnetic flux &Phi If a coil wound clockwise has to be modeled instead, the parameter N (Number of turns) can be set to a negative value.

+ +

Note

-The flux linkage Ψ and the static inductance L_stat = |Ψ/i| are calculated for information only. Note that L_stat is set to |Ψ/eps| if |i| < eps -(= 100*Modelica.Constants.eps). +The flux linkage Ψ and the static inductance L_stat = |Ψ/i| are calculated for information only. +Note that L_stat is set to |Ψ/eps| if |i| < eps (= 100*Modelica.Constants.eps).
+Note that this local calculation of L_stat is only valid if this coil is the only source in the magnetic circuit.

")); end ElectroMagneticConverter; diff --git a/Modelica/Magnetic/FluxTubes/Basic/ElectroMagneticConverterWithLeakageInductance.mo b/Modelica/Magnetic/FluxTubes/Basic/ElectroMagneticConverterWithLeakageInductance.mo index 16da6552af..51fd7c7b25 100644 --- a/Modelica/Magnetic/FluxTubes/Basic/ElectroMagneticConverterWithLeakageInductance.mo +++ b/Modelica/Magnetic/FluxTubes/Basic/ElectroMagneticConverterWithLeakageInductance.mo @@ -35,7 +35,7 @@ model ElectroMagneticConverterWithLeakageInductance // For information only SI.MagneticFlux Psi "Flux linkage"; - SI.Inductance L_stat "Static inductance abs(Psi/i)"; + SI.Inductance L_stat "Static inductance (valid if this coil is the only source)"; protected constant Real eps=100*Modelica.Constants.eps; @@ -59,7 +59,7 @@ equation // For information only Psi = N*Phi_ind; //use of abs() for positive results; due to Modelica sign conventions for flow into connectors - L_stat = noEvent(if abs(i) > eps then abs(Psi/i) else abs(Psi/eps)); + L_stat = if noEvent(abs(i) > eps) then abs(Psi/i) else abs(Psi/eps); annotation ( defaultComponentName="converter", @@ -158,7 +158,16 @@ equation Line(points={{-30,-100},{-30,-60}}, color={28,108,200})}), Documentation(info="

-Same as ElectroMagneticConverter with an additional leakage path on the magnetic side (leakage inductance, leakage flux). This model may improve stability especially when the magnetic circuit contains more than one electromagnetic converter. +Same as ElectroMagneticConverter +with an additional leakage path on the magnetic side (leakage inductance, leakage flux). +This model may improve stability especially when the magnetic circuit contains more than one electromagnetic converter. +

+ +

Note

+

+The flux linkage Ψ and the static inductance L_stat = |Ψ/i| are calculated for information only. +Note that L_stat is set to |Ψ/eps| if |i| < eps (= 100*Modelica.Constants.eps).
+Note that this local calculation of L_stat is only valid if this coil is the only source in the magnetic circuit.

")); end ElectroMagneticConverterWithLeakageInductance; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/ElectricSheet/M330_50A.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/ElectricSheet/M330_50A.mo index 5a19230011..b734d37151 100644 --- a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/ElectricSheet/M330_50A.mo +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/ElectricSheet/M330_50A.mo @@ -1,5 +1,5 @@ within Modelica.Magnetic.FluxTubes.Material.SoftMagnetic.ElectricSheet; -record M330_50A "M330-50A (1.0809) @ 50Hz" +record M330_50A "M330-50A (1.0809) @ 50Hz complete core" extends FluxTubes.Material.SoftMagnetic.BaseData( label="M330-50A", mu_i=500, @@ -8,6 +8,7 @@ record M330_50A "M330-50A (1.0809) @ 50Hz" c_b=9.38, n=9.6); annotation (defaultComponentPrefixes="parameter", + preferredView="info", Documentation(info="

Please refer to the description of the enclosing package SoftMagnetic for a description of all soft magnetic material characteristics of this package. @@ -15,5 +16,10 @@ Please refer to the description of the enclosing package Sample: complete core after machining and packet assembling

+

Note

+

+This material has been measured under different conditions (complete core / machined and packeted) as the other electric sheets (sheet strip / Epstein frame). +Direct comparison with other material is therefore not possible. +

")); end M330_50A; diff --git a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/package.mo b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/package.mo index ae15aec2ba..390226d793 100644 --- a/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/package.mo +++ b/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/package.mo @@ -2,27 +2,47 @@ within Modelica.Magnetic.FluxTubes.Material; package SoftMagnetic "Characteristics mu_r(B) of common soft magnetic materials; hysteresis neglected" extends Modelica.Icons.MaterialPropertiesPackage; - annotation (Documentation(info=" + annotation (preferredView="info", + Documentation(info="

-The magnetisation characteristics mu_r(B) of all soft magnetic materials currently included in this library are approximated with a function. Each material is characterised by the five parameters of this function. The approximated characteristics mu_r(B) for most of the ferromagnetic materials currently included are shown in the plots below (solid lines) together with the original data points compiled from measurements and literature. +The magnetisation characteristics mu_r(B) of all soft magnetic materials currently included in this library are approximated +with a function. Each material is characterised by the five parameters of this function. +The approximated characteristics mu_r(B) for most of the ferromagnetic materials currently included are shown in the plots below (solid lines) +together with the original data points compiled from measurements and literature.

+\"Approximated
\"Approximated
\"Approximated
-\"Approximated
+ +

Note

-For the nonlinear curve fit, data points for high flux densities (approximately B>1T) have been weighted higher than the ones for low flux densities. This is due to the large impact of saturated ferromagnetic sections in a magnetic circuit compared to that of non-saturated sections with relative permeabilities mu_r>>1. +The material M330-50A has been measured +under different conditions (complete core / machined and packeted) as the other electric sheets (sheet strip / Epstein frame). +Therefore, a direct comparison with other materials is not possible.

-Note that the magnetisation characteristics largely depend on possible previous machining and on measurement conditions. A virgin material normally has a considerably higher permeability than the same material after machining (and packet assembling in case of electric sheets). This is indicated in the above plots by different magnetisation curves for similar materials. In most cases, the original data points represent commutating curves obtained with measurements at 50Hz. +For the nonlinear curve fit, data points for high flux densities (approximately B>1T) have been weighted higher than the ones for low flux densities. +This is due to the large impact of saturated ferromagnetic sections in a magnetic circuit compared to that of non-saturated sections with relative permeabilities mu_r>>1. +

+ +

+Note that the magnetisation characteristics largely depend on possible previous machining and on measurement conditions. +A virgin material normally has a considerably higher permeability than the same material after machining (and packet assembling in case of electric sheets). +This is indicated in the above plots by different magnetisation curves for similar materials. In most cases, the original data points represent commutating curves obtained with measurements at 50Hz.

Additional user-specific materials can be defined as needed. This requires determination of the approximation parameters from the original data points, preferably with a nonlinear curve fit.

+ +

+The magnetisation characteristics of the included soft magnetic materials were compiled and measured respectively by Thomas Roschke. +Provision of this data is highly appreciated. He also formulated the approximation function used for description of the magnetisation characteristics of these materials. +

")); end SoftMagnetic; diff --git a/Modelica/Magnetic/FundamentalWave/BasicMachines/SynchronousMachines/SM_ElectricalExcited.mo b/Modelica/Magnetic/FundamentalWave/BasicMachines/SynchronousMachines/SM_ElectricalExcited.mo index df45c091f2..2453be7798 100644 --- a/Modelica/Magnetic/FundamentalWave/BasicMachines/SynchronousMachines/SM_ElectricalExcited.mo +++ b/Modelica/Magnetic/FundamentalWave/BasicMachines/SynchronousMachines/SM_ElectricalExcited.mo @@ -109,7 +109,7 @@ model SM_ElectricalExcited annotation (Dialog(tab="Losses")); output SI.Voltage ve=pin_ep.v - pin_en.v "Excitation voltage"; - output SI.Current ie=pin_ep.i "Excitation current"; + output SI.Current ie(start=0)=pin_ep.i "Excitation current"; // Rotor cage components Modelica.Blocks.Interfaces.RealOutput ir[2]( start=zeros(2), diff --git a/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/InductionMachines/ComparisonPolyphase/IMC_DOL_CommonLeakage.mo b/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/InductionMachines/ComparisonPolyphase/IMC_DOL_CommonLeakage.mo index 3f9a69972b..6cc68bb26a 100644 --- a/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/InductionMachines/ComparisonPolyphase/IMC_DOL_CommonLeakage.mo +++ b/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/InductionMachines/ComparisonPolyphase/IMC_DOL_CommonLeakage.mo @@ -262,9 +262,9 @@ equation

At start time tStart voltages are supplied to the polyphase induction machines with squirrel cage. -The machines starts from standstill, accelerating inertias against load torque quadratic dependent on speed, finally reaching nominal speed. -Three equivalent machines with different parameter ratioCommonLeakage are compared. -Note that due to the mode of operation, the behaviour of all three machines is identical. +The machines starts from standstill, accelerating inertias against load torque quadratic dependent on speed, finally reaching nominal speed. +Three equivalent machines with different parameter ratioCommonLeakage are compared. +Note that due to the mode of operation, the behaviour of all three machines is identical. Only when fed by switching power electronics, parameter ratioCommonLeakage is essential.

"), diff --git a/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_DOL.mo b/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_DOL.mo index 01eef6f532..557365f3b1 100644 --- a/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_DOL.mo +++ b/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_DOL.mo @@ -33,6 +33,7 @@ model SMEE_DOL statorCoreParameters(VRef=100), strayLoadParameters(IRef=100), brushParameters(ILinear=0.01), + ie(fixed=true), ir(each fixed=true), wMechanical(fixed=true), m=m, @@ -125,7 +126,6 @@ model SMEE_DOL initial equation // sum(smee.is) = 0; smee.is[1:2] = zeros(2); - smee.ie = 0; //conditional damper cage currents are defined as fixed start values equation connect(irRMS, smee.irRMS); diff --git a/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_LoadDump.mo b/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_LoadDump.mo index 92ca94711d..760ac10bd3 100644 --- a/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_LoadDump.mo +++ b/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_LoadDump.mo @@ -59,7 +59,8 @@ model SMEE_LoadDump alpha20r=smeeData.alpha20r, TrOperational=293.15, TeOperational=293.15, - alpha20e=smeeData.alpha20e) + alpha20e=smeeData.alpha20e, + ie(fixed=true)) annotation (Placement(transformation(extent={{0,-40},{20,-20}}))); parameter Modelica.Electrical.Machines.Utilities.SynchronousMachineData smeeData( SNominal=30e3, @@ -163,7 +164,6 @@ public initial equation smee.airGap.V_msr = Complex(0, 0); //conditional damper cage currents are defined as fixed start values - smee.ie = 0; equation connect(terminalBox.plug_sn, smee.plug_sn) annotation (Line( points={{4,-20},{4,-20}}, color={0,0,255})); diff --git a/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_Rectifier.mo b/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_Rectifier.mo index 302fe67ea6..d510ec847a 100644 --- a/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_Rectifier.mo +++ b/Modelica/Magnetic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMEE_Rectifier.mo @@ -42,6 +42,7 @@ model SMEE_Rectifier statorCoreParameters(VRef=100), strayLoadParameters(IRef=100), brushParameters(ILinear=0.01), + ie(fixed=true), ir(each fixed=true), Rs=smeeData.Rs*m/3, Lssigma=smeeData.Lssigma*m/3, @@ -182,7 +183,6 @@ protected initial equation smee.is[1:2] = zeros(2); //conditional damper cage currents are defined as fixed start values - smee.ie = 0; equation connect(terminalBox.plug_sn, smee.plug_sn) annotation (Line( points={{4,-20},{4,-20}}, color={0,0,255})); diff --git a/Modelica/Magnetic/FundamentalWave/Examples/Components/PolyphaseInductance.mo b/Modelica/Magnetic/FundamentalWave/Examples/Components/PolyphaseInductance.mo index e2d9c5823b..bf18f05a9b 100644 --- a/Modelica/Magnetic/FundamentalWave/Examples/Components/PolyphaseInductance.mo +++ b/Modelica/Magnetic/FundamentalWave/Examples/Components/PolyphaseInductance.mo @@ -151,9 +151,9 @@ equation annotation (Line(points={{40,20},{62,20}}, color={255,128,0})); annotation (experiment(StopTime=100, Interval=0.01), Documentation(info="

-This example compares an electric polyphase inductor with equivalent fundamental wave reluctance circuits, +This example compares an electric polyphase inductor with equivalent fundamental wave reluctance circuits, one with reluctances individual for each phase (s) and the other with a common reluctance for all phases (m). -The phase inductance L and the magnetic fundamental wave reluctance R_m +The phase inductance L and the magnetic fundamental wave reluctance R_m for reluctances individual to the phases (s) and for a reluctance common to all phases (m) are related by:

@@ -173,7 +173,7 @@ The currents

-show the same waveforms and thus prove the equivalence of the different modelling approaches. +show the same waveforms and thus prove the equivalence of the different modelling approaches. Note that the number of initial equations (which depends on the number of phases m, too) depends on either individual or common implementation of the reluctance.

")); diff --git a/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/BasicMachines/InductionMachines/IMC_Inverter.mo b/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/BasicMachines/InductionMachines/IMC_Inverter.mo index e3fa7142db..864a582305 100644 --- a/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/BasicMachines/InductionMachines/IMC_Inverter.mo +++ b/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/BasicMachines/InductionMachines/IMC_Inverter.mo @@ -132,21 +132,21 @@ and accelerate inertias. At time tStep a load step is applied.

-Compare with transient models +Compare with transient models IMC_Inverter (Electrical.Machines) and -IMC_Inverter (FundamentalWave). -Note that electrical transients are neglected, but mechanical transients are taken into account. +IMC_Inverter (FundamentalWave). +Note that electrical transients are neglected, but mechanical transients are taken into account.

Theoretical thoughts

-By setting the stator resistance Rs = 0, comparing quasistatic points of operation for different stator frequencies fs, +By setting the stator resistance Rs = 0, comparing quasistatic points of operation for different stator frequencies fs, it can be seen that

  • in the base region fs ≤ fNominal rotor frequency fr is constant, if the load torque is constant,
  • -
  • whereas in the field weakening region f ≥ fNominal slip is constant, +
  • whereas in the field weakening region f ≥ fNominal slip is constant, if load torque is adapted according to tau = tauNominal*fNominal/f.
diff --git a/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMPM_FieldWeakening.mo b/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMPM_FieldWeakening.mo index 6bc868d0d1..52acc7452f 100644 --- a/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMPM_FieldWeakening.mo +++ b/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/BasicMachines/SynchronousMachines/SMPM_FieldWeakening.mo @@ -157,7 +157,7 @@ This example demonstrates idealized field weakening of a quasistatic permanent m

At standstill, the q-axis current is prescribed by a short ramp up to the nominal current. -The d-axis current is controlled to keep voltage ≤ nominal voltage, while speed is varied up to four times nominal speed like in an automotive application. +The d-axis current is controlled to keep voltage ≤ nominal voltage, while speed is varied up to four times nominal speed like in an automotive application. Total stator current is kept ≤ nominal total current. Simulate and plot versus smpm.wMechanical:

@@ -169,7 +169,7 @@ Total stator current is kept ≤ nominal total current. Simulate and plot versu

-It can be seen that when field weakening begins negative d-axis current is increased from zero while the q-axis current current has to be reduced (current limit) +It can be seen that when field weakening begins negative d-axis current is increased from zero while the q-axis current current has to be reduced (current limit) to enable increase of the d-axis current (voltage limit).

diff --git a/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/ExampleUtilities/SpacePhasorLimiter.mo b/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/ExampleUtilities/SpacePhasorLimiter.mo index d678444374..560c882211 100644 --- a/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/ExampleUtilities/SpacePhasorLimiter.mo +++ b/Modelica/Magnetic/QuasiStatic/FundamentalWave/Examples/ExampleUtilities/SpacePhasorLimiter.mo @@ -6,7 +6,7 @@ equation y = sign(u2)*min(abs(u2), sqrt(yMax^2 - min(yMax, abs(u1))^2)); annotation (Documentation(info="

-Limit the real part u2 of a space phasor if necessary to keep the length lower than yMax keeping u1 unchanged. +Limit the real part u2 of a space phasor if necessary to keep the length lower than yMax keeping u1 unchanged. If u1 is greater than yMax, this cannot be satisfied even with u2 = 0.

"), Icon(graphics={ diff --git a/Modelica/Mechanics/Rotational/Interfaces/PartialFriction.mo b/Modelica/Mechanics/Rotational/Interfaces/PartialFriction.mo index d8693c41c2..26426a31f2 100644 --- a/Modelica/Mechanics/Rotational/Interfaces/PartialFriction.mo +++ b/Modelica/Mechanics/Rotational/Interfaces/PartialFriction.mo @@ -86,7 +86,7 @@ The method is described in [Otter1999]

The parameter w_small is introduced for particular -cases where a reinit is triggered at zero velocity. +cases where a reinit is triggered at zero velocity. For such – rather rare – cases the friction handling logic is no longer correct. On the other hand, introducing w_small in general leads to problems when more @@ -109,6 +109,6 @@ a small value only when the special case with Aug. 22.-26, Hawaii 1999. - + ")); end PartialFriction; diff --git a/Modelica/Mechanics/Rotational/Sources/EddyCurrentTorque.mo b/Modelica/Mechanics/Rotational/Sources/EddyCurrentTorque.mo index 7496f4c535..8bf0a15622 100644 --- a/Modelica/Mechanics/Rotational/Sources/EddyCurrentTorque.mo +++ b/Modelica/Mechanics/Rotational/Sources/EddyCurrentTorque.mo @@ -40,7 +40,7 @@ equation Line(points={{0,0},{-4,-25},{-8,-41},{-12,-48},{-16,-50},{-20,-49},{-24,-46},{-28,-42},{-32,-38},{-36,-34},{-46,-25},{-56,-18},{-66,-12},{-76,-8}}, color={0,0,127}, smooth=Smooth.Bezier)}), Documentation(info="

This is a simple model of a rotational eddy current brake. The torque versus speed characteristic is defined by Kloss' equation.

-

The influence of excitation is either constant (useExcitationInput=false) or given by the optional input excitation (useExcitationInput=true). +

The influence of excitation is either constant (useExcitationInput=false) or given by the optional input excitation (useExcitationInput=true). Note that maximum torque depends on square of excitation (magnetic field).

Thermal behaviour:
The resistance of the braking disc is influenced by the actual temperature Theatport, which in turn shifts the speed w_nominal at which the (unchanged) maximum torque occurs.
diff --git a/Modelica/Mechanics/Translational/Sources/EddyCurrentForce.mo b/Modelica/Mechanics/Translational/Sources/EddyCurrentForce.mo index afd1da1a3b..d061bd6145 100644 --- a/Modelica/Mechanics/Translational/Sources/EddyCurrentForce.mo +++ b/Modelica/Mechanics/Translational/Sources/EddyCurrentForce.mo @@ -37,7 +37,7 @@ equation Line(points={{0,0},{-4,-25},{-8,-41},{-12,-48},{-16,-50},{-20,-49},{-24,-46},{-28,-42},{-32,-38},{-36,-34},{-46,-25},{-56,-18},{-66,-12},{-76,-8}}, color={0,0,127}, smooth=Smooth.Bezier)}), Documentation(info="

This is a simple model of a translational eddy current brake. The force versus speed characteristic is defined by Kloss' equation.

-

The influence of excitation is either constant (useExcitationInput=false) or given by the optional input excitation (useExcitationInput=true). +

The influence of excitation is either constant (useExcitationInput=false) or given by the optional input excitation (useExcitationInput=true). Note that maximum force depends on square of excitation (magnetic field).

Thermal behaviour:
The resistance of the braking fin is influenced by the actual temperature Theatport, which in turn shifts the speed v_nominal at which the (unchanged) maximum torque occurs.
diff --git a/Modelica/Media/Incompressible.mo b/Modelica/Media/Incompressible.mo index a8bea31379..cf5e64fc7b 100644 --- a/Modelica/Media/Incompressible.mo +++ b/Modelica/Media/Incompressible.mo @@ -364,6 +364,46 @@ which is only exactly true for a fluid with constant density d=d0. annotation(smoothOrder=2); end thermalConductivity; + redeclare function extends density_derp_h + "Return density derivative w.r.t. pressure at constant specific enthalpy" + algorithm + ddph := 0; // Correct if enthalpyOfT is true. + end density_derp_h; + + redeclare function extends density_derh_p + "Return density derivative w.r.t. specific enthalpy at constant pressure" + algorithm + ddhp := density_derT_p(state) / specificHeatCapacityCp(state); + end density_derh_p; + + + redeclare function extends density_derp_T + "Return density derivative w.r.t. pressure at constant temperature" + algorithm + ddpT := 0; // Incompressible + end density_derp_T; + + redeclare function extends density_derT_p + "Return density derivative w.r.t. temperature at constant pressure" + algorithm + ddTp := Polynomials.derivativeValue(poly_rho, if TinK then state.T else Cv.to_degC(state.T)); + end density_derT_p; + + redeclare function extends isobaricExpansionCoefficient + "Return isobaric expansion coefficient (beta) as a function of the thermodynamic state record" + algorithm + beta := -density_derT_p(state) / density(state); + annotation( + Documentation(info = "

The isobaric expansion coefficient beta is defined as

+
1/v * der(v,T)
+
+

with v = 1/d, at constant pressure p. +Using the chain rule:

+
1/v * der(v,T) = d * (-der(d, T) / d^2)
+= -der(d, T) / d

+")); + end isobaricExpansionCoefficient; + function s_T "Compute specific entropy" extends Modelica.Icons.Function; input Temperature T "Temperature"; diff --git a/Modelica/Resources/BuildProjects/CMake/Modelica_platform.cmake b/Modelica/Resources/BuildProjects/CMake/Modelica_platform.cmake index bb1f8709bc..b2556a9e7f 100644 --- a/Modelica/Resources/BuildProjects/CMake/Modelica_platform.cmake +++ b/Modelica/Resources/BuildProjects/CMake/Modelica_platform.cmake @@ -76,6 +76,11 @@ function(get_modelica_platform_name_with_compiler_version var) set(PLATFORM_PATH_SUFFIX "${PLATFORM_PATH_SUFFIX}/vs2019") elseif(MSVC_VERSION GREATER_EQUAL 1930 AND MSVC_VERSION LESS 1950) set(PLATFORM_PATH_SUFFIX "${PLATFORM_PATH_SUFFIX}/vs2022") + elseif(MSVC_VERSION GREATER_EQUAL 1950 AND MSVC_VERSION LESS 1960) + set(PLATFORM_PATH_SUFFIX "${PLATFORM_PATH_SUFFIX}/vs2026") + elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU") + string(REPLACE "." "" GCC_VERSION_NO_DOTS "${CMAKE_C_COMPILER_VERSION}") + set(PLATFORM_PATH_SUFFIX "${PLATFORM_PATH_SUFFIX}/gcc${GCC_VERSION_NO_DOTS}") endif() endif() diff --git a/Modelica/Resources/C-Sources/ModelicaInternal.c b/Modelica/Resources/C-Sources/ModelicaInternal.c index 63641ea575..bd2d2ae68e 100644 --- a/Modelica/Resources/C-Sources/ModelicaInternal.c +++ b/Modelica/Resources/C-Sources/ModelicaInternal.c @@ -384,10 +384,12 @@ void ModelicaInternal_mkdir(_In_z_ const char* directoryName) { void ModelicaInternal_rmdir(_In_z_ const char* directoryName) { /* Remove directory */ -#if defined(__WATCOMC__) || defined(__LCC__) || defined(_POSIX_) || defined(__GNUC__) +#if defined(__WATCOMC__) || defined(__LCC__) int result = rmdir(directoryName); #elif defined(__BORLANDC__) || defined(_WIN32) int result = _rmdir(directoryName); +#elif defined(_POSIX_) || defined(__GNUC__) + int result = rmdir(directoryName); #else ModelicaNotExistError("ModelicaInternal_rmdir"); #endif