원클릭으로
engineering-context-init
Initialize engineering session with standard constants, units, and imports
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Initialize engineering session with standard constants, units, and imports
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | engineering-context-init |
| description | Initialize engineering session with standard constants, units, and imports |
| category | helpers |
| domain | general |
| complexity | basic |
| dependencies | ["numpy","pint","scipy","matplotlib"] |
Standardize engineering sessions with a consistent environment that includes:
This helper eliminates the need to repeatedly set up the same environment at the start of each engineering session, ensuring consistency and saving time.
Simply run the initialization script at the start of your session:
exec(open('init-script.py').read())
Or copy-paste the contents of init-script.py directly into your Python session.
# After running init-script.py
from pint import UnitRegistry
ureg = UnitRegistry()
# Define a pressure with units
pressure = 500 * ureg.kPa
print(f"Pressure: {pressure}")
print(f"Pressure in psi: {pressure.to('psi')}")
# Calculate ideal gas properties
T = 300 * ureg.kelvin
V = 2 * ureg.m**3
n = (pressure * V / (R * T)).to('mol')
print(f"Moles of gas: {n:.2f}")
# After running init-script.py
# Calculate density at altitude using standard constants
altitude = 5000 # meters
T = T_std - 0.0065 * altitude # Temperature lapse rate
P = P_atm * (T / T_std) ** (g / (0.0065 * R_air))
rho = P / (R_air * T)
print(f"At {altitude}m altitude:")
print(f"Temperature: {T:.2f} K ({T-273.15:.2f} °C)")
print(f"Pressure: {P:.2f} Pa ({P/1000:.2f} kPa)")
print(f"Density: {rho:.4f} kg/m³")
# After running init-script.py
# Reynolds number calculation
velocity = 50 # m/s
length = 2 # m characteristic length
Re = velocity * length / nu_air_std
print(f"Reynolds number: {Re:.2e}")
if Re > 5e5:
print("Flow is turbulent")
else:
print("Flow is laminar")
# After running init-script.py
import numpy as np
import matplotlib.pyplot as plt
# The plotting style is already configured
x = np.linspace(0, 2*np.pi, 100)
y = np.sin(x)
plt.figure()
plt.plot(x, y, linewidth=2)
plt.xlabel('x [rad]')
plt.ylabel('sin(x)')
plt.title('Example Plot with Pre-configured Style')
plt.show()
# After running init-script.py
# Power calculation with unit conversions
force = 1000 * ureg.N
velocity = 30 * ureg.m / ureg.s
power = (force * velocity).to('kW')
print(f"Power: {power}")
print(f"Power in hp: {power.to('hp'):.2f}")
print(f"Power in BTU/hr: {power.to('BTU/hr'):.2f}")
ureg for unit-aware calculationsYou can modify init-script.py to:
Query vapor pressures and NPSH requirements for cavitation assessment
Query thermodynamic properties for 100+ fluids from CoolProp database
Query loss coefficients for pipes, valves, fittings in pump systems
Query fluid viscosities, densities, and material properties vs temperature
Access atmospheric properties and aerospace fluid data from NASA Earthdata
Query high-accuracy thermodynamic properties from NIST REFPROP database (commercial)