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

Classes

class  LdBand
class  BackEntry

Functions

Optional[float] _opt_float (Mapping[str, Any] req, str key)
bool _opt_bool (Mapping[str, Any] req, str key, bool default)
LdBand impingement_ld_band (Optional[Mapping[str, Any]] requirements)
float _half_major (float d, float theta_deg)
Any _get (Any m, str key)
float _f (Any v, float default=0.0)
Dict[str, float] _stream (Any raw)
Optional[Dict[str, Any]] _plain (Any m)
Dict[str, Any] _req_dict (Any cfg)
float _tan (float th)
float _sin (float th)
float _cos (float th)
Dict[str, Any] assembly_envelope (Any cfg)
float exit_recess (*, float d_in, float th_in, float d_out, float th_out, float exit_land)
Tuple[float, float] ring_face_reach (*, bool contoured, float r_in, float d_in, float th_in, float r_out, float d_out, float th_out, float exit_land=EXIT_LAND_DEFAULT)
Dict[str, Any] face_geometry (*, bool contoured, float r_in, float r_out, float d_in, float d_out, float th_in, float th_out, float exit_land=EXIT_LAND_DEFAULT, str groove_bottom="flat")
float face_z_at (List[Tuple[float, float]] profile, float r)
BackEntry passage_back_entry (*, float r_face, float d, float theta_deg, float plate_thickness, float counterbore_dia, float land_ld, bool is_inner, int n, float exit_depth=0.0)
Dict[str, Any] channel_for_ring (*, float r_exit, float z_exit, float d, float theta_deg, bool is_inner, float plate_thickness, float passage_ld, Optional[float] width, str floor="flat", float exit_land=EXIT_LAND_DEFAULT, Optional[float] spot_length=None)
Tuple[float, float, float] _poly_area_centroid_r (List[Tuple[float, float]] ps)
Dict[str, Any] _spot_channel (*, float r_exit, float z_exit, float d, float theta_deg, float k, float t, float lam_want, Optional[float] width, float exit_land, float spot)
Dict[str, float] channel_velocity_head (*, float flow_area, float mdot, float rho, float dp, int inlets=1, float q_frac=MANIFOLD_Q_FRAC)
Dict[str, float] channel_lands (*, Dict[str, Any] ch_in, Dict[str, Any] ch_out, float r_centre_hole, float r_plate)
Optional[Dict[str, Any]] igniter_keepouts (Optional[Mapping[str, Any]] igniter, *, float plate_thickness, float min_web)
List[Tuple[float, float]] _fillet (Tuple[float, float] a, Tuple[float, float] P, Tuple[float, float] b, float rho, int n=6)
List[Tuple[float, float]] _rounded (List[Tuple[float, float]] ps, List[float] radii)
Dict[str, Any] plate_profile (Mapping[str, Any] out, Mapping[str, Any] plate, *, bool with_port=True)
Optional[Dict[str, Any]] feed_ports (Mapping[str, Any] out, Mapping[str, Any] plate)
None _check_back_features (Dict[str, Any] out)
Dict[str, Any] realized_land (*, float d, float theta_deg, float plate_thickness, float counterbore_dia, Optional[float] declared_land_ld)
Dict[str, Any] _plate_block (Any cfg)
Any effective_discharge (Any engine_config, str side)
Any _discharge_as_built (Any dc, Mapping[str, Any] passage)
None _check_inlet_fit (Dict[str, Any] out)
None _report_cd (Any cfg, Dict[str, Any] out)
Optional[Dict[str, Any]] layout_inputs_from_config (Any cfg)
Dict[str, Any] compute_layout (*, Mapping[str, float] oxidizer, Mapping[str, float] fuel, float bore_diameter, Optional[Mapping[str, Any]] envelope=None, bool fuel_outboard=True, float center_clear_dia=0.0, float min_web=0.0, float wall_clearance=0.0, float ld_min=IMPINGEMENT_LD_TARGET_DEFAULT, float ld_max=IMPINGEMENT_LD_TARGET_DEFAULT, float plate_thickness=0.0127, float counterbore_dia=0.0, float land_ld_O=4.0, Optional[float] land_ld_F=None, float min_back_web=0.0, Optional[Mapping[str, Any]] igniter=None, Optional[Mapping[str, Any]] plate=None, str ld_source_O="declared", str ld_source_F="declared", bool plate_thickness_declared=True)
Dict[str, float] flows_from_result (Mapping[str, Any] result, Any cfg)
None _check_manifold (Any cfg, Dict[str, Any] out, Mapping[str, Any] flows)
float _discharge_r_over_d (Any cfg, str side)
None _check_cavitation (Any cfg, Dict[str, Any] out, Mapping[str, Any] flows)
Tuple[Any, Any] plate_bending_moments (Any r, *, float a, float b, float p, float nu, str support="simply_supported", float r_hole=0.0)
None _check_plate (Any cfg, Dict[str, Any] out, Optional[Mapping[str, Any]] flows)
Dict[str, Any] _drawing (Mapping[str, Any] plate)
None _apply_drawing (Any cfg, Dict[str, Any] out)
Optional[Dict[str, Any]] layout_from_config (Any cfg, bool drawings=True, Optional[Mapping[str, Any]] flows=None, *, bool checks=True)

