Analog.IdealOpAmp
Usage
TranslatedComponents.Analog.IdealOpAmp()
Connectors
p1- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)n1- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)p2- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)n2- This connector represents an electrical pin with voltage and current as the potential and flow variables, respectively. (Pin)
Variables
| Name | Description | Units |
|---|---|---|
v1 | Voltage drop over the left port | V |
v2 | Voltage drop over the right port | V |
i1 | Current flowing from pos. to neg. pin of the left port | A |
i2 | Current flowing from pos. to neg. pin of the right port | A |
Behavior
Source
dyad
component IdealOpAmp
p1 = Pin()
n1 = Pin()
p2 = Pin()
n2 = Pin()
# Voltage drop over the left port
variable v1::Dyad.Voltage
# Voltage drop over the right port
variable v2::Dyad.Voltage
# Current flowing from pos. to neg. pin of the left port
variable i1::Dyad.Current
# Current flowing from pos. to neg. pin of the right port
variable i2::Dyad.Current
relations
v1 = p1.v - n1.v
v2 = p2.v - n2.v
0 = p1.i + n1.i
0 = p2.i + n2.i
i1 = p1.i
i2 = p2.i
v1 = 0
i1 = 0
endFlattened Source
dyad
component IdealOpAmp
p1 = Pin()
n1 = Pin()
p2 = Pin()
n2 = Pin()
# Voltage drop over the left port
variable v1::Dyad.Voltage
# Voltage drop over the right port
variable v2::Dyad.Voltage
# Current flowing from pos. to neg. pin of the left port
variable i1::Dyad.Current
# Current flowing from pos. to neg. pin of the right port
variable i2::Dyad.Current
relations
v1 = p1.v - n1.v
v2 = p2.v - n2.v
0 = p1.i + n1.i
0 = p2.i + n2.i
i1 = p1.i
i2 = p2.i
v1 = 0
i1 = 0
metadata {}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses