STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
physics_constants.py
Go to the documentation of this file.
1"""Centralized physics constants for combustion and nozzle calculations.
2
3This module consolidates scattered hardcoded constants to enable:
41. Easy validation against literature
52. Config-driven parameter sweeps
63. Consistent values across modules
7
8Constants are organized by category and include physical units and sources.
9"""
10
11# =============================================================================
12# Injection and Propellant Properties
13# =============================================================================
14
15# Typical propellant injection temperature [K]
16# Used as initial guess for temperature profile calculations
17T_INJECTION_GUESS = 400.0 # K, typical propellant temperature at injection
18
19# =============================================================================
20# Temperature Profile Parameters
21# =============================================================================
22
23# Temperature profile exponent for reaction progress
24# alpha < 1 means faster initial heating (empirical)
25TEMPERATURE_PROFILE_ALPHA = 0.7 # dimensionless
26
27# =============================================================================
28# Evaporation Model Parameters (D²-law)
29# =============================================================================
30
31# Default Spalding mass transfer number
32# B = cp_gas * (T∞ - T_s) / L_vap for thermodynamic calculation
33# This default is conservative for low-temperature conditions
34# Typical rocket conditions: B = 2-10
35SPALDING_NUMBER_DEFAULT = 0.2 # dimensionless, conservative default
36
37# LOX penalty constant for effective evaporation constant
38# K_eff = K / (1 + phi)
39LOX_PENALTY_CONSTANT = 3.0 # dimensionless
40
41# Reference diffusivity at 300 K, 1 atm [m²/s]
42DIFFUSIVITY_REFERENCE = 2e-5 # m²/s
43
44# Dynamic viscosity for hot gas [Pa·s]
45HOT_GAS_VISCOSITY = 7e-5 # Pa·s, representative hot-gas value
46
47# =============================================================================
48# Reaction Kinetics Parameters (Arrhenius)
49# =============================================================================
50
51# Pre-exponential factor for hydrocarbon combustion [1/s]
52# Based on hydrocarbon/LOX global kinetics
53# Reference: Westbrook & Dryer, Prog. Energy Combust. Sci., 1984
54ARRHENIUS_A0_HYDROCARBON = 1.0e7 # 1/s
55
56# Activation energy for hydrocarbon combustion [J/mol]
57# Typical range: 60-100 kJ/mol for hydrocarbon oxidation
58ACTIVATION_ENERGY_HYDROCARBON = 80000.0 # J/mol
59
60# Reference reaction time [s]
61# τ_ref for pressure/temperature scaling
62# 5e-5 s = 50 μs typical for high-pressure rocket conditions
63REACTION_TIME_REFERENCE = 5e-5 # s
64
65# Reference conditions for reaction time scaling
66REFERENCE_PRESSURE = 4.0e6 # Pa (4 MPa)
67REFERENCE_TEMPERATURE = 3500.0 # K
68
69# =============================================================================
70# Mixing and Turbulence Parameters
71# =============================================================================
72
73# Recirculation/mixing strength factor
74# Used in mixing time calculation: τ_mix = L²/(β × D)
75MIXING_BETA = 8.0 # dimensionless
76
77# Default turbulence intensity
78TURBULENCE_INTENSITY_DEFAULT = 0.08 # 8%
79
80# Target SMD for good atomization [m]
81TARGET_SMD_DEFAULT = 50e-6 # 50 microns
82
83# =============================================================================
84# Gas Properties
85# =============================================================================
86
87# Universal gas constant [J/(mol·K)]
88R_UNIVERSAL = 8.314462618 # J/(mol·K)
89
90# Universal gas constant [J/(kmol·K)] for per-kmol calculations
91R_UNIVERSAL_KMOL = 8314.462618 # J/(kmol·K)
92
93# Approximate gas specific heat for hot combustion products [J/(kg·K)]
94CP_GAS_APPROX = 1200.0 # J/(kg·K)
95
96# =============================================================================
97# Nozzle Flow Parameters
98# =============================================================================
99
100# Maximum exit Mach number (numerical stability limit, not physics limit)
101# Real rocket nozzles typically have M_exit = 2-5
102# Very high expansion ratio nozzles can exceed M=5
103MACH_EXIT_MAX_NUMERICAL = 20.0 # dimensionless
104
105# Newton-Raphson solver parameters
106MACH_SOLVER_TOLERANCE = 1e-10
107MACH_SOLVER_MAX_ITERATIONS = 50
108
109# =============================================================================
110# Finite-Rate Gasification Model Parameters
111# =============================================================================
112
113# Default Prandtl number for hot combustion gas
114# Used to compute k_g = μ * cp / Pr
115PRANDTL_DEFAULT = 0.8 # dimensionless, typical for hot gas at ~3000K
116
117# Molecular diffusivity reference conditions
118# D_m = D_M_REF * (T / D_M_T_REF)^1.75 * (D_M_P_REF / P)
119D_M_REF = 5e-5 # m²/s at reference T, P
120D_M_T_REF = 1500.0 # K, reference temperature
121D_M_P_REF = 2.5e6 # Pa, reference pressure (2.5 MPa)
122
123# Droplet slip velocity cap
124# Prevents near-field turbulence from smuggling into evaporation efficiency
125U_SLIP_CAP = 50.0 # m/s
126
127# Minimum droplet diameter floor (numerical stability)
128D_MIN_GASIFICATION = 1e-6 # m (1 μm)
129