Variables

float IMPINGEMENT_LD_TARGET_DEFAULT = 4.0
float IMPINGEMENT_LD_TOL_UNDERIVED = 1.0
float _COS_FLOOR = 0.10
float DRILL_LD_PRACTICE_MAX = 10.0
float ORIFICE_LD_MIN = 4.0
float DRILL_ENTRY_MAX_OFF_SQUARE_DEG = 10.0
float FACE_HEATING_INCLUDED_DEG = 90.0
float FREE_JET_MAX_D = 7.0
float CORE_FRAC_WARN = 0.25
float EXIT_LAND_DEFAULT = 0.0005
float PLATE_THICKNESS_DEFAULT = 0.0127
float MANIFOLD_Q_FRAC = 0.05
float PLATE_YIELD_FACTOR = 1.5
float PLATE_POISSON_DEFAULT = 0.3
float PSI = 6894.757
float ATM = 101325.0
float DRAWING_RING_TOL = 0.05e-3
float DRAWING_LD_TOL = 0.02
float DRAWING_PROFILE_TOL = 0.025e-3

Detailed Description

Impinging-injector layout: the one place the injector's geometry is derived.

Layer 1, ``scripts/design_audit.py``, the forward solver and the Geometry tab all read the same
derived quantities from here -- pitch circles, where the jets meet, where each drilled passage
runs and what it breaks into, how much metal is left. Callers do not re-derive them.

The hardware this describes
---------------------------
The injector is a plug that fills the chamber sleeve's bore. Its chamber-side face bears on the
phenolic liner's forward end; the gas sees the face only inside the liner bore.

* **Face.** ``flat``: every orifice leaves an axis-normal face at its jet angle, so the exit is an
  ellipse and the drill enters off square. ``contoured``: the face is turned with an annular
  groove whose two flanks are normal to the two jets (a cone per ring, since every jet lies in a
  radial plane), so each orifice leaves its flank square and round. That groove is a valley: the
  inner ring's jet points outward, so its flank faces outward, and the outer ring's the reverse.
Both default to the plug this stand machines (contoured, channels), also when ``injector.plate``
is not declared; Layer 1 applies their constraints only once the block is declared.

* **Back.** ``plenum``: the passages run straight through to a flat back face (a dome or plate
  manifold behind it). ``channels``: the back face is flat with one annular channel per ring;
  each passage runs from its exit straight to its channel's floor, and the channel is centred on
  where the passage axis meets that floor. That is what "the channels line up" means.

Seals, the manifold cover, the igniter hardware and how the plug is retained are the designer's,
not this module's. It reports the lands those parts would have to fit in; it does not size them.

