Python: RC-Zeitkonstante mit UliEngineering berechnen

Die RC-Zeitkonstante eines Widerstand-Kondensator-Netzwerks lässt sich mit der UliEngineering-Python-Bibliothek einfach berechnen:

TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button.
Ω ⚠
F ⚠
rc_time_constant.py
from UliEngineering.Electronics.Capacitors import *
from UliEngineering.EngineerIO import *

# Zeitkonstante eines 10k-Widerstands und eines 100uF-Kondensators berechnen
tau = capacitor_rc_time_constant(
    capacitance="100uF", resistance="10kΩ"
)

# Ergebnis automatisch formatieren und ausgeben
print(f"Time constant: {format_value(tau, 's')}")

Beispielausgabe

rc_time_constant_output.txt
Time constant: 1000 ms

Ähnliche Beiträge nach Kategorie: Rechner Elektronik Python