Analog.Capacitor
This component extends from OnePort
Usage
TranslatedComponents.Analog.Capacitor(C=1)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
C | Capacitance | F | 1 |
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 drop of the two pins (= p.v - n.v) | V |
i | Current flowing from pin p to pin n | A |
Behavior
Source
dyad
component Capacitor
extends OnePort
# Capacitance
parameter C::Dyad.Capacitance = 1
relations
i = C * der(v)
endFlattened Source
dyad
component Capacitor
p = Pin()
n = Pin()
# Voltage drop of the two pins (= p.v - n.v)
variable v::Dyad.Voltage
# Current flowing from pin p to pin n
variable i::Dyad.Current
# Capacitance
parameter C::Dyad.Capacitance = 1
relations
v = p.v - n.v
0 = p.i + n.i
i = p.i
i = C * der(v)
metadata {}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses