Class Transient
A base class for time-domain analysis.
Implements
Inherited Members
Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
public class Transient : BiasingSimulation, IStateful<TemperatureSimulationState>, IStateful<IIterationSimulationState>, IBehavioral<IBiasingUpdateBehavior>, IParameterized<BiasingParameters>, ITimeSimulation, IBiasingSimulation, ISimulation<IVariable<double>>, ITemperatureSimulation, ISimulation, IParameterSetCollection, IParameterSet, IStateful<ITemperatureSimulationState>, IBehavioral<ITemperatureBehavior>, IBehavioral<IBiasingBehavior>, IBehavioral<IConvergenceBehavior>, IStateful<IBiasingSimulationState>, IBehavioral<ITimeBehavior>, IStateful<IIntegrationMethod>, IStateful<ITimeSimulationState>, IStateful, IBehavioral<IAcceptBehavior>, IBehavioral<ITruncatingBehavior>, IBehavioral, IParameterized<TimeParameters>
Constructors
Transient(string)
Initializes a new instance of the Transient class.
Declaration
public Transient(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the simulation. |
Transient(string, TimeParameters)
Initializes a new instance of the Transient class.
Declaration
public Transient(string name, TimeParameters parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the simulation. |
| TimeParameters | parameters | The time parameters. |
Transient(string, double, double)
Initializes a new instance of the Transient class.
Declaration
public Transient(string name, double step, double final)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the simulation. |
| double | step | The step size. |
| double | final | The final time. |
Transient(string, double, double, double)
Initializes a new instance of the Transient class.
Declaration
public Transient(string name, double step, double final, double maxStep)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the simulation. |
| double | step | The step size. |
| double | final | The final time. |
| double | maxStep | The maximum step. |
Fields
ExportOperatingPoint
The constant returned when exporting the operating point.
Declaration
public const int ExportOperatingPoint = 1
Field Value
| Type | Description |
|---|---|
| int |
ExportTransient
The constant returned when exporting a transient point.
Declaration
public const int ExportTransient = 2
Field Value
| Type | Description |
|---|---|
| int |
Properties
Statistics
Gets the statistics.
Declaration
public TimeSimulationStatistics Statistics { get; }
Property Value
| Type | Description |
|---|---|
| TimeSimulationStatistics | The statistics. |
Time
Gets the current time point.
Declaration
public double Time { get; }
Property Value
| Type | Description |
|---|---|
| double |
TimeParameters
Gets the time parameters.
Declaration
public TimeParameters TimeParameters { get; }
Property Value
| Type | Description |
|---|---|
| TimeParameters | The time parameters. |
Methods
Accept()
Accepts the current simulation state as a valid timepoint.
Declaration
protected void Accept()
CreateBehaviors(IEntityCollection)
Creates all behaviors for the simulation.
Declaration
protected override void CreateBehaviors(IEntityCollection entities)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityCollection | entities | The entities. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
CreateStates()
Creates all the simulation states for the simulation.
Declaration
protected override void CreateStates()
Overrides
Execute(int)
Executes the simulation.
Declaration
protected override IEnumerable<int> Execute(int mask = 65535)
Parameters
| Type | Name | Description |
|---|---|---|
| int | mask | A bit mask for simulation export identifiers. |
Returns
| Type | Description |
|---|---|
| IEnumerable<int> |
Overrides
Exceptions
| Type | Condition |
|---|---|
| SpiceSharpException | Thrown if the simulation can't continue. |
InitializeStates()
Initializes all transient behaviors to assume that the current solution is the DC solution.
Declaration
protected virtual void InitializeStates()
LoadInitialConditions(object, LoadStateEventArgs)
Applies initial conditions.
Declaration
protected void LoadInitialConditions(object sender, LoadStateEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | Sender |
| LoadStateEventArgs | e | Arguments |
Probe()
Probe for a new time point.
Declaration
protected void Probe()
TimeIterate(int)
Iterates to a solution for time simulations.
Declaration
protected bool TimeIterate(int maxIterations)
Parameters
| Type | Name | Description |
|---|---|---|
| int | maxIterations | The maximum number of iterations. |
Returns
| Type | Description |
|---|---|
| bool |
|
Validate(IEntityCollection)
Validates the input.
Declaration
protected override void Validate(IEntityCollection entities)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityCollection | entities | The entities. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
| ValidationFailedException | Thrown if the validation failed. |