PySpice: Konstante Spannungsquelle erstellen
English
Deutsch
Dies erstellt eine Spannungsquelle namens V1, deren +-Pin mit dem Knoten n1 und deren --Pin mit GND verbunden ist. Die Spannungsquelle ist auf 5V DC eingestellt.
pyspice_voltage_source.py
source = circuit.VoltageSource('V1', 'n1', circuit.gnd, dc_value=5@u_V)Vollständiges Beispiel:
pyspice_full_example.py
import PySpice.Logging.Logging as Logging
logger = Logging.setup_logging()
from PySpice.Probe.Plot import plot
from PySpice.Spice.Netlist import Circuit
from PySpice.Unit import *
circuit = Circuit("MyCircuit")
source = circuit.VoltageSource('V1', 'n1', circuit.gnd, dc_value=5@u_V)Check out similar posts by category:
Electronics, Python, SPICE
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow