Skip to content
Ground.md

Ground

Ideal electrical ground connection, providing a zero-voltage reference.

This component establishes a reference potential in an electrical circuit. It defines a node where the voltage is explicitly set to zero. Any part of a circuit connected to this ground component will share this zero-voltage reference. The fundamental relationship defining this component is:

g.v=0

Usage

Ground()

Connectors

Behavior

g.v(t)=0

Source

dyad
# Ideal electrical ground connection, providing a zero-voltage reference.
#
# This component establishes a reference potential in an electrical circuit. It
# defines a node where the voltage is explicitly set to zero. Any part of a
# circuit connected to this ground component will share this zero-voltage
# reference. The fundamental relationship defining this component is:
#
# ```math
# g.v = 0
# ```
component Ground
  # Electrical connection pin.
  g = Pin() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "pos", "x1": 450, "y1": -50, "x2": 550, "y2": 50}}
    }
  }]
relations
  g.v = 0
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ElectricalComponents/Ground.svg"}
  }
}
end
Flattened Source
dyad
# Ideal electrical ground connection, providing a zero-voltage reference.
#
# This component establishes a reference potential in an electrical circuit. It
# defines a node where the voltage is explicitly set to zero. Any part of a
# circuit connected to this ground component will share this zero-voltage
# reference. The fundamental relationship defining this component is:
#
# ```math
# g.v = 0
# ```
component Ground
  # Electrical connection pin.
  g = Pin() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "pos", "x1": 450, "y1": -50, "x2": 550, "y2": 50}}
    }
  }]
relations
  g.v = 0
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ElectricalComponents/Ground.svg"}
  }
}
end


Test Cases

This is setup code, that must be run before each test case.

julia
using ElectricalComponents
using ModelingToolkit, OrdinaryDiffEqDefault
using Plots
using CSV, DataFrames

snapshotsdir = joinpath(dirname(dirname(pathof(ElectricalComponents))), "test", "snapshots")
"/home/actions-runner-10/.julia/packages/ElectricalComponents/bmmPM/test/snapshots"