Package org.cha0scollective.wwpg.api
Record Class ElectricalModel.Diode
java.lang.Object
java.lang.Record
org.cha0scollective.wwpg.api.ElectricalModel.Diode
- All Implemented Interfaces:
ElectricalModel
- Enclosing interface:
ElectricalModel
public static record ElectricalModel.Diode(double saturationCurrentAmps, double seriesResistanceOhms, double temperatureCelsius, double idealityFactor)
extends Record
implements ElectricalModel
PG-native silicon PN-junction model, with temperature compensation and series
resistance. Positive node is the anode. This is not an ideal diode or a bare
Shockley equation. API 1.0 does not enable optional avalanche breakdown.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cha0scollective.wwpg.api.ElectricalModel
ElectricalModel.AcVoltageSource, ElectricalModel.Capacitor, ElectricalModel.ControlledCurrentSource, ElectricalModel.ControlledVoltageSource, ElectricalModel.CurrentSource, ElectricalModel.Diode, ElectricalModel.Inductor, ElectricalModel.Resistor, ElectricalModel.Switch, ElectricalModel.Transformer, ElectricalModel.VoltageSource -
Constructor Summary
ConstructorsConstructorDescriptionDiode(double saturationCurrentAmps, double seriesResistanceOhms, double temperatureCelsius, double idealityFactor) Creates an instance of aDioderecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theidealityFactorrecord component.doubleReturns the value of thesaturationCurrentAmpsrecord component.doubleReturns the value of theseriesResistanceOhmsrecord component.doubleReturns the value of thetemperatureCelsiusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Diode
public Diode(double saturationCurrentAmps, double seriesResistanceOhms, double temperatureCelsius, double idealityFactor) Creates an instance of aDioderecord class.- Parameters:
saturationCurrentAmps- the value for thesaturationCurrentAmpsrecord componentseriesResistanceOhms- the value for theseriesResistanceOhmsrecord componenttemperatureCelsius- the value for thetemperatureCelsiusrecord componentidealityFactor- the value for theidealityFactorrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
saturationCurrentAmps
public double saturationCurrentAmps()Returns the value of thesaturationCurrentAmpsrecord component.- Returns:
- the value of the
saturationCurrentAmpsrecord component
-
seriesResistanceOhms
public double seriesResistanceOhms()Returns the value of theseriesResistanceOhmsrecord component.- Returns:
- the value of the
seriesResistanceOhmsrecord component
-
temperatureCelsius
public double temperatureCelsius()Returns the value of thetemperatureCelsiusrecord component.- Returns:
- the value of the
temperatureCelsiusrecord component
-
idealityFactor
public double idealityFactor()Returns the value of theidealityFactorrecord component.- Returns:
- the value of the
idealityFactorrecord component
-