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

Functions

float total_wall_thickness_m (Any config)
Dict[str, Any] extract_all_parameters (PintleEngineConfig config)
float impinging_chamber_inner_diameter_for_bounds (PintleEngineConfig config, *, float max_chamber_outer_diameter_m, float wall_thickness_m=DEFAULT_IMPINGING_WALL_THICKNESS_M)
int impinging_n_elements_hi_int (float chamber_inner_diameter_m, *, float pitch_est_m=IMPINGING_JET_PITCH_ESTIMATE_M, int absolute_cap=IMPINGING_N_ELEMENTS_ABSOLUTE_CAP)
float impinging_d_jet_upper_bound_m (float chamber_inner_diameter_m)
float impinging_spacing_upper_bound_m (float chamber_inner_diameter_m)

Variables

float DEFAULT_IMPINGING_WALL_THICKNESS_M = 0.0254
float IMPINGING_JET_PITCH_ESTIMATE_M = 0.004
int IMPINGING_N_ELEMENTS_ABSOLUTE_CAP = 200

Detailed Description

Utility functions for optimization layers.

Contains parameter extraction and other helper utilities.

Function Documentation

◆ extract_all_parameters()

Dict[str, Any] engine.optimizer.utils.extract_all_parameters ( PintleEngineConfig config)
Extract all optimized parameters from config.

Definition at line 57 of file utils.py.

References min.

◆ impinging_chamber_inner_diameter_for_bounds()

float engine.optimizer.utils.impinging_chamber_inner_diameter_for_bounds ( PintleEngineConfig config,
* ,
float max_chamber_outer_diameter_m,
float wall_thickness_m = DEFAULT_IMPINGING_WALL_THICKNESS_M )
Bore used for impinging packing / n_elements limits.

Prefer ``chamber_geometry.chamber_diameter``; else frozen outer diameter minus wall;
else legacy heuristic ``0.5 * max_od - wall`` (underestimates full-OD designs).

Definition at line 149 of file utils.py.

References max.

◆ impinging_d_jet_upper_bound_m()

float engine.optimizer.utils.impinging_d_jet_upper_bound_m ( float chamber_inner_diameter_m)
Allow larger jets on larger bores; keep 4 mm floor for small chambers.

Definition at line 189 of file utils.py.

References max, and min.

◆ impinging_n_elements_hi_int()

int engine.optimizer.utils.impinging_n_elements_hi_int ( float chamber_inner_diameter_m,
* ,
float pitch_est_m = IMPINGING_JET_PITCH_ESTIMATE_M,
int absolute_cap = IMPINGING_N_ELEMENTS_ABSOLUTE_CAP )
Upper integer count ~ circumference / pitch, capped for optimizer stability.

Definition at line 176 of file utils.py.

References max, and min.

◆ impinging_spacing_upper_bound_m()

float engine.optimizer.utils.impinging_spacing_upper_bound_m ( float chamber_inner_diameter_m)
Wider spacing cap for large injector faces (packing uses π D²/4).

Definition at line 195 of file utils.py.

References max, and min.

◆ total_wall_thickness_m()

float engine.optimizer.utils.total_wall_thickness_m ( Any config)
Total chamber-wall thickness (both sides) subtracted from the max OD to get
the gas-side inner diameter: ``2 x (metal case + ablative liner)``.

Derived from its physical parts instead of stored as a separate lump field:
  * metal — ``design_requirements.metal_wall_thickness_per_side_m`` (geometry
    envelope for the structural case; default 0.25 in/side), and
  * liner — ``ablative_cooling.initial_thickness`` when ablative cooling is
    enabled (the same field Layer 3 sizes, so the wall tracks the sized liner
    on reruns automatically — no write-back step to lose the metal term).

The graphite insert is a THROAT insert (axial), not part of the chamber-barrel
radial stack, so it does not contribute. Film/regen cooling contribute no liner
thickness here (channel geometry is not modeled as barrel thickness).

Falls back to the legacy 1-inch total (``DEFAULT_IMPINGING_WALL_THICKNESS_M``)
only when the config lacks the fields (mocks / legacy config objects).

Definition at line 19 of file utils.py.

Variable Documentation

◆ DEFAULT_IMPINGING_WALL_THICKNESS_M

float engine.optimizer.utils.DEFAULT_IMPINGING_WALL_THICKNESS_M = 0.0254

Definition at line 14 of file utils.py.

◆ IMPINGING_JET_PITCH_ESTIMATE_M

float engine.optimizer.utils.IMPINGING_JET_PITCH_ESTIMATE_M = 0.004

Definition at line 15 of file utils.py.

◆ IMPINGING_N_ELEMENTS_ABSOLUTE_CAP

int engine.optimizer.utils.IMPINGING_N_ELEMENTS_ABSOLUTE_CAP = 200

Definition at line 16 of file utils.py.