Coordinates: axisymmetric, ``r`` radial, ``z`` axial with ``z = 0`` the face DATUM (the flat
lands, and the liner's forward end), the chamber toward ``+z`` and the back face at ``z = -t``.

Function Documentation

◆ _apply_drawing()

None engine.core.injectors.layout._apply_drawing ( Any cfg,
Dict[str, Any] out )
protected
Replace the layout's drawn geometry with the plate's revolve sketch
(``injector.plate.profile_dxf``): face groove, passages (exit, length, entry), channel
sections. What the config says that the drawing contradicts -- ring radius, L/d, plug
radius, a centre port -- is flagged ``bad``; the drawing is what gets machined.

Definition at line 1643 of file layout.py.

References _drawing(), _get(), min, and plate_profile().

Referenced by layout_from_config().

◆ _check_back_features()

None engine.core.injectors.layout._check_back_features ( Dict[str, Any] out)
protected

Definition at line 765 of file layout.py.

References max, and min.

Referenced by layout_from_config().

◆ _check_cavitation()

None engine.core.injectors.layout._check_cavitation ( Any cfg,
Dict[str, Any] out,
Mapping[str, Any] flows )
protected
Each orifice's cavitation number against Nurick's (1976) critical value:
``K = (P_inj - P_v) / (P_inj - Pc)`` vs ``K_crit = (Cd / Cc)^2``, with Cc from the inlet's r/d
(engine.core.discharge.cavitation_margin). K below K_crit: the vena contracta reaches vapour
pressure and the Cd (and momentum ratio) the solve used do not hold.

Definition at line 1394 of file layout.py.

References _discharge_r_over_d(), _f(), and _get().

Referenced by layout_from_config().

◆ _check_inlet_fit()

None engine.core.injectors.layout._check_inlet_fit ( Dict[str, Any] out)
protected
A radiused or chamfered inlet takes floor beside the hole: on a flat floor the hole meets
it (90 - theta) on its acute side, where a fillet of radius r runs r / tan((90 - theta)/2)
onto the floor. The channel is sized from the bare hole, so say when the inlet does not fit
and what width would take it.

Definition at line 851 of file layout.py.

Referenced by layout_from_config().

◆ _check_manifold()

None engine.core.injectors.layout._check_manifold ( Any cfg,
Dict[str, Any] out,
Mapping[str, Any] flows )
protected
Channels back: each channel's velocity head at its feed port against the injector drop
(channel_velocity_head), from a solve's ``mdot_O/F`` and ``dp_O/F`` (and ``rho_O/F``, else the
config's fluids). Supersedes the bare area-ratio note. Over ``MANIFOLD_Q_FRAC`` it is 'bad':
the holes by the port are not flowing what the solve assumed, so the solve is not the
hardware.

Definition at line 1343 of file layout.py.

References _f(), _get(), and channel_velocity_head().

Referenced by layout_from_config().

◆ _check_plate()

None engine.core.injectors.layout._check_plate ( Any cfg,
Dict[str, Any] out,
Optional[Mapping[str, Any]] flows )
protected
Bending of the plug under chamber pressure: a circular plate of the plug's radius, Pc
(gauge) over the gas bore, edge support as declared (``injector.plate.support``). Moments
from the solid-plate solution (with the igniter port as a centre hole), divided at every
radius by the section left there (face groove above, channel floor below): the full radial
moment crosses the ligament, ``sigma_r = 6 M_r / t_n^2``, and the hoop stress follows the
curvature the full plate imposes. Stress is Tresca at the surface. Keeping the solid plate's
M_r across a thinned ring is conservative; it is an estimate, not an FEA. Not in this load
case: manifold pressure in the channels and the cover's bolt loads (the designer's).

Definition at line 1495 of file layout.py.

References _f(), _req_dict(), at(), face_z_at(), max, min, and plate_bending_moments().

Referenced by layout_from_config().

◆ _cos()

float engine.core.injectors.layout._cos ( float th)
protected

◆ _discharge_as_built()

Any engine.core.injectors.layout._discharge_as_built ( Any dc,
Mapping[str, Any] passage )
protected
``dc`` with the L/d (and counterbore approach) the plate gives, when it asks for that.

Definition at line 843 of file layout.py.

Referenced by _report_cd(), and effective_discharge().

◆ _discharge_r_over_d()

float engine.core.injectors.layout._discharge_r_over_d ( Any cfg,
str side )
protected
Inlet r/d a discharge block describes (dict or model), via engine.core.discharge.

Definition at line 1383 of file layout.py.

References _get().

Referenced by _check_cavitation().

◆ _drawing()

Dict[str, Any] engine.core.injectors.layout._drawing ( Mapping[str, Any] plate)
protected

Definition at line 1638 of file layout.py.

Referenced by _apply_drawing(), and layout_inputs_from_config().

◆ _f()

float engine.core.injectors.layout._f ( Any v,
float default = 0.0 )
protected

◆ _fillet()

List[Tuple[float, float]] engine.core.injectors.layout._fillet ( Tuple[float, float] a,
Tuple[float, float] P,
Tuple[float, float] b,
float rho,
int n = 6 )
protected
Corner P (coming from a, going to b) rounded to radius rho: the arc's points, P if 0.

Definition at line 623 of file layout.py.

References max, and min.

Referenced by _rounded().

◆ _get()

Any engine.core.injectors.layout._get ( Any m,
str key )
protected

◆ _half_major()

float engine.core.injectors.layout._half_major ( float d,
float theta_deg )
protected
Radial half-extent of an inclined hole's elliptical trace on an axis-normal plane.

Definition at line 171 of file layout.py.

References max.

Referenced by passage_back_entry(), and ring_face_reach().

