容抗在线计算器和 Python 代码

使用此在线计算器根据电容计算电容器在特定频率下的容抗(Ω)。

另请参见感抗在线计算器和 Python 代码

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
Hz

公式:

$$X_C = \frac{1}{2\pi fC}$$

Python 代码:

首选方法是使用 UliEngineeringUliEngineering.Electronics.Reactance.capacitive_reactance

capacitive_reactance_example.py
from UliEngineering.Electronics.Reactance import *
# 你可以传递类似 "150 pF" 的字符串或类似 150e-12 的值

capacitive_reactance("150 pF", "10 MHz") # returns 106.1032953945969

或获取人类可读的值:

capacitive_reactance_usage.py
from UliEngineering.Electronics.Reactance import *
from UliEngineering.EngineerIO import *

# 计算值作为字符串
xc = auto_format(capacitive_reactance, "150 pF", "10 MHz") # "106 Ω"

# ... 或直接打印
auto_print(capacitive_reactance, "150 pF", "10 MHz") # prints "106 Ω"

如果你不能使用 UliEngineering 并且想手动操作,这里有一个最小示例:

capacitive_reactance_minimal.py
import math
def capacitive_reactance(f, c):
    """计算容抗"""
    return 1./(2*math.pi*f*c)

Check out similar posts by category: Calculators, Electronics, Python