Skip to content

Commit

Permalink
Added Spice3-specific infiniteTime constant
Browse files Browse the repository at this point in the history
  • Loading branch information
casella committed Oct 17, 2024
1 parent 8e7876b commit 484fd1d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Modelica/Electrical/Spice3.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3134,8 +3134,8 @@ Christoph Clauß
parameter SI.Time TD = 0.0 "Delay time";
parameter SI.Time TR(start=1) "Rise time";
parameter SI.Time TF = TR "Fall time";
parameter SI.Time PW = Modelica.Constants.inf "Pulse width";
parameter SI.Time PER= Modelica.Constants.inf "Period";
parameter SI.Time PW = Spice3.Constants.infiniteTime "Pulse width";
parameter SI.Time PER= Spice3.Constants.infiniteTime "Period";

protected
parameter SI.Time Trising=TR "End time of rising phase within one period";
Expand Down Expand Up @@ -3512,8 +3512,8 @@ If, e.g., time = 1.0, the voltage v = 0.0 (before event), 1.0 (after event)
parameter SI.Time TD = 0.0 "Delay time";
parameter SI.Time TR(start=1) "Rise time";
parameter SI.Time TF = TR "Fall time";
parameter SI.Time PW = Modelica.Constants.inf "Pulse width";
parameter SI.Time PER= Modelica.Constants.inf "Period";
parameter SI.Time PW = Spice3.Constants.infiniteTime "Pulse width";
parameter SI.Time PER= Spice3.Constants.infiniteTime "Period";

protected
parameter SI.Time Trising=TR "End time of rising phase within one period";
Expand Down Expand Up @@ -4435,6 +4435,12 @@ on the model behaviour.
</html>"));
end Types;

package Constants "Spice3-specific constants"
extends Modelica.Icons.Package;

constant Modelica.Units.SI.Time infiniteTime= 1e20 "Numerically safe very large time horizon (3e12 years)";
end Constants;

package Internal
"Collection of functions and records derived from the C++ Spice library"
extends Modelica.Icons.InternalPackage;
Expand Down

0 comments on commit 484fd1d

Please sign in to comment.