lcapy.oneport.C
- class lcapy.oneport.C(Cval='C', v0=None, **kwargs)
Bases:
OnePortDefines a simple linear one-port capacitor.
- Parameters:
Cval – Capacitance
v0 – Initial Voltage
- C
TODO: What is this?
- v0
Initial Voltage
- zeroic
Indicates w if initial voltage v0 is zero volts
- Type:
bool
Methods
__init__([Cval, v0])current_equation(v[, kind])Return expression for current through component given applied voltage.
voltage_equation(i[, kind])Return expression for voltage across component given applied current.
Attributes
Indicates the component is a capacitor
- current_equation(v, kind='t')
Return expression for current through component given applied voltage.
- Parameters:
v – Applied voltage
kind (str) –
The chosen representation of the equation.
See
lcapy.super.Superposition.select()for a description of the different representations supported.
- Return type:
Expression for current through the capacitor
Examples
>>> from lcapy import C, t, s >>> C(2).current_equation(5) 2*Derivative(5, t)
- is_capacitor = True
Indicates the component is a capacitor
- Type:
bool
- voltage_equation(i, kind='t')
Return expression for voltage across component given applied current.
- Parameters:
i – Applied current
kind (str) –
The chosen representation of the equation.
See
lcapy.super.Superposition.select()for a description of the different representations supported.
- Return type:
Expression for voltage across the capacitor
Examples
>>> from lcapy import C, t, s >>> C(2).voltage_equation(5) Integral(5, (tau, -oo, t))/2