Class Resistor

java.lang.Object
org.episteme.natural.physics.classical.waves.electromagnetism.circuit.CircuitElement
org.episteme.natural.physics.classical.waves.electromagnetism.components.Resistor
All Implemented Interfaces:
CircuitComponent

public class Resistor extends CircuitElement implements CircuitComponent
Represents an ideal Resistor.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • Resistor

      public Resistor(double resistanceOhms)
    • Resistor

      public Resistor(Real resistance)
  • Method Details

    • getCurrent

      public Real getCurrent(Real voltage, Real dt)
      Description copied from interface: CircuitComponent
      Calculates the current flowing through the component given the voltage across it.
      Specified by:
      getCurrent in interface CircuitComponent
      Parameters:
      voltage - Voltage across the component (Volts)
      dt - Time step (Seconds) - used for dynamic components
      Returns:
      Current (Amperes)
    • getResistance

      public Real getResistance()
    • stamp

      public void stamp()
      Description copied from class: CircuitElement
      Stamps the element's contribution into the circuit matrix. This is called once during circuit analysis to build the MNA matrix. Linear elements stamp constant coefficients; nonlinear elements stamp initial guesses that will be updated in CircuitElement.doStep().
      Specified by:
      stamp in class CircuitElement
    • calculateCurrent

      public void calculateCurrent()
      Description copied from class: CircuitElement
      Calculates the current through this element. Called after node voltages are updated.
      Overrides:
      calculateCurrent in class CircuitElement