Class Inductor
java.lang.Object
org.episteme.natural.physics.classical.waves.electromagnetism.circuit.CircuitElement
org.episteme.natural.physics.classical.waves.electromagnetism.components.Inductor
- All Implemented Interfaces:
CircuitComponent
Represents an ideal Inductor.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
Fields inherited from class CircuitElement
circuit, current, nodes, volts, voltSource, x, x2, y, y2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalculates the current through this element.voiddoStep()Performs one simulation step for this element.getCurrent(Real voltage, Real dt) Calculates the current flowing through the component given the voltage across it.intReturns the number of independent voltage sources in this element.voidreset()Resets the element to initial state.voidstamp()Stamps the element's contribution into the circuit matrix.voidCalled at the start of each simulation iteration.Methods inherited from class CircuitElement
allocNodes, getCircuit, getConnection, getCurrent, getInternalNodeCount, getNode, getPostCount, getPostPosition, getPower, getVoltageDiff, getVoltageSource, hasGroundConnection, nonLinear, setCircuit, setCoordinates, setCurrent, setNode, setNodeVoltage, setVoltageSource
-
Constructor Details
-
Inductor
public Inductor(double inductanceHenries) -
Inductor
-
-
Method Details
-
getCurrent
Description copied from interface:CircuitComponentCalculates the current flowing through the component given the voltage across it.- Specified by:
getCurrentin interfaceCircuitComponent- Parameters:
voltage- Voltage across the component (Volts)dt- Time step (Seconds) - used for dynamic components- Returns:
- Current (Amperes)
-
getInductance
-
reset
public void reset()Description copied from class:CircuitElementResets the element to initial state.- Overrides:
resetin classCircuitElement
-
startIteration
public void startIteration()Description copied from class:CircuitElementCalled at the start of each simulation iteration. Used for time-dependent elements to update their state.- Overrides:
startIterationin classCircuitElement
-
stamp
public void stamp()Description copied from class:CircuitElementStamps 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 inCircuitElement.doStep().- Specified by:
stampin classCircuitElement
-
doStep
public void doStep()Description copied from class:CircuitElementPerforms one simulation step for this element. Called during each iteration of the solver. Nonlinear elements update their matrix contributions here.- Overrides:
doStepin classCircuitElement
-
calculateCurrent
public void calculateCurrent()Description copied from class:CircuitElementCalculates the current through this element. Called after node voltages are updated.- Overrides:
calculateCurrentin classCircuitElement
-
getVoltageSourceCount
public int getVoltageSourceCount()Description copied from class:CircuitElementReturns the number of independent voltage sources in this element. Used for voltage sources and elements that model voltage sources.- Overrides:
getVoltageSourceCountin classCircuitElement- Returns:
- Number of voltage sources (default 0)
-