Class Ground
java.lang.Object
org.episteme.natural.physics.classical.waves.electromagnetism.circuit.CircuitElement
org.episteme.natural.physics.classical.waves.electromagnetism.components.Ground
- All Implemented Interfaces:
CircuitComponent
Represents a ground reference (0V potential).
- 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 TypeMethodDescriptiongetCurrent(Real voltage, Real dt) Calculates the current flowing through the component given the voltage across it.intReturns the number of external terminals (posts) on this element.intReturns the number of independent voltage sources in this element.booleanhasGroundConnection(int n) Returns whether terminal n has a ground connection.voidstamp()Stamps the element's contribution into the circuit matrix.Methods inherited from class CircuitElement
allocNodes, calculateCurrent, doStep, getCircuit, getConnection, getCurrent, getInternalNodeCount, getNode, getPostPosition, getPower, getVoltageDiff, getVoltageSource, nonLinear, reset, setCircuit, setCoordinates, setCurrent, setNode, setNodeVoltage, setVoltageSource, startIteration
-
Constructor Details
-
Ground
public Ground()
-
-
Method Details
-
getPostCount
public int getPostCount()Description copied from class:CircuitElementReturns the number of external terminals (posts) on this element. Most elements have 2 posts. Override for elements with more.- Overrides:
getPostCountin classCircuitElement- Returns:
- Number of external terminals
-
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)
-
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
-
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)
-
hasGroundConnection
public boolean hasGroundConnection(int n) Description copied from class:CircuitElementReturns whether terminal n has a ground connection.- Overrides:
hasGroundConnectionin classCircuitElement- Parameters:
n- Terminal number- Returns:
- true if grounded
-