TwoPin ​
A base model for two-terminal electrical components, defining voltage relationship.
This partial component serves as a foundational building block for creating various two-pin electrical devices. It establishes a common interface with a positive pin (p) and a negative pin (n). The voltage across the component (v) is defined as the potential difference between these pins:
Usage ​
ElectricalComponents.TwoPin()
Connectors ​
p- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)n- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)
Variables ​
| Name | Description | Units |
|---|---|---|
v | Voltage across the component (between pin p and pin n). | V |
Source ​
dyad
"""
A base model for two-terminal electrical components, defining voltage relationship.
This partial component serves as a foundational building block for creating various two-pin electrical devices.
It establishes a common interface with a positive pin (`p`) and a negative pin (`n`).
The voltage across the component (`v`) is defined as the potential difference between these pins:math v = p.v - n.v
"""
partial component TwoPin
"Positive electrical pin."
p = Pin() {
"Dyad": {
"placement": {"icon": {"iconName": "pos", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
}
}
"Negative electrical pin."
n = Pin() {
"Dyad": {
"placement": {"icon": {"iconName": "neg", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
}
}
"Voltage across the component (between pin p and pin n)."
variable v::Voltage
relations
v = p.v - n.v
endFlattened Source
dyad
"""
A base model for two-terminal electrical components, defining voltage relationship.
This partial component serves as a foundational building block for creating various two-pin electrical devices.
It establishes a common interface with a positive pin (`p`) and a negative pin (`n`).
The voltage across the component (`v`) is defined as the potential difference between these pins:math v = p.v - n.v
"""
partial component TwoPin
"Positive electrical pin."
p = Pin() {
"Dyad": {
"placement": {"icon": {"iconName": "pos", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
}
}
"Negative electrical pin."
n = Pin() {
"Dyad": {
"placement": {"icon": {"iconName": "neg", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
}
}
"Voltage across the component (between pin p and pin n)."
variable v::Voltage
relations
v = p.v - n.v
metadata {}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses