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

Functions

 _arc_points (cx, cy, r, a0, a1, step_deg=5.0)
Tuple[List[List[Tuple[float, float]]], float] _segments (str path)
 _chain (segs, tol)
 _area (poly)
 _recesses (loop, on_line, depth_of, full)
Dict[str, Any] read_plate_profile (str path)
 _centroid_r (poly)
 _perimeter_wetted (pts, closed_by)
Dict[str, Any] ring_channel (Dict[str, Any] profile, float r_hole_entry)
 _sloped (pts, face_line)
Dict[str, Dict[str, Any]] drilled_passages (Dict[str, Any] profile, Dict[str, float] angles, *, float tol_deg=1.0)
str resolve_path (str path)
Dict[str, Any] load_plate_profile (str path)
Any section_thickness (Dict[str, Any] profile, Any r)
Any loop_section (List[Tuple[float, float]] loop, Any r)
Dict[str, Any] loop_deviation (List[Tuple[float, float]] a, List[Tuple[float, float]] b, *, float step=5e-5)

Variables

dict _UNIT_M = {0: None, 1: 0.0254, 2: 0.3048, 4: 0.001, 5: 0.01, 6: 1.0}
float CHANNEL_MIN_DEPTH_FRAC = 0.25
dict _CACHE = {}

Detailed Description

Read the injector plate's revolved half-section from a CAD DXF.

The sketch is the plate's cross-section on one side of its axis: one closed profile of LINEs and
ARCs, radius on one sketch axis and axial position on the other (the revolve axis is the profile
edge at radius 0, or the profile sits entirely at radius >= 0). Units come from $INSUNITS.

From it: the plate thickness, the recesses in the back face (deep ones are the manifold channels;
shallow ones are seal grooves, reported and ignored), the recess in the chamber face (the groove
the orifices exit), a hole on the axis if there is one, and gland recesses on the rim.

Only geometry the engine design determines is used; seal features are the designer's and are
listed, never interpreted. Orifices and feed ports are not revolved features and are not here.

Function Documentation

◆ _arc_points()

engine.core.injectors.plate_dxf._arc_points ( cx,
cy,
r,
a0,
a1,
step_deg = 5.0 )
protected

Definition at line 25 of file plate_dxf.py.

References max.

Referenced by _segments().

◆ _area()

engine.core.injectors.plate_dxf._area ( poly)
protected

Definition at line 78 of file plate_dxf.py.

Referenced by _recesses().

◆ _centroid_r()

engine.core.injectors.plate_dxf._centroid_r ( poly)
protected

Definition at line 176 of file plate_dxf.py.

References max, and min.

Referenced by read_plate_profile().

◆ _chain()

engine.core.injectors.plate_dxf._chain ( segs,
tol )
protected
Join segments end to end into one closed loop.

Definition at line 56 of file plate_dxf.py.

Referenced by read_plate_profile().

◆ _perimeter_wetted()

engine.core.injectors.plate_dxf._perimeter_wetted ( pts,
closed_by )
protected
Wetted perimeter of a channel closed by the cover across its mouth.

Definition at line 186 of file plate_dxf.py.

Referenced by read_plate_profile().

◆ _recesses()

engine.core.injectors.plate_dxf._recesses ( loop,
on_line,
depth_of,
full )
protected
Runs of the loop that leave a boundary line and come back: (vertices, r-range, depth, area).
The run that wraps round the rest of the profile (depth reaching ``full``) is not a recess.

Definition at line 83 of file plate_dxf.py.

References _area(), max, and min.

Referenced by read_plate_profile().

◆ _segments()

Tuple[List[List[Tuple[float, float]]], float] engine.core.injectors.plate_dxf._segments ( str path)
protected

Definition at line 34 of file plate_dxf.py.

References _arc_points().

Referenced by read_plate_profile().

◆ _sloped()

engine.core.injectors.plate_dxf._sloped ( pts,
face_line )
protected
The sloped straight segments of a run, as (A, B, angle from the face plane [deg]) in
(r, depth-from-face) coordinates.

