정의되지 않은 파트를 다공성 매체로 바꾸고 시뮬레이션을 위해 그 특성을 정의합니다.
-
유체 리본에서 다공성 매체 도구를 선택합니다.

-
하나 이상의 정의되지 않은 파트를 다공성 매체로 선택합니다.
-
마이크로 대화 상자에서 다공성 매체의 특성을 정의합니다.
- 옵션:
다공성 매체의 점성 저항과 관성 저항을 아직 모르는 경우 Python 스크립트를 사용하여 계산할 수 있습니다.
-
리본 메뉴에서 을 선택하거나, 키보드에서 fn+F4를 입력합니다.
Python 창이 열립니다.
-
Python 창에서 다음 코드를 입력하여 압력 손실 기반 계산을 실행합니다:
import numpy as np
import matplotlib.pyplot as plt
########## Begin User Inputs ##########
fluid_viscosity = 1.781e-5 # dynamic viscosity of the fluid [N·s/m2]
fluid_density = 1.225 # density of the fluid [kg/m^3]
porous_zone_length = 0.1 # length of the porous zone [m]
# Pressure Vs Velocity Data
velocity = np.array([0.0, 0.1, 0.2, 0.3]) # fluid velocity u [m/s]
pressure_loss = np.array([0.0, 0.01, 0.02, 0.04]) # pressure difference ΔP [N/m2] across the porous zone
########## End User Inputs ##########
# Parabolic curve-fit with ΔP = A * u + B * u^2
coefficients = np.polyfit(velocity, pressure_loss, 2)
B = coefficients[0]
A = coefficients[1]
delta_p_fit = A * velocity + B * velocity**2
plt.scatter(velocity, pressure_loss, color='red', label='data')
plt.plot(velocity, delta_p_fit, label=f'fitting: ΔP = {A:.4f} * u + {B:.4f} * u^2', color='blue')
plt.xlabel('Velocity u [m/s]')
plt.ylabel('Pressure Loss ΔP [Pa]')
plt.title('Pressure Loss vs. Velocity')
plt.legend()
plt.grid(True)
plt.show()
# Limit A to positive value while calculating d
d = max(0, A) / (fluid_viscosity * porous_zone_length)
f = 2 * B / (fluid_density * porous_zone_length)
# Print coefficients
print(f"Curve-fit Coefficients A = {A:.4f}, B = {B:.4f}")
print(f"Viscous Resistance = {d:.6f} 1/m^{2}")
print(f"Inertial Resistance = {f:.6f} 1/m")
그런 다음
fluid_viscosity
,
fluid_density
,
porous_zone_length
,
velocity = np.array
시리즈,
pressure_loss = np.array
시리즈에 대한 자신의 데이터를 대체합니다.
천공 플레이트 기반 계산을 실행하려면 다음 코드를 입력합니다.
import numpy as np
########## Begin User Inputs ##########
# physical parameters of the perforated plate
porosity = 0.8 # porosity, dimensionless, 0 < eps <= 1. Do not use 0.
hole_diameter = 0.003 # circular hole diameter [m]
porous_zone_thickness = 0.025 # thickness of porous zone [m]
########## End User Inputs ##########
K = porosity * hole_diameter * hole_diameter * porous_zone_thickness / (32 * porous_zone_thickness + 15 * hole_diameter)
laminar_flow = True
if (laminar_flow):
# If the flow is laminar
alpha = 3 * (1 - porosity) / (4 * porosity * porosity * porous_zone_thickness)
else:
# If the flow is turbulent
delta_over_D = porous_zone_thickness / hole_diameter
alpha = 9 * (6 * delta_over_D - 5 * delta_over_D * delta_over_D) / (40 * porosity * porosity * porous_zone_thickness)
viscous_resistance = 1 / K
inertial_resistance = 2 * max(0, alpha)
# Print coefficients
print(f"Coefficients K = {K:.8f}, alpha = {alpha:.8f}")
print(f"Viscous Resistance = {viscous_resistance:.6f} 1/m^{2}")
print(f"Inertial Resistance = {inertial_resistance:.6f} 1/m")
그런 다음
porosity
,
hole_diameter
및
porous_zone_thickness
에 대한 자신의 데이터를 대체합니다.
-
Enter 키를 누릅니다.
-
점성 저항과 관성 저항에 대한 결과를 마이크로 대화 상자의 각 필드에 복사합니다.