◆ _opt_bool()

bool engine.core.injectors.layout._opt_bool ( Mapping[str, Any] req,
str key,
bool default )
protected

Definition at line 70 of file layout.py.

Referenced by impingement_ld_band(), and layout_inputs_from_config().

◆ _opt_float()

Optional[float] engine.core.injectors.layout._opt_float ( Mapping[str, Any] req,
str key )
protected

Definition at line 60 of file layout.py.

Referenced by impingement_ld_band(), and layout_inputs_from_config().

◆ _plain()

Optional[Dict[str, Any]] engine.core.injectors.layout._plain ( Any m)
protected
A config sub-block as a plain dict (None stays None).

Definition at line 201 of file layout.py.

Referenced by _plate_block(), _report_cd(), and layout_inputs_from_config().

◆ _plate_block()

Dict[str, Any] engine.core.injectors.layout._plate_block ( Any cfg)
protected

Definition at line 819 of file layout.py.

References _get(), and _plain().

Referenced by layout_inputs_from_config().

◆ _poly_area_centroid_r()

Tuple[float, float, float] engine.core.injectors.layout._poly_area_centroid_r ( List[Tuple[float, float]] ps)
protected
(area, centroid radius, perimeter) of a closed polygon in (r, z).

Definition at line 486 of file layout.py.

Referenced by _spot_channel().

◆ _report_cd()

None engine.core.injectors.layout._report_cd ( Any cfg,
Dict[str, Any] out )
protected
Each hole's high-Re Cd from the discharge model the solver uses, at the L/d it uses, and
what that number is made of -- so a change of hole L/d shows its effect on Cd (and Δp)
where it is made. ``passages[k]["cd"]`` is None without a discharge block.

Definition at line 879 of file layout.py.

References _discharge_as_built(), _get(), and _plain().

Referenced by layout_from_config().

◆ _req_dict()

Dict[str, Any] engine.core.injectors.layout._req_dict ( Any cfg)
protected

Definition at line 212 of file layout.py.

References _get().

Referenced by _check_plate(), assembly_envelope(), and layout_inputs_from_config().

◆ _rounded()

List[Tuple[float, float]] engine.core.injectors.layout._rounded ( List[Tuple[float, float]] ps,
List[float] radii )
protected
An open polyline with its interior corners rounded (radii per interior vertex).

Definition at line 645 of file layout.py.

References _fillet().

Referenced by plate_profile().

◆ _sin()

float engine.core.injectors.layout._sin ( float th)
protected

Definition at line 223 of file layout.py.

Referenced by _spot_channel(), channel_for_ring(), exit_recess(), and face_geometry().

◆ _spot_channel()

Dict[str, Any] engine.core.injectors.layout._spot_channel ( * ,
float r_exit,
float z_exit,
float d,
float theta_deg,
float k,
float t,
float lam_want,
Optional[float] width,
float exit_land,
float spot )
protected
``channel_for_ring`` with ``floor == "spot"``; see there.

Definition at line 498 of file layout.py.

References _cos(), _poly_area_centroid_r(), _sin(), max, and min.

Referenced by channel_for_ring().

◆ _stream()

Dict[str, float] engine.core.injectors.layout._stream ( Any raw)
protected

Definition at line 192 of file layout.py.

References _f(), and _get().

Referenced by layout_inputs_from_config().

◆ _tan()

float engine.core.injectors.layout._tan ( float th)
protected

◆ assembly_envelope()

Dict[str, Any] engine.core.injectors.layout.assembly_envelope ( Any cfg)
Bore, liner and sleeve radii from the engine config.

* gas bore: ``chamber_geometry.chamber_diameter``;
* liner: ``ablative_cooling.initial_thickness`` when ablative cooling is on;
* sleeve: OD from ``frozen_parameters.D_chamber_outer_mm``, else
  ``design_requirements.max_chamber_outer_diameter``; wall from
  ``metal_wall_thickness_per_side_m`` -- the same numbers Layer 1 sizes the bore from.

The injector plug's radius is the sleeve's inner radius. When the sleeve is not declared it
is taken as bore + liner, and ``sleeve_declared`` says so.

Definition at line 235 of file layout.py.

References _f(), _get(), and _req_dict().

Referenced by layout_inputs_from_config().

◆ channel_for_ring()

Dict[str, Any] engine.core.injectors.layout.channel_for_ring ( * ,
float r_exit,
float z_exit,
float d,
float theta_deg,
bool is_inner,
float plate_thickness,
float passage_ld,
Optional[float] width,
str floor = "flat",
float exit_land = EXIT_LAND_DEFAULT,
Optional[float] spot_length = None )
Channels back: the passage from its exit to the channel floor, and the channel around it.

