Beispiel #1
0
        /// <summary>
        ///   Notifies model class that DC bias for given timepoint is established (i.e after Newton-Raphson iterations
        ///   converged).
        /// </summary>
        /// <param name="context">Context of current simulation.</param>
        public override void OnDcBiasEstablished(ISimulationContext context)
        {
            base.OnDcBiasEstablished(context);
            ic = capacitorStamper.GetCurrent();
            if (Math.Abs(context.TimeStep) < double.Epsilon)             // set initial condition for the capacitor
            {
                ic = Current;
            }
            vc = Voltage;

            IntegrationMethod.SetState(ic, vc);
            initialConditionCapacitor = false;             // capacitor no longer needs initial condition
        }
Beispiel #2
0
 /// <summary>This method is called each time an equation is solved.</summary>
 /// <param name="context">Context of current simulation.</param>
 public override void OnEquationSolution(ISimulationContext context)
 {
     Current = stamper.GetCurrent();
     Voltage = voltage.GetValue();
 }