Definition at line 202 of file plate_dxf.py.

Referenced by drilled_passages().

◆ drilled_passages()

Dict[str, Dict[str, Any]] engine.core.injectors.plate_dxf.drilled_passages ( Dict[str, Any] profile,
Dict[str, float] angles,
* ,
float tol_deg = 1.0 )
Where each ring's orifice runs, from the drawing alone.

A drilled passage is not a revolved feature, but its two ends are: the channel facet it is
drilled square into and the face-groove flank it leaves through, both inclined at the jet
angle. The passage is the facet's normal through the facet's midpoint -- where a drill spotted
square on that facet goes -- until it meets the flank of the same angle. ``angles``:
``{"O": deg, "F": deg}`` from the chamber axis. A side with no facet/flank pair at its angle
is left out (that drawing does not locate its passage).

Definition at line 214 of file plate_dxf.py.

References _sloped().

◆ load_plate_profile()

Dict[str, Any] engine.core.injectors.plate_dxf.load_plate_profile ( str path)
``read_plate_profile``, cached on the file's path and modification time.

Definition at line 276 of file plate_dxf.py.

References read_plate_profile(), and resolve_path().

◆ loop_deviation()

Dict[str, Any] engine.core.injectors.plate_dxf.loop_deviation ( List[Tuple[float, float]] a,
List[Tuple[float, float]] b,
* ,
float step = 5e-5 )
How far apart two closed outlines are: for points every ``step`` along each, the distance
to the other outline. ``max`` is the Hausdorff distance; ``where_a`` / ``where_b`` the points
on each that sit farthest from the other.

Definition at line 310 of file plate_dxf.py.

References max.

◆ loop_section()

Any engine.core.injectors.plate_dxf.loop_section ( List[Tuple[float, float]] loop,
Any r )
``section_thickness`` of a closed (r, z) loop.

Definition at line 293 of file plate_dxf.py.

Referenced by section_thickness().

◆ read_plate_profile()

Dict[str, Any] engine.core.injectors.plate_dxf.read_plate_profile ( str path)
The plate's revolved half-section, in metres. See the module docstring.

Definition at line 104 of file plate_dxf.py.

References _centroid_r(), _chain(), _perimeter_wetted(), _recesses(), _segments(), max, and min.

Referenced by load_plate_profile().

◆ resolve_path()

str engine.core.injectors.plate_dxf.resolve_path ( str path)
A drawing path as written in a config: absolute, else relative to the working directory,
else to the EngineDesign root.

Definition at line 266 of file plate_dxf.py.

Referenced by load_plate_profile().

◆ ring_channel()

Dict[str, Any] engine.core.injectors.plate_dxf.ring_channel ( Dict[str, Any] profile,
float r_hole_entry )
The channel a ring's holes break into: the one whose radial span holds the entry radius,
else the nearest.

Definition at line 192 of file plate_dxf.py.

References min.

◆ section_thickness()

Any engine.core.injectors.plate_dxf.section_thickness ( Dict[str, Any] profile,
Any r )
Metal on the axial line at each radius r [m]: the length of that line inside the profile
(the whole plate, less the face groove, a channel, a seal groove, whatever is cut there).

Definition at line 287 of file plate_dxf.py.

References loop_section().

Variable Documentation

◆ _CACHE

dict engine.core.injectors.plate_dxf._CACHE = {}
protected

Definition at line 263 of file plate_dxf.py.

◆ _UNIT_M

dict engine.core.injectors.plate_dxf._UNIT_M = {0: None, 1: 0.0254, 2: 0.3048, 4: 0.001, 5: 0.01, 6: 1.0}
protected

Definition at line 19 of file plate_dxf.py.

◆ CHANNEL_MIN_DEPTH_FRAC

float engine.core.injectors.plate_dxf.CHANNEL_MIN_DEPTH_FRAC = 0.25

Definition at line 22 of file plate_dxf.py.