The passage is a straight hole of diameter d along the jet axis, ``passage_ld * d`` long,
running from the exit into the plate: toward the axis for the inner ring, away for the outer.
It ends at ``Q``. The channel floor passes through ``Q`` -- flat (axis-normal), or ``coned``
(normal to the passage, so the hole breaks through square) -- and the channel is centred on
``Q``'s radius. That centring is the alignment: the hole's whole footprint lands on the floor
with ``exit_land`` to each wall.

``spot``: the floor stays flat, and where the passage enters a drill spot -- a facet square
to the passage, ``spot_length`` across (None => d + 2 x exit_land) -- is cut at the floor's
edge. The facet is centred on ``Q``; the flat floor runs ``width`` from the facet's end
nearer the face, away from the exit side, and the channel's walls go straight up to the back
face from the floor's far edge and the facet's other end. (The stand's plate: a 0.300 in
floor beside a 0.100 in spot.)

If the passage would come out through the back face before reaching that length, it is
clipped there (``pierces_back``): the channel depth is then zero and the realised L/d short.

Definition at line 403 of file layout.py.

References _cos(), _sin(), _spot_channel(), _tan(), max, and min.

Referenced by compute_layout().

◆ channel_lands()

Dict[str, float] engine.core.injectors.layout.channel_lands ( * ,
Dict[str, Any] ch_in,
Dict[str, Any] ch_out,
float r_centre_hole,
float r_plate )
Metal left on the back face: centre hole to inner channel, between channels, outer channel
to the plate edge. These are what any seal, and the wall between propellants, must fit in.

Definition at line 569 of file layout.py.

Referenced by compute_layout().

◆ channel_velocity_head()

Dict[str, float] engine.core.injectors.layout.channel_velocity_head ( * ,
float flow_area,
float mdot,
float rho,
float dp,
int inlets = 1,
float q_frac = MANIFOLD_Q_FRAC )
A channel's velocity head at its feed port against the injector drop, and the area that
keeps it to ``q_frac`` of that drop.

Each of ``inlets`` ports splits two ways around the ring, so a branch leaves the port with
``mdot / (2 inlets)``: ``v = mdot_branch / (rho A)``, ``q = rho v^2 / 2``. The holes beside the
port are driven by the channel's static pressure, ``dp - q`` (Rohde, Richards & Metger, NASA
TN D-5467: no velocity-head recovery with the approach flow normal to the hole), so they flow
``sqrt(1 - q/dp)`` of design. ``A_needed = mdot_branch / sqrt(2 rho q_frac dp)``.

Definition at line 538 of file layout.py.

References max.

Referenced by _check_manifold().

◆ compute_layout()

Dict[str, Any] engine.core.injectors.layout.compute_layout ( * ,
Mapping[str, float] oxidizer,
Mapping[str, float] fuel,
float bore_diameter,
Optional[Mapping[str, Any]] envelope = None,
bool fuel_outboard = True,
float center_clear_dia = 0.0,
float min_web = 0.0,
float wall_clearance = 0.0,
float ld_min = IMPINGEMENT_LD_TARGET_DEFAULT,
float ld_max = IMPINGEMENT_LD_TARGET_DEFAULT,
float plate_thickness = 0.0127,
float counterbore_dia = 0.0,
float land_ld_O = 4.0,
Optional[float] land_ld_F = None,
float min_back_web = 0.0,
Optional[Mapping[str, Any]] igniter = None,
Optional[Mapping[str, Any]] plate = None,
str ld_source_O = "declared",
str ld_source_F = "declared",
bool plate_thickness_declared = True )
Every derived dimension of an unlike-doublet ring pair in its plug, and what is wrong with
it. Lengths in metres, angles in degrees from the chamber axis.

Definition at line 971 of file layout.py.

References _cos(), _f(), channel_for_ring(), channel_lands(), face_geometry(), igniter_keepouts(), max, min, passage_back_entry(), and ring_face_reach().

Referenced by layout_from_config().

◆ effective_discharge()

Any engine.core.injectors.layout.effective_discharge ( Any engine_config,
str side )
The discharge block the Cd model should use for ``side``, given the plate as built.

Unchanged unless the block says ``l_over_d_source: plate``. Then the orifice L/d is the one the
geometry gives: with channels, the passage length to the channel floor; with a plenum, the
land (or the whole passage when there is no counterbore). Both solver paths call this.

