tidy3d.DCVoltageSource#
- class DCVoltageSource[source]#
Bases:
Tidy3dBaseModelDC voltage source in volts.
- Parameters:
attrs (dict = {}) β Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields,
attrsare mutable. For example, the following is allowed for setting anattrobj.attrs['foo'] = bar. Also note that Tidy3D` will raise aTypeErrorifattrscontain objects that can not be serialized. One can check ifattrsare serializable by callingobj.json().name (Optional[str] = None) β voltage : ArrayLike[dtype=float, ndim=1] [units = V]. DC voltage usually used as source in βVoltageBCβ boundary conditions.
units (Literal['V'] = V)
Notes
This voltage refers to potential above the equivalent simulation ground. Currently, electrical ports are not defined.
Examples
>>> import tidy3d as td >>> voltages = [-0.5, 0, 1, 2, 3, 4] >>> voltage_source = td.DCVoltageSource(voltage=voltages)
Attributes
Methods
check_voltage(val)Inherited Common Usage
- name#
- voltage#
- units#
- __hash__()#
Hash method.