Esempio n. 1
0
            public override void ApplyModelValues(ISimulationContext context)
            {
                var Is = DefinitionDevice.Param.SaturationCurrent;
                var Vt = DefinitionDevice.Param.ThermalVoltage;
                var n  = DefinitionDevice.Param.IdealityCoefficient;

                var Vd = voltage.GetValue();

                // calculates current through the diode and it's derivative
                DeviceHelpers.PnJunction(Is, Vd, Vt * n, out var Id, out var Geq);
                Current = Id;

                // stamp the equivalent circuit
                var Ieq = Id - Geq * Vd;

                conductanceStamper.Stamp(Geq);
                currentStamper.Stamp(Ieq);
            }
Esempio n. 2
0
 /// <summary>
 ///   Applies device impact on the circuit equation system. If behavior of the device is nonlinear, this method is
 ///   called once every Newton-Raphson iteration.
 /// </summary>
 /// <param name="context">Context of current simulation.</param>
 public override void ApplyModelValues(ISimulationContext context)
 {
     Current = Behavior.GetValue(context.TimePoint);
     stamper.Stamp(Current);
 }