Definition at line 823 of file layout.py.

References _discharge_as_built(), and layout_from_config().

◆ exit_recess()

float engine.core.injectors.layout.exit_recess ( * ,
float d_in,
float th_in,
float d_out,
float th_out,
float exit_land )
Depth below the face datum both exits sit at on a contoured face [m, positive].

Each exit is a round hole of diameter d in a flank inclined theta to the face; for the whole
hole plus ``exit_land`` to sit on the flank below its edge, the exit centre must be
``(d/2 + land) sin(theta)`` below the datum. Both exits go to the deeper of the two, so they
share one plane: then the jets meet at exactly the flat-face radius and axial height above
the exits, and every ring formula Layer 1 uses stays exact.

Definition at line 272 of file layout.py.

References _sin(), and max.

Referenced by face_geometry(), and ring_face_reach().

◆ face_geometry()

Dict[str, Any] engine.core.injectors.layout.face_geometry ( * ,
bool contoured,
float r_in,
float r_out,
float d_in,
float d_out,
float th_in,
float th_out,
float exit_land = EXIT_LAND_DEFAULT,
str groove_bottom = "flat" )
Exits, impingement point, free-jet lengths and the face profile for one ring pair.

The inner ring's jet leaves along (sin th_in, cos th_in) -- outward and downstream -- and the
outer ring's along (-sin th_out, cos th_out). With both exits at depth ``z_E`` they meet
``L_ax = (r_out - r_in) / (tan th_in + tan th_out)`` downstream of the exits, at
``r_imp = r_in + L_ax tan th_in``. Along each jet that is ``L_ax / cos th`` -- the
impingement distance as SP-8089 defines it.

Contoured groove: inner flank ``z = z_E - (r - r_in) tan th_in``, outer flank
``z = z_E - (r_out - r) tan th_out``. The bottom is flat at the depth where each flank still
gives ``d/2 + land`` of slant below its exit, unless the flanks meet first (a sharp V), or
``groove_bottom = "v"`` asks for the V.

Definition at line 300 of file layout.py.

References _cos(), _sin(), _tan(), exit_recess(), and max.

Referenced by compute_layout().

◆ face_z_at()

float engine.core.injectors.layout.face_z_at ( List[Tuple[float, float]] profile,
float r )
Face surface height at radius r (0 outside the groove).

Definition at line 360 of file layout.py.

Referenced by _check_plate().

◆ feed_ports()

Optional[Dict[str, Any]] engine.core.injectors.layout.feed_ports ( Mapping[str, Any] out,
Mapping[str, Any] plate )
The cover plate's feed ports, ``channel_inlets`` per ring on its channel: where they sit,
and the back-face grooves each port's bore lands across (a face seal with its sealing land
opened by a port does not seal). None without ``port_thread`` or channels.

Definition at line 739 of file layout.py.

References _f().

Referenced by layout_from_config().

◆ flows_from_result()

