Geometry and targets
Briareus — Module
BriareusView-factor radiation and laser-pointing design for high-energy-density experiments: indirect-drive hohlraums, backlighter foils, and other laser-irradiated targets.
Units: lengths mm, time ns, power TW, flux TW/mm² (to_Wcm2 converts), radiation temperature eV, angles in degrees at the user interface.
Briareus.ConeSurface — Type
ConeSurface(half_angle; apex = (0, 0, 0), axis = (0, 0, 1))One nappe of a right circular cone: the points seen from apex at half_angle degrees (0 < θ < 90) from axis, at distance z tan θ from the axis a distance z along it (an entrance-hole cone, a conical shield, a tapered bore). As on a cylinder, points are projected onto it radially, keeping their height along the axis, so the chords of a circle about the axis (the rims of a faceted cone) land on the circle and a faceted frustum covers the true one exactly; facets' patches have exact areas.
Briareus.CurvedSurface — Type
CurvedSurfaceExact surface that a faceted component approximates: SphereSurface, CylinderSurface, ConeSurface or DiskSurface. When a component carries one, the radiation model integrates over the true surface (points, normals and areas of the curved patches), while ray casting and visibility keep using the flat facets. On a curved concave surface the view-factor kernel stays bounded, and flat facets would misrepresent the exchange between nearby elements.
Briareus.CylinderSurface — Type
CylinderSurface(radius; origin = (0, 0, 0), axis = (0, 0, 1))Infinite circular cylinder through origin along axis.
Briareus.DiskSurface — Type
DiskSurface(; center = (0, 0, 0), normal = (0, 0, 1))Plane through center whose elements are polar sectors about center, as produced by annulus_mesh and disk_mesh: each element's exact shape is the annular sector spanned by its vertices, with circular arcs where the mesh has chords. Giving a hohlraum's end caps and laser entrance holes this surface makes them meet a CylinderSurface wall exactly at the rim.
Briareus.Mesh — Type
Mesh(vertices, triangles, patches)Triangle mesh whose triangles are grouped into planar patches. patches[p] is the contiguous range of triangle indices forming patch p. Lengths are in mm.
Briareus.SphereSurface — Type
SphereSurface(radius; center = (0, 0, 0))Briareus.add_polygon! — Method
add_polygon!(mesh, poly; facing = nothing)Append the convex planar polygon poly as one patch (fan-triangulated). If facing is a vector, the winding is reversed when needed so the patch's front normal points along facing.
Briareus.annulus_mesh — Method
annulus_mesh(r_inner, r_outer, z; nr, nphi, up = true, phi0 = 0.0, phibreaks = ())Flat annulus (a disk when r_inner == 0) in the plane z, with nr radial by nphi azimuthal patches. Front faces point along +ẑ when up, -ẑ otherwise. Rings are equal-area so patch areas are uniform. phibreaks (radians) are azimuths the mesh must contain, as in cylinder_mesh; giving both the same nphi and phibreaks makes an end cap meet a wall vertex for vertex.
Briareus.conforming_grid — Method
conforming_grid(a, b, n, breaks; periodic = false) -> Vector{Float64}Grid lines from a to b with about n cells that include every break line in breaks: each interval between consecutive breaks is divided uniformly into max(1, round(len / h)) cells, h = (b - a)/n. Breaks closer than 1e-9 (b - a) are merged. With periodic (an azimuth, b - a one period), breaks are wrapped into the period and the grid runs from the first break to the first break plus the period, so the end points a, b are not grid lines themselves. Without breaks, use range(a, b; length = n + 1).
Briareus.cubed_sphere_mesh — Method
cubed_sphere_mesh(radius; n, outward = true)Sphere about the origin from the six faces of a cube, each divided into n × n equiangular cells projected onto the sphere. The four corners of a projected cell are not coplanar, so each cell is split into two triangular patches along alternating diagonals chosen to keep the faceted sphere convex (12n² planar patches). Unlike a latitude–longitude mesh it has no poles and no slivers, which suits radiation problems where every part of the sphere matters equally.
Briareus.cylinder_mesh — Method
cylinder_mesh(radius, z0, z1; nz, nphi, inward = true, phi0 = 0.0, zbreaks = (),
phibreaks = ())Open cylinder of the given radius about the z axis spanning z0 ≤ z ≤ z1, with nz axial by nphi azimuthal quadrilateral patches. Front faces point toward the axis when inward (a hohlraum wall), away from it otherwise.
zbreaks (mm) and phibreaks (radians) are lines the mesh must contain, e.g. the edges of a window cut into the wall: the grid is then uniform between consecutive breaks with about the default spacing (conforming_grid), so a region bounded by break lines is tiled exactly by whole patches. Without breaks the grid is uniform from phi0.
Briareus.disk_mesh — Method
disk_mesh(radius, z; nr, nphi, up = true)Flat disk in the plane z; an annulus_mesh with zero inner radius.
Briareus.frustum_mesh — Method
frustum_mesh(r0, z0, r1, z1; nz, nphi, inward = true)Conical frustum (a cone when one radius is zero) about the z axis from radius r0 at z0 to r1 at z1. Useful for shields, cones and tapered hohlraum sections.
Briareus.merge_meshes — Method
merge_meshes(meshes...)Concatenate meshes into one, preserving patch structure and order.
Briareus.npatches — Method
Number of patches of a mesh.
Briareus.rectangle_mesh — Method
rectangle_mesh(width, height; nu, nv)Rectangle |x| ≤ width/2, |y| ≤ height/2 in the plane z = 0, front face along +ẑ, divided into nu × nv patches.
Briareus.rotation_to — Method
rotation_to(n)Proper rotation matrix taking ẑ to the unit vector along n (minimal rotation).
Briareus.sphere_mesh — Method
sphere_mesh(radius; ntheta, nphi, outward = true)Latitude–longitude sphere about the origin with ntheta bands uniform in cos θ, so all ntheta × nphi patches have equal area. Polar bands are triangle fans.
Briareus.split_mesh — Method
split_mesh(mesh, keep) -> (selected, rest)Split a mesh by patch: keep(centroid) decides, from a patch's area-weighted centroid, whether the patch goes to selected or rest. Use it to cut a port or a window out of a surface and make it an aperture.
Briareus.surface_point — Method
surface_point(surface, p) -> (point, normal)Projection of p onto the surface (radially from the center or the axis) and the outward unit normal there (away from the center or the axis).
Briareus.transform — Function
transform(mesh, R, t)Apply the rigid map x ↦ R*x + t to every vertex. R must be a proper rotation for the patch orientations to be preserved.
Briareus.translate — Method
translate(mesh_or_component, t)Copy shifted by the vector t (mm).
Briareus.coarsen_mesh — Method
coarsen_mesh(mesh; size, angle = 10.0, tol = 1e-9) -> MeshThe mesh with neighboring patches merged into larger ones (the radiosity elements of a target): each new patch grows from a seed patch over shared edges, taking patches whose normals are within angle degrees of the seed's and whose vertices lie within size / 2 mm of the seed's centroid. Triangles are unchanged; only their grouping into patches (and their order) is. Imported CAD often has hundreds of thousands of facets (fine tessellation of curved faces, slivers along edges), far more than view factors need: coarsening to a few hundred micrometres makes such parts usable for radiation.
Patches are merged only across edges where both are oriented consistently (see orient_mesh), so the front side of a merged patch is well defined, and an element stays within angle of planar: the flat-patch error of a merged element on a curved surface is that of a facet of the same size. Seeds are taken by decreasing area, so large flat faces are kept whole up to size.
Briareus.orient_mesh — Method
orient_mesh(mesh; toward = nothing, tol = 1e-9) -> MeshThe mesh with its patches' windings made consistent: across every edge two patches share (vertices welded by position to tol times the mesh's extent), the patches traverse it in opposite directions, so their front sides lie on the same side of the surface. Imported CAD is often stitched from faces of either orientation (a radiating element's front is the side its winding defines).
Each connected surface then gets one orientation as a whole:
- a closed surface (every edge shared by exactly two patches) faces out of the volume it encloses (positive signed volume), so a thick hohlraum wall, meshed as a closed solid, faces into the cavity on its inner side;
- an open surface faces the point
toward(e.g. the target center for a thin hohlraum wall) by area-weighted majority, or, withouttoward, keeps the orientation of the larger part of its area.
Edges shared by more than two patches (non-manifold) do not constrain the orientation, and a surface that cannot be oriented consistently (a Möbius-like stitching) keeps the first orientation found for each patch; both are reported in a warning.
Briareus.remesh_mesh — Method
remesh_mesh(mesh; size, angle = 10.0, tol = 1e-9) -> MeshThe mesh's surface divided into compact, near-planar radiosity elements of about size mm, however its facets are shaped: on a smooth surface the elements average size² in area (a square element of side size has the same) and every vertex lies within size of its element's centroid. Imported CAD tessellates curved walls as long slivers (a hohlraum wall as axial strips spanning its length), which coarsen_mesh cannot shorten: it only groups whole facets. Here:
- vertices are welded by position (to
toltimes the mesh's extent), and one-sided edges with other such edges' vertices on them (T-junctions between CAD faces) are split there, so faces that meet along an edge are connected; - every facet is split, in its own plane, into triangles with edges of at most
size / 3; an edge gets the same points from both facets sharing it, so the refined triangulation is conforming. Parallel edges longer than that (the sides of a wall's strips: a cylinder's or an extrusion's generators, to 0.25°) and the diagonals of their strips are cut where they cross a common family of planes across them, so neighboring strips are cut at the same places and a cut across a strip is one straight chord; other edges are divided equally; - the refined triangles are clustered: seeds
0.85 sizeapart (a Poisson-disk sample) claim triangles nearest first across shared, consistently wound edges (seeorient_mesh), taking those whose normals are withinangledegrees of the seed's; Lloyd iterations move each seed to its element's centroid and mean normal. On strips (facets whose edges longer thansizeare all cut by one family of planes), every few planes bound a band aboutsizelong, and elements grow within one band: their cuts across the strips lie on the planes, straight and shared by the elements on both sides, and a sliver strip's piece in a band goes whole to one element, so their sides run along strip edges (an elementwwide crosses about w/(strip width) strips, and its outline has about two edges per strip). An element with a facet more thananglefrom its mean normal, a vertex farther thansizefrom its centroid, or a centroid that does not project (along the normal) onto it, is halved until it has none; - within each element, the pieces of facets in one plane are joined and re-triangulated from their outline (a point is dropped only where it lies on a straight outline in every element using it, so the mesh stays conforming).
The surface is unchanged: every output triangle lies in the plane of an input facet, and the elements tile the input facets exactly (areas agree to round-off). Facets of zero area (height below 1e-12 of their longest edge) and triangles outside every patch are dropped; slivers thinner than 1e-6 of their length have no orientation to keep and join any neighboring element. The input's patches do not constrain the elements; its windings do (orient it first). Faces narrower than size (a wall's end, a fillet) give elements as narrow, and elements on a faceted curved wall keep its faceting (a facet of width w on radius R lies up to w²/8R off the true surface).
Briareus.BLACK — Constant
Perfect absorber that emits nothing.
Briareus.AlbedoModel — Type
AlbedoModelSupertype of x-ray albedo models: ConstantAlbedo, TabulatedAlbedo, WallLossAlbedo, BurnthroughAlbedo, GapClosure. Evaluate with albedo.
Briareus.BurnthroughAlbedo — Type
BurnthroughAlbedo(; thickness, density = 19.3, before = WallLossAlbedo(),
transmission = eddington_transmission(τ), after = nothing,
width = 0.4, burnthrough = nothing, front = HeatFront())Albedo of a thin wall layer (a thin-foil diagnostic window: thickness µm of a material of density g/cm³, gold by default) that re-emits like the wall until the Marshak heat front (front, a HeatFront) has heated its whole areal mass ρ × thickness, and then lets part of the flux that reaches it through.
Once burned through, a fraction T = transmission of the incident flux passes through the foil and leaves the hohlraum (a number, or RosselandTransmission() for a fraction that follows the radiation temperature). The rest meets the foil as before and is re-emitted with the albedo of before. Across the transition
α(t) = α_before (1 - s T), transmitted fraction s T,with s = s((t - t_b)/width) the smooth step 3x² - 2x³ on [0, 1] and t_b the burnthrough time, so the burned-through albedo is (1 - T) α_before. Of the flux H A on the foil, s T H A is transmitted and (1 - s T)(1 - α_before) H A absorbed (energy_balance, drive_history). before is an albedo model or a number, by default the wall's Marshak loss (WallLossAlbedo).
The default T is the gray-foil estimate of R. S. Lester et al., Phys. Rev. E 114, L023201 (2026), doi:10.1103/k8dz-pjdx: T = 4/(3τ + 2) (their eq. 2, eddington_transmission). The optical depth is their eq. 1, τ = L/λ_Au(T_h) at a fixed Rosseland mean free path λAu, scaled linearly in areal mass (`opticaldepth) from their pointτ ∼ 5atL = 2.5 µm`:
τ = 5 × ρ thickness / (19.3 g/cm³ × 2.5 µm),so T ≈ 0.33, 0.235 and 0.17 for 1.7, 2.5 and 3.6 µm of gold. Limitations:
- λAu is held at their evaluation, for a hohlraum radiation temperature `Th
of typically 300–350 eV and an assumed gold density of about 1 g/cm³ (the expanded foil), soTis constant once burned through.transmission = RosselandTransmission()` lets λ_Au follow the temperature of the flux on the foil instead; its density dependence is not modeled. - Pairing that density with the 2.5 µm as-built thickness is theirs. Taken literally, eq. 1 at 1 g/cm³ describes a layer of 0.25 mg/cm², not the foil's 4.8. The scaling with thickness (areal mass) is ours, from eq. 1.
- The estimate is gray, planar and quasi-static, and for gold: pass
transmissionfor another material. Belowτ = 2/3(0.33 µm of gold) it is capped at 1.
transmission = 1 makes a burned-through foil an open hole whose whole incident flux is transmitted.
An explicit after (an albedo model or number; exclusive with transmission) sets the burned-through albedo directly instead,
α(t) = α_before + s (α_after - α_before),and counts as transmitted only the loss beyond the intact foil's, (α_before - α) H A; the intact foil's own (1 - α_before) H A stays absorbed. after = 0 is the open-hole bound on the loss with this split (the default before transmission existed).
The burnthrough time t_b is, in order:
- the per-element time passed to
solve/albedos(burnthrough = ...), whichdrive_historyintegrates from each element's own incident-flux temperature history (heat_front); - the explicit
burnthrough(ns), when given; - otherwise the foil is intact (
t_b = ∞): a single solve has no history to estimate it from.burnthrough_timegives the estimate for a temperature history.
Before t_b the foil loses exactly what a thick wall loses and transmits nothing: in the diffusion picture the cold material ahead of a nonlinear heat front does not change the flux into it, so no early loss is modeled. Measured burnthrough of 0.8–3 µm gold foils on a 260 eV hohlraum wall (Nova; Lindl et al., Phys. Plasmas 11, 339 (2004), Fig. 4-6) reaches half signal 0.1–0.25 ns after the computed front arrival, 0.19 ns on average, which sets the default width (half transmission at t_b + width/2; see the diagnostic-windows tutorial).
Briareus.Component — Type
Component(name, mesh, material; kind = :surface, two_sided = false, surface = nothing)A named piece of a target. kind = :surface components are opaque: they block laser rays and lines of sight, absorb laser light, and radiate from their front side (and back side when two_sided). kind = :aperture components (e.g. laser entrance holes) are transparent diagnostic surfaces that record the x-ray flux crossing them and re-emit nothing. surface is the exact CurvedSurface the mesh approximates, if any; the radiation model then uses the curved geometry (see view_factors).
Briareus.ConstantAlbedo — Type
ConstantAlbedo(α)Time-independent x-ray albedo (re-emitted / incident flux).
Briareus.GapClosure — Type
GapClosure(; closure, width = 0.4, after = WallLossAlbedo())Albedo of an opening that closes during the pulse, such as the assembly gap around a diagnostic window, WallWindow(; gap, gap_material = Material(:Au; albedo = GapClosure(closure = 3.0))). Until closure (ns) the gap is open: all the flux that reaches it leaves the hohlraum, as through an aperture. Across the next width ns it closes, and then it re-emits like the wall with the albedo of after (a model or a number):
α(t) = s α_after, transmitted fraction 1 - s,with s = s((t - closure)/width) the smooth step 3x² - 2x³ on [0, 1], as for BurnthroughAlbedo. energy_balance books (1 - s) H A as transmitted, and drive_history counts it in window_loss. The closure time is an input: a gap tens of micrometres wide closes as plasma blown off its walls fills it, which this model does not compute. Unlike an aperture, the gap is opaque to laser light and to view-factor visibility rays, which matters only for gaps a beam would reach.
Briareus.HeatFront — Type
HeatFront(; coefficient = 9.51e-4, temperature_exponent = 1.914, time_exponent = 0.5156)Areal mass (g/cm²) behind the ablative (subsonic) Marshak heat front that radiation of temperature T drives into a gold wall: at constant T,
m_F = c (T/100 eV)^a (t/1 ns)^b,with the defaults from the self-similar solution of Hammer & Rosen, Phys. Plasmas 10, 1829 (2003), eq. 112 for a constant drive (q₀ = 0), built on their power-law fits to gold's opacity and equation of state. For a drive T(t) the front is integrated as
m_F(t) = c [∫₀ᵗ (T(t′)/100 eV)^(a/b) dt′]^b,which is exact at constant T, depends only on the drive history, and for a ramp T ∝ tᵏ gives m_F = c (1 + k a/b)^(-b) T(t)^a t^b: within 2% of Hammer & Rosen's exact coefficient for k = 0.182 and within 1% of Shussman & Heizler's (Phys. Plasmas 22, 082109 (2015)) for k = 0.123 (see heat_front and the diagnostic-windows tutorial). Lindl et al. (Phys. Plasmas 11, 339 (2004), eq. 4-24) give c = 1.20e-3, a = 1.86, b = 0.54, the scaling the WallLossAlbedo defaults come from; it heats about 20% more mass at 300 eV, 1 ns. T is the incident-flux radiation temperature (Lindl's convention; Hammer & Rosen drive with the surface temperature, a few percent lower for gold late in a pulse).
Briareus.Material — Type
Material(name; albedo = 0.0, conversion = 0.0)Surface properties for the radiation model. albedo (a number or AlbedoModel) is the x-ray re-emission fraction; conversion is the fraction of absorbed laser power re-emitted as x-rays.
Briareus.RosselandTransmission — Type
RosselandTransmission(; reference_temperature = 325.0, exponent = 1.5)Post-burnthrough transmission of a gold foil that follows the radiation temperature T (eV) of the flux on it, for BurnthroughAlbedo(; transmission = RosselandTransmission()). The foil's optical depth scales with gold's Rosseland opacity,
τ(T) = τ_ref (T / reference_temperature)^(-exponent),and the transmission is eddington_transmission(τ(T)), where τ_ref is the foil's optical_depth (5 at 2.5 µm). The exponent is that of Hammer & Rosen's power-law fit to gold's Rosseland opacity, 1/K = g T^1.5 ρ^-0.2 (Phys. Plasmas 10, 1829 (2003), eq. 31, fitted over 100–200 eV), so the mean free path grows as T^1.5. The reference temperature is the middle of the 300–350 eV at which Lester et al. (Phys. Rev. E 114, L023201 (2026)) evaluate τ ∼ 5: at the reference the transmission equals the constant default. Hammer & Rosen's fit also reproduces that point: with the as-built areal mass of 2.5 µm of gold at Lester's expanded density of 1 g/cm³ it gives τ = 5.9 at 325 eV (derived, extrapolating the fit). The density is held at that expansion (K ∝ ρ^0.2: solid gold would double τ). Where no flux is known (T = nothing) the reference temperature is used.
Briareus.TabulatedAlbedo — Type
TabulatedAlbedo(times, values)Albedo interpolated linearly in time (ns) and held constant outside the table.
Briareus.Target — Type
Target(components)Assembled target geometry. Each patch side that radiates becomes an element (the unknowns of the radiation model): one element per patch for one-sided surfaces and apertures, two for two-sided surfaces. The back side of a one-sided surface absorbs laser light as a loss but is not modeled radiatively.
Briareus.WallLossAlbedo — Type
WallLossAlbedo(; coefficient = 0.32, temperature_exponent = -0.7, time_exponent = -0.38,
reference_temperature = 250.0, t0 = 0.1, range = (0.0, 0.95))Marshak-wave wall-loss albedo, 1 - α = c (T/100 eV)^p (t/1 ns)^q, with defaults for gold from Lindl's scaling (T in heV, t in ns). t is clamped below at t0, and α to range. The radiation temperature is each element's incident-flux temperature, so solve iterates it to self-consistency; reference_temperature (eV) is used where no flux is known.
Briareus.ablator — Method
Capsule ablator (defaults: albedo 0.3, conversion 0.3).
Briareus.albedo — Function
albedo(model, t, T = nothing)
albedo(material, t = 0.0)X-ray albedo at time t (ns); temperature-dependent models use the radiation temperature T (eV) when given.
Briareus.aperture — Method
aperture(name, mesh)Transparent diagnostic surface (e.g. a laser entrance hole): rays pass through it and its incident x-ray flux is the flux escaping through it.
Briareus.areal_mass — Method
Areal mass (g/cm²) of a burnthrough layer.
Briareus.burnthrough_time — Method
burnthrough_time(model::BurnthroughAlbedo, times, Tr) -> Float64Time (ns) at which the heat front driven by the radiation temperature history Tr (eV, at times, piecewise linear; heat_front) reaches the back of the layer, or Inf if it does not within times. This is the estimate alone; an explicit burnthrough of the model is not consulted.
Briareus.component_index — Method
component_index(target, name) -> IntBriareus.eddington_transmission — Method
eddington_transmission(τ)Fraction of the incident flux that a gray, planar foil of optical depth τ transmits in the Eddington approximation with a Marshak boundary condition,
F_trans / F_inc = (4/3) / (τ + 2/3) = 4 / (3τ + 2),eq. 2 of R. S. Lester et al., Phys. Rev. E 114, L023201 (2026), doi:10.1103/k8dz-pjdx. It is a diffusion result for optically thick foils: it exceeds 1 below τ = 2/3, where it is capped at 1. BurnthroughAlbedo takes its default transmission from it (see optical_depth). Generic in the number type.
Briareus.element_quadrature — Method
element_quadrature(target, e, level) -> (points, weights, normals)Quadrature over element e from 4^level sub-triangles per triangle: sub-triangle centroids weighted by area, with the element normal. On a component with a CurvedSurface, the points are projected onto the surface and carry its normals (on the element's radiating side) and curved-patch areas; an element of more than two facets (imported CAD) instead gets as many points as a two-triangle element, from its facets' pieces lumped into cells of the element's tangent plane. Weights sum to the element area.
Briareus.element_sector — Method
element_sector(target, e) -> (r0, r1, φa, φb)Polar sector of an element of a component with a DiskSurface.
Briareus.elements — Method
elements(target, names...) -> Vector{Int}Element indices of the named components (both sides of two-sided components).
Briareus.foil_transmission — Function
foil_transmission(model::BurnthroughAlbedo, T = nothing)Fraction of the incident flux a burned-through foil transmits when the flux on it has radiation temperature T (eV): the model's transmission, evaluated at T for a RosselandTransmission (at its reference temperature when T is nothing). NaN for a model with an explicit after.
Briareus.gold — Method
Gold hohlraum wall (defaults: albedo 0.8, laser→x-ray conversion 0.75).
Briareus.heat_front — Method
heat_front(front::HeatFront, times, Tr) -> VectorAreal mass (g/cm²) behind the heat front at each of times (ns) for the radiation temperature history Tr (eV) sampled at those times, piecewise linear between them (trapezoidal drive integral), from zero before times[1].
Briareus.nelements — Method
Number of radiating elements (patch sides) of a target.
Briareus.optical_depth — Method
optical_depth(model::BurnthroughAlbedo)Gray optical depth of a burned-through gold foil, scaled linearly in areal mass from τ ∼ 5 at 2.5 µm (Lester et al., Phys. Rev. E 114, L023201 (2026), eq. 1 at a fixed Rosseland mean free path): 5 × areal_mass(model) / (19.3 g/cm³ × 2.5 µm). The default transmission is eddington_transmission(optical_depth(model)). An explicit transmission or after does not change this estimate.
Briareus.transform — Function
Component with its mesh rigidly moved (x ↦ R*x + t).
Briareus.WallWindow — Type
WallWindow(; phi, z = 0.0, width, height, material = nothing, open = false, name = nothing,
gap = 0.0, gap_material = nothing)
WallWindow(; phi, z = 0.0, diameter, segments = 0, ...)Diagnostic window cut into a hohlraum wall (see hohlraum), centered at azimuth phi (degrees from +x) and axial position z (mm). Its shape is drawn on the unrolled wall (arc length along the wall by z, an isometry of the cylinder, so areas are those of the flat shape):
a rectangle
widthmm of arc byheightmm along the axis, ora disk of
diametermm, area π d²/4. Its edge is a regular polygon ofsegmentssides (default: about one per wall cell, a multiple of 8, at least 32) enlarged to the disk's area, so the window's area is exact while its edge stays withinπ² d/6 segments²of the circle (3 µm for a 2 mm window with 32 sides).A closed window (
open = false) is an opaque patch of wall that re-emits with its ownmaterial(albedo and laser conversion, e.g. a thin gold foil whose albedo followsBurnthroughAlbedo);material = nothingkeeps the wall's.An open window (
open = true) is a hole: an aperture that laser light passes through and whose incident x-ray flux escapes.
gap > 0 (mm) surrounds the window with an assembly gap of that width (a ring around a disk, a frame around a rectangle), its own component Symbol(name, :_gap): open by default, or a closed patch of gap_material. name defaults to :window_<k> for the k-th window.
Briareus.capsule_counts — Method
capsule_counts(capsule_radius, capsule_h) -> (; capsule_ntheta, capsule_nphi)Capsule mesh counts of hohlraum for elements no larger than capsule_h (mm) along a meridian or the equator (capsule_nphi a multiple of 4).
Briareus.disk_foil — Method
disk_foil(name, center, normal; radius, nr = 8, nphi = 32, material, two_sided = true)Circular foil with front face along normal.
Briareus.equal_area_radius — Method
equal_area_radius(r, n)Circumradius of the regular n-gon with the area of a circle of radius r: r √(2π / (n sin(2π/n))). Its edge runs from r π²/3n² outside the circle at the vertices to r π²/6n² inside at mid-side.
Briareus.foil — Method
foil(name, center, normal; width, height = width, n = 20, material = gold(),
two_sided = true, rotation = 0.0)Rectangular foil (e.g. a backlighter) with front face along normal. rotation (radians) spins it about its normal.
Briareus.hohlraum — Method
hohlraum(; length = 9.4, radius = 2.875, leh_radius = 1.55, capsule_radius = 0.9,
nz = 36, nphi = 48, nr_cap = 6, nr_leh = 4, capsule_ntheta = 24, capsule_nphi = 32,
h = nothing, capsule_h = nothing, wall = gold(), capsule = ablator(),
capsule_center = (0,0,0), windows = ())Cylindrical hohlraum along z, centered on TCC (dimensions in mm), with components
:wall— inner cylinder wall (radiates inward):cap_top,:cap_bottom— end-cap washers between the LEH and the wall:leh_top,:leh_bottom— laser entrance holes (apertures; their incident flux is the x-ray loss through the LEH):capsule— spherical capsule (omit withcapsule_radius = 0):window_1, … — diagnostic windows in the wall, one component perWallWindowinwindows(or the window's own name): closed windows are opaque wall patches with their own material, open ones apertures. A window with a gap is followed by its gap component:window_1_gap, ….
Laser light that strikes the outside of the wall or caps (clipping on the LEH edge) is reported as the _outside back-side loss of those components; light that leaves through an open window is :missed. The wall, caps, LEHs, windows and capsule carry their exact CylinderSurface, DiskSurface and SphereSurface, so the radiation model uses the true geometry.
With windows, the wall and end-cap meshes contain the windows' edges as grid lines (conforming_grid; the wall's axial grid gets their z edges, wall and caps share the azimuthal grid with their φ edges), so each rectangular window (and gap frame) is tiled exactly by whole patches, and the caps still meet the wall vertex for vertex. A circular window is cut the same way as a square box around it and its gap, half a wall cell wider, which is re-meshed to conform to the circles (_circular_window) and stitched to the surrounding grid at the box's own vertices. Without windows the mesh is the uniform nz × nphi grid.
Mesh size: give h (mm) to set the wall, cap and LEH counts from an element size instead (hohlraum_counts), and capsule_h for the capsule (capsule_counts); they replace the corresponding counts.
Briareus.hohlraum_counts — Method
hohlraum_counts(; length, radius, leh_radius, h) -> (; nz, nphi, nr_cap, nr_leh)Mesh counts of hohlraum for wall and end-cap elements no larger than h (mm) along either side: nz axial and nphi azimuthal (a multiple of 8, so the NIF and OMEGA port symmetries map the mesh onto itself) wall cells, nr_cap radial cap rings and nr_leh LEH rings (their sides ≤ h).
Briareus.SurfaceRegion — Type
SurfaceRegionPatches of a mesh lying on one analytic surface, as found by fit_surfaces:
kind::plane,:cylinder,:coneor:spheresurface: the fittedCylinderSurface,ConeSurfaceorSphereSurface(nothingfor a plane)centroid: area-weighted centroid of the patches (mm)normal: a plane's unit normal, on the side most of its area faces (zero for curved surfaces)patches: indices of the patches in the mesharea: total area of the patches (mm², flat facets)rms,maxdev: rms and largest distance of the patches' vertices from the surface (mm)facing: for curved surfaces,-1when every patch faces the axis or center (the inside of a hohlraum wall or of a cone),+1when every patch faces away from it,0when mixed; for planes+1, or0when some patches face the other way
Briareus.curved_components — Method
curved_components(component; kinds = (:cylinder, :cone, :sphere), regions = nothing,
maxradius = Inf, minfraction = 0.0, kwargs...) -> Vector{Component}
curved_components(components; kwargs...) -> Vector{Component}
curved_components(target; kwargs...) -> TargetThe component split into one component per cylinder, cone or sphere that fit_surfaces finds in its mesh (other keywords are passed on to it; or give its regions), each carrying its fitted CylinderSurface, ConeSurface or SphereSurface, and the rest: <name>/cyl1, <name>/cyl2, …, <name>/cone1, …, <name>/sph1, …, by decreasing area, then <name>/rest with the other patches (planes and unrecognized faces). Material, kind and sidedness are the component's. For a remeshed CAD part pass the facets it was remeshed from as reference (see fit_surfaces). A component that already has a surface, or in which no curved region is found, is returned unchanged.
maxradius and minfraction leave regions in the rest: those whose radius of curvature (R/cos θ on a cone of half-angle θ) exceeds maxradius times the part's extent (its bounding-box diagonal), and those of less than minfraction of the part's area. Gently curved CAD faces that are neither planar nor free-form within the fit's tolerance (radii of tens to hundreds of mm on a hohlraum half) otherwise each become a component of their own; their flat elements are close to exact (the sagitta of an element of size h is h²/8R).
The radiation model then integrates over the true curved surface, as it does for the primitive hohlraum: each element's sub-triangle points are projected onto the surface with exact curved-patch areas, whatever the element's shape (the compact, many-triangle elements of remesh_mesh included), and the facets of a cylinder, cone or sphere no longer occlude pairs of points inside it. Ray casting keeps the facets. Planar regions are not given a surface: flat elements are already exact there (DiskSurface describes polar-sector elements of primitive end caps, not general planar CAD faces).
A region of a CAD part is named by its part and kind, so elements(target, :part) no longer exists after the split; collect elements(target, n) over the names starting with the part's.
Briareus.fit_surfaces — Method
fit_surfaces(mesh; reference = nothing, kinds = (:plane, :cylinder, :cone, :sphere),
rtol = 1e-3, atol = 1e-4, angle = 30.0, minpatches = 6, minarea = 0.0,
tol = 1e-9) -> Vector{SurfaceRegion}Regions of mesh whose patches lie on one plane, cylinder (any axis), cone or sphere, by decreasing area; patches in no region are on none of them (fillets, free-form faces, patches straddling two faces). Use it on imported CAD (raw facets or after remesh_mesh), then curved_components to give the curved regions their exact surface for the radiation model.
A patch belongs to a surface when every one of its vertices lies within max(atol, rtol min(R, L)) mm of it (R the radius of curvature, R/cos θ on a cone of half-angle θ; L the region's extent; atol for a plane: CAD planes are flat to round-off) and its normal is within angle degrees of the surface normal at its centroid (either side: windings do not matter). Regions grow from seed patches, by decreasing area, over patches that share a vertex (welded by position to tol times the mesh's extent), nearest first, refitting by least squares as they grow: planes by principal components, spheres by an algebraic fit, cylinders by the axis the patch normals are perpendicular to and a circle fit across it, cones by the axis the normals make a constant angle with (or the cylinder's, for a small patch) and an algebraic fit of the radius linear along it, all refined by Gauss–Newton on the vertex distances. A cone whose apex lies over 1000 extents away is left to the cylinder, as a surface whose radius of curvature does is left to the plane. From each seed all kinds are grown and the largest region kept, the earlier of plane, cylinder, cone, sphere when within 1% of the largest: a narrow band with vertices only on its two rims fits a sphere as well, and a cone too when its rims differ in radius (the bore of an entrance hole is a cylinder, a conical shield tessellated as one band a cone: a tessellator puts rings of vertices inside a spherical zone that bulges beyond its chord tolerance). Only regions with at least minpatches patches and minarea mm² whose rms distance is under a quarter of the tolerance count: on a true surface the residual is the faceting, well inside the tolerance, while a fit to a free-form face (a fillet, a torus) grows until the tolerance stops it (rms about 0.4 of it), so such patches stay unfitted. Regions of one kind whose patches all lie on each other's fits (one surface interrupted by another face) are then merged.
The tolerance must exceed the faceting several times over. Facet vertices of exported CAD lie on the true surface, but points remesh_mesh adds on a facet lie up to w²/8R inside a curved one (w the facet's width: 0.1 µm for 50 µm strips on a 2.9 mm wall, 5 µm for 0.3 mm strips), more than the tolerance allows once w exceeds ~0.08 R. So give the facets the mesh was remeshed from as reference: the regions are then fitted on them, and each patch of mesh joins the region whose surface all its vertices lie within that tolerance plus the largest distance of the region's facets from it (and whose bounding box holds them), with its normal within angle. The regions returned index the patches of mesh, with their rms and largest distances from the (reference) fit.