STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
engine.core.chamber_profiles Namespace Reference

Functions

Dict[str, Any] calculate_chamber_pressure_profile (float Pc, float Lstar, float mdot_total, float gamma, float R, float Tc, float A_throat, int n_points=20, Optional[float] chamber_diameter=None, Optional[float] volume=None)
Dict[str, Any] calculate_chamber_intrinsics (float Pc, float Tc, float mdot_total, float gamma, float R, float V_chamber, float A_throat, float Lstar, float MR, Optional[float] P_back=None, Optional[float] A_chamber=None)
Dict[str, Any] calculate_ablative_geometry_profile (float L_chamber, float D_chamber_initial, AblativeCoolingConfig ablative_config, float recession_thickness_chamber=0.0, int n_points=50)
Dict[str, float] calculate_graphite_geometry (float D_throat_initial, GraphiteInsertConfig graphite_config, float recession_thickness_graphite=0.0)
Dict[str, Any] calculate_complete_chamber_geometry (float V_chamber, float A_throat, float L_chamber, float D_chamber_initial, float D_throat_initial, Optional[AblativeCoolingConfig] ablative_config=None, Optional[GraphiteInsertConfig] graphite_config=None, Optional[StainlessSteelCaseConfig] stainless_config=None, float recession_chamber=0.0, float recession_graphite=0.0, int n_points=50)
None visualize_chamber_cross_section (Dict[str, Any] geometry, Optional[Dict[str, Any]] pressure_profile=None, Optional[str] save_path=None, bool show_plot=True)

Detailed Description

Chamber pressure and temperature profiles along length with ablative and graphite visualization.

This module provides:
1. Chamber pressure and temperature profiles
2. Ablative liner geometry (phenolic) with recession
3. Graphite insert geometry with recession
4. Stainless steel case geometry
5. Complete chamber cross-section visualization

Function Documentation

◆ calculate_ablative_geometry_profile()

Dict[str, Any] engine.core.chamber_profiles.calculate_ablative_geometry_profile ( float L_chamber,
float D_chamber_initial,
AblativeCoolingConfig ablative_config,
float recession_thickness_chamber = 0.0,
int n_points = 50 )
Calculate ablative liner geometry profile along chamber length.

Parameters:
-----------
L_chamber : float
    Chamber length [m]
D_chamber_initial : float
    Initial chamber inner diameter [m] (before ablative)
ablative_config : AblativeCoolingConfig
    Ablative configuration
recession_thickness_chamber : float
    Cumulative recession thickness [m] (default: 0.0)
n_points : int
    Number of points along chamber (default: 50)

Returns:
--------
profile : dict
    - positions: Array of positions along chamber [m]
    - D_chamber_inner: Inner diameter (gas side) [m]
    - D_ablative_outer: Outer diameter (ablative surface) [m]
    - ablative_thickness: Ablative thickness at each position [m]
    - recession: Recession at each position [m]

Definition at line 309 of file chamber_profiles.py.

References max.

◆ calculate_chamber_intrinsics()

Dict[str, Any] engine.core.chamber_profiles.calculate_chamber_intrinsics ( float Pc,
float Tc,
float mdot_total,
float gamma,
float R,
float V_chamber,
float A_throat,
float Lstar,
float MR,
Optional[float] P_back = None,
Optional[float] A_chamber = None )
Calculate chamber intrinsic properties.

Parameters:
-----------
Pc : float
    Chamber pressure [Pa]
Tc : float
    Chamber temperature [K]
mdot_total : float
    Total mass flow [kg/s]
gamma : float
    Specific heat ratio
R : float
    Gas constant [J/(kg·K)]
V_chamber : float
    Chamber volume [m³]
A_throat : float
    Throat area [m²]
Lstar : float
    Characteristic length [m]
MR : float
    Mixture ratio
P_back : float, optional
    Back pressure [Pa] (ambient pressure). If None, uses 0.9 * 101325 Pa as fallback.
    Used to verify flow is choked at throat.

Returns:
--------
intrinsics : dict
    - Lstar: Characteristic length [m]
    - residence_time: Gas residence time [s]
    - velocity_mean: Mean gas velocity [m/s]
    - velocity_throat: Velocity at throat (sonic) [m/s]
    - density: Chamber gas density [kg/m³]
    - sound_speed: Sound speed in chamber [m/s]
    - mach_number: Mean Mach number
    - reynolds_number: Reynolds number

Definition at line 77 of file chamber_profiles.py.

References max, and min.

◆ calculate_chamber_pressure_profile()

Dict[str, Any] engine.core.chamber_profiles.calculate_chamber_pressure_profile ( float Pc,
float Lstar,
float mdot_total,
float gamma,
float R,
float Tc,
float A_throat,
int n_points = 20,
Optional[float] chamber_diameter = None,
Optional[float] volume = None )
Static pressure from the injector face to the throat, quasi-one-dimensional.