Dict[str, float] engine.core.injectors.layout.flows_from_result ( Mapping[str, Any] result,
Any cfg )
The ``flows`` mapping :func:`layout_from_config` takes, from a
``PintleEngineRunner.evaluate`` result: per stream ``mdot``, injector ``dp`` and inlet
pressure ``P_inj``, ``Cd``, density and vapour pressure (the config's fluids), plus ``Pc`` and
the ambient pressure the solve used.

Definition at line 1320 of file layout.py.

References _f(), and _get().

◆ igniter_keepouts()

Optional[Dict[str, Any]] engine.core.injectors.layout.igniter_keepouts ( Optional[Mapping[str, Any]] igniter,
* ,
float plate_thickness,
float min_web )
What a declared igniter port takes out of the plate, from its thread alone.

Front: the tapped hole at thread OD plus ``min_web`` of wall. Engagement: the plate (or a
thicker centre hub, as wide as that keep-out) must be at least the thread's effective length
L2. None when no igniter is declared.

Definition at line 585 of file layout.py.

Referenced by compute_layout().

◆ impingement_ld_band()

LdBand engine.core.injectors.layout.impingement_ld_band ( Optional[Mapping[str, Any]] requirements)
Resolve the standoff L/d band from design requirements.

Precedence, highest first: explicit ``layer1_impingement_Ld_min`` / ``_max``; then
``layer1_impingement_Ld_target`` +/- ``layer1_impingement_Ld_tol``; the tolerance defaults
to 0 when ``layer1_derive_impingement_spacing`` is on (the default) and to 1.0 when off.

Definition at line 84 of file layout.py.

References _opt_bool(), _opt_float(), and max.

Referenced by layout_inputs_from_config().

◆ layout_from_config()

Optional[Dict[str, Any]] engine.core.injectors.layout.layout_from_config ( Any cfg,
bool drawings = True,
Optional[Mapping[str, Any]] flows = None,
* ,
bool checks = True )
``compute_layout`` on an engine config, plus its drawing primitives
(``engine.core.injectors.drawing``); None when it is not an impinging doublet. ``flows``
(a solve, see :func:`flows_from_result`) adds the manifold velocity-head and orifice
cavitation checks and puts the solved Pc on the plate-bending check (else the target Pc).

``checks=False`` is the geometry alone -- passages and channels, a drawing in geometry mode
applied -- for the flow solve, which needs the channel sections many times per operating point:
the plate-bending check and the drawing comparison cost ~0.1 s each and were 80 % of a solve.

Definition at line 1807 of file layout.py.

References _apply_drawing(), _check_back_features(), _check_cavitation(), _check_inlet_fit(), _check_manifold(), _check_plate(), _report_cd(), compute_layout(), feed_ports(), layout_inputs_from_config(), and plate_profile().

Referenced by effective_discharge().

◆ layout_inputs_from_config()

Optional[Dict[str, Any]] engine.core.injectors.layout.layout_inputs_from_config ( Any cfg)
Everything the layout needs, from an engine config (dict or pydantic model). None when the
injector is not an impinging doublet or the geometry is incomplete.

Definition at line 925 of file layout.py.

References _drawing(), _f(), _get(), _opt_bool(), _opt_float(), _plain(), _plate_block(), _req_dict(), _stream(), assembly_envelope(), and impingement_ld_band().

Referenced by layout_from_config().

◆ passage_back_entry()

BackEntry engine.core.injectors.layout.passage_back_entry ( * ,
float r_face,
float d,
float theta_deg,
float plate_thickness,
float counterbore_dia,
float land_ld,
bool is_inner,
int n,
float exit_depth = 0.0 )
Plenum back: where one ring's passage opens on the flat back face.

From an exit at depth ``exit_depth`` the hole runs ``(t - exit_depth) / cos(theta)`` along its
axis and moves ``(t - exit_depth) tan(theta)`` radially -- inward for the inner ring, outward
for the outer, because the jets aim at each other. What opens there is the counterbore when
the land leaves room for one, the orifice otherwise.

Definition at line 380 of file layout.py.

References _cos(), _half_major(), _tan(), max, and min.

Referenced by compute_layout().

◆ plate_bending_moments()

Tuple[Any, Any] engine.core.injectors.layout.plate_bending_moments ( Any r,
* ,
float a,
float b,
float p,
float nu,
str support = "simply_supported",
float r_hole = 0.0 )
Radial and tangential bending moments ``(M_r, M_t)`` [N m / m] at radius r (scalar or
array) in a circular plate of radius a under a uniform pressure p over r <= b (Timoshenko &
Woinowsky-Krieger §19; Roark Table 11.2). ``support``: ``simply_supported`` or ``clamped``
at r = a.

Positive sags toward the load. With ``r_hole`` > 0 the plate has a centre hole whose plug
(the igniter) carries its share of p into the hole edge as shear, with no moment there
(M_r(r_hole) = 0); r_hole = 0 is the solid plate. Solved exactly: slope
phi = p r^3/(16 D) + A r + C/r inside b and (p b^2/(4 D)) r (ln(r/a) - 1/2) + B r + E/r
outside, continuous in phi and phi' at b, with the edge condition at a. D = 1 throughout:
the moments do not depend on it.

Definition at line 1430 of file layout.py.

References min.

Referenced by _check_plate().

◆ plate_profile()

Dict[str, Any] engine.core.injectors.layout.plate_profile ( Mapping[str, Any] out,
Mapping[str, Any] plate,
* ,
bool with_port = True )
The plug's half-section as one closed loop in (r, z) -- face datum z = 0, back face z = -t --
from the layout and the plate's declared features: the face (groove), the centre port's
drilled bore, the rim gland, and along the back each channel's section and each groove.

This is the revolve sketch: what CAD turns round the axis, what the bending check cuts, and
what a drawing (``profile_dxf``) is compared with. A groove that would cut into a channel, the
port or another groove is left out and reported, so the loop stays one simple outline.

Definition at line 654 of file layout.py.

References _rounded(), and max.

Referenced by _apply_drawing(), and layout_from_config().

◆ realized_land()

Dict[str, Any] engine.core.injectors.layout.realized_land ( * ,
float d,
float theta_deg,
float plate_thickness,
float counterbore_dia,
Optional[float] declared_land_ld )
Plenum back: the orifice land the plate actually gives, and the counterbore feeding it.

With a counterbore wider than the orifice, the land is what the counterbore leaves:
``declared_land_ld * d``, capped at the passage length. Without one, the small drill runs the
whole passage, ``t / cos(theta)``. Measured on the hole axis.

Definition at line 797 of file layout.py.

References _cos(), _tan(), and min.

◆ ring_face_reach()

Tuple[float, float] engine.core.injectors.layout.ring_face_reach ( * ,
bool contoured,
float r_in,
float d_in,
float th_in,
float r_out,
float d_out,
float th_out,
float exit_land = EXIT_LAND_DEFAULT )
Innermost and outermost radius the ring pair occupies on the face datum.

Flat face: the elliptical exit traces, ``d / (2 cos theta)`` radially. Contoured face: the
groove's edges, where each flank reaches the datum. These are what an igniter keep-out and the
bore clearance are measured against.

Definition at line 284 of file layout.py.

References _half_major(), _tan(), exit_recess(), and max.

Referenced by compute_layout().

Variable Documentation

◆ _COS_FLOOR

float engine.core.injectors.layout._COS_FLOOR = 0.10
protected

Definition at line 115 of file layout.py.

◆ ATM

float engine.core.injectors.layout.ATM = 101325.0

Definition at line 164 of file layout.py.

◆ CORE_FRAC_WARN

float engine.core.injectors.layout.CORE_FRAC_WARN = 0.25

Definition at line 139 of file layout.py.

◆ DRAWING_LD_TOL

float engine.core.injectors.layout.DRAWING_LD_TOL = 0.02

Definition at line 1630 of file layout.py.

◆ DRAWING_PROFILE_TOL

float engine.core.injectors.layout.DRAWING_PROFILE_TOL = 0.025e-3

Definition at line 1635 of file layout.py.

◆ DRAWING_RING_TOL

float engine.core.injectors.layout.DRAWING_RING_TOL = 0.05e-3

Definition at line 1627 of file layout.py.

◆ DRILL_ENTRY_MAX_OFF_SQUARE_DEG

float engine.core.injectors.layout.DRILL_ENTRY_MAX_OFF_SQUARE_DEG = 10.0

Definition at line 128 of file layout.py.

◆ DRILL_LD_PRACTICE_MAX

float engine.core.injectors.layout.DRILL_LD_PRACTICE_MAX = 10.0

Definition at line 119 of file layout.py.

◆ EXIT_LAND_DEFAULT

float engine.core.injectors.layout.EXIT_LAND_DEFAULT = 0.0005

Definition at line 144 of file layout.py.

◆ FACE_HEATING_INCLUDED_DEG

float engine.core.injectors.layout.FACE_HEATING_INCLUDED_DEG = 90.0

Definition at line 131 of file layout.py.

◆ FREE_JET_MAX_D

float engine.core.injectors.layout.FREE_JET_MAX_D = 7.0

Definition at line 135 of file layout.py.

◆ IMPINGEMENT_LD_TARGET_DEFAULT

float engine.core.injectors.layout.IMPINGEMENT_LD_TARGET_DEFAULT = 4.0

Definition at line 47 of file layout.py.

◆ IMPINGEMENT_LD_TOL_UNDERIVED

float engine.core.injectors.layout.IMPINGEMENT_LD_TOL_UNDERIVED = 1.0

Definition at line 51 of file layout.py.

◆ MANIFOLD_Q_FRAC

float engine.core.injectors.layout.MANIFOLD_Q_FRAC = 0.05

Definition at line 153 of file layout.py.

◆ ORIFICE_LD_MIN

float engine.core.injectors.layout.ORIFICE_LD_MIN = 4.0

Definition at line 123 of file layout.py.

◆ PLATE_POISSON_DEFAULT

float engine.core.injectors.layout.PLATE_POISSON_DEFAULT = 0.3

Definition at line 161 of file layout.py.

◆ PLATE_THICKNESS_DEFAULT

float engine.core.injectors.layout.PLATE_THICKNESS_DEFAULT = 0.0127

Definition at line 148 of file layout.py.

◆ PLATE_YIELD_FACTOR

float engine.core.injectors.layout.PLATE_YIELD_FACTOR = 1.5

Definition at line 157 of file layout.py.

◆ PSI

float engine.core.injectors.layout.PSI = 6894.757

Definition at line 163 of file layout.py.