Pc is the injector-end pressure (u ~ 0 there). Constant-area heat addition carries the
flow to the chamber-end Mach number M_c with p + rho u^2 conserved, so the combustor-end
static pressure is Pc / (1 + gamma M_c^2); the nozzle stagnation pressure is Pc / kappa
(Rayleigh, engine.core.nozzle.nozzle_stagnation_loss) and the convergent is isentropic
from it. How the heat is released along the barrel is not modelled, so the barrel is
given at its two ends only. Without ``chamber_diameter`` the chamber is infinite-area
(kappa = 1) and only the face and throat are returned.

positions are distances from the injector face [m].

Definition at line 17 of file chamber_profiles.py.

References max.

◆ calculate_complete_chamber_geometry()

Dict[str, Any] engine.core.chamber_profiles.calculate_complete_chamber_geometry ( float V_chamber,
float A_throat,
float L_chamber,
float D_chamber_initial,
float D_throat_initial,
Optional[AblativeCoolingConfig] ablative_config = None,
Optional[GraphiteInsertConfig] graphite_config = None,
Optional[StainlessSteelCaseConfig] stainless_config = None,
float recession_chamber = 0.0,
float recession_graphite = 0.0,
int n_points = 50 )
Calculate complete chamber geometry including ablative, graphite, and stainless steel.

This provides a comprehensive view of the multi-layer wall structure:
- Hot gas → Phenolic ablator → Stainless steel case (chamber)
- Hot gas → Graphite insert → Stainless steel case (throat)

Parameters:
-----------
V_chamber : float
    Current chamber volume [m³]
A_throat : float
    Current throat area [m²]
L_chamber : float
    Chamber length [m]
D_chamber_initial : float
    Initial chamber inner diameter [m]
D_throat_initial : float
    Initial throat diameter [m]
ablative_config : AblativeCoolingConfig, optional
    Ablative configuration
graphite_config : GraphiteInsertConfig, optional
    Graphite configuration
stainless_config : StainlessSteelCaseConfig, optional
    Stainless steel case configuration
recession_chamber : float
    Cumulative ablative recession [m]
recession_graphite : float
    Cumulative graphite recession [m]
n_points : int
    Number of points along chamber (default: 50)

Returns:
--------
geometry : dict
    Complete geometry profile including:
    - positions: Array of positions [m]
    - D_gas_chamber: Gas-side diameter (chamber) [m]
    - D_ablative_outer: Ablative outer diameter [m]
    - D_stainless_outer: Stainless steel outer diameter [m]
    - D_throat_current: Current throat diameter [m]
    - D_graphite_outer: Graphite outer diameter [m]
    - ablative_thickness: Ablative thickness [m]
    - graphite_thickness: Graphite thickness [m]
    - stainless_thickness: Stainless steel thickness [m]

Definition at line 441 of file chamber_profiles.py.

References calculate_graphite_geometry(), and max.

◆ calculate_graphite_geometry()

Dict[str, float] engine.core.chamber_profiles.calculate_graphite_geometry ( float D_throat_initial,
GraphiteInsertConfig graphite_config,
float recession_thickness_graphite = 0.0 )
Calculate graphite insert geometry at throat.

Parameters:
-----------
D_throat_initial : float
    Initial throat diameter [m] (defined by graphite insert)
graphite_config : GraphiteInsertConfig
    Graphite configuration
recession_thickness_graphite : float
    Cumulative graphite recession [m] (default: 0.0)

Returns:
--------
geometry : dict
    - D_throat_current: Current throat diameter [m] (grows with recession)
    - D_graphite_outer: Outer diameter of graphite insert [m]
    - graphite_thickness_remaining: Remaining graphite thickness [m]
    - graphite_thickness_initial: Initial graphite thickness [m]
    - recession: Total recession [m]

Definition at line 381 of file chamber_profiles.py.

References max.

Referenced by calculate_complete_chamber_geometry().

◆ visualize_chamber_cross_section()

None engine.core.chamber_profiles.visualize_chamber_cross_section ( Dict[str, Any] geometry,
Optional[Dict[str, Any]] pressure_profile = None,
Optional[str] save_path = None,
bool show_plot = True )
Visualize complete chamber cross-section with ablative, graphite, and stainless steel.

Creates a 2D cross-sectional view showing:
- Chamber wall layers (ablative → stainless)
- Throat region (graphite → stainless)
- Pressure profile overlay (optional)

Parameters:
-----------
geometry : dict
    Complete geometry from calculate_complete_chamber_geometry
pressure_profile : dict, optional
    Pressure profile from calculate_chamber_pressure_profile
save_path : str, optional
    Path to save figure (default: None, don't save)
show_plot : bool
    Whether to display plot (default: True)

Definition at line 561 of file chamber_profiles.py.

References max.