Geometry and Materials
Geometry should stay explicit in public examples. The documented API includes the shapes and named materials below. An available constructor alone does not establish RF accuracy; pair it with a configuration listed in Recommended Configuration and Support Boundaries.
Shapes
Section titled “Shapes”| Shape | Signature | Typical use |
|---|---|---|
Box | Box(corner_lo, corner_hi) | substrates, ground planes, patch metal, dielectric blocks |
Sphere | Sphere(center, radius) | resonators, scatterers, simple inclusions |
Cylinder | Cylinder(center, radius, height, axis="z") | vias, posts, cylindrical inclusions |
PolylineWire | polyline-defined wire geometry | wire-like studies and routed conductors |
Via | Via(center=..., drill_radius=..., pad_radius=..., layers=..., material="pec") | PCB-style interconnects |
CurvedPatch | CurvedPatch(center=..., length=..., width=..., radius=..., axis="x") | curved-conductor studies; constructor arguments are keyword-only |
MeshShape | MeshShape.from_file(path, scale=..., translate=(0,0,0)) | CAD import — STL/OBJ/PLY, plus STEP/STP via the cad extra. Rasterizes host-side (trimesh containment): NOT differentiable — a traced coordinate raises, so CAD geometry cannot carry gradients |
Material registration
Section titled “Material registration”from rfx import DebyePole, LorentzPole
sim.add_material("fr4", eps_r=4.3, sigma=0.02)sim.add_material("resistive_medium", sigma=5.0e5)sim.add_material( "custom_dielectric", eps_r=6.0, debye_poles=[DebyePole(delta_eps=12.0, tau=9.4e-12)],)Material arguments
Section titled “Material arguments”| Argument | Meaning | Notes |
|---|---|---|
eps_r | relative permittivity | default is 1.0 |
sigma | conductivity | lossy dielectrics and below-threshold conductors; sigma >= 1e6 S/m is represented by the PEC mask |
mu_r | relative permeability | default is 1.0 |
debye_poles | dispersive Debye terms | DebyePole(delta_eps, tau) |
lorentz_poles | dispersive Lorentz terms | LorentzPole(omega_0, delta, kappa) |
chi3 | third-order nonlinearity | specialized nonlinear-material workflows |
Materials such as the built-in "copper" and "aluminum" have conductivity
above the 1e6 S/m threshold and therefore behave as PEC in the compiled grid;
their bulk skin depth and ohmic loss are not resolved. Use
add_thin_conductor(...) when a subcell sheet model is appropriate. That helper
also maps sigma_bulk >= 1e6 S/m (including its default copper value) to PEC;
a finite sheet resistance requires an explicitly justified
sigma_bulk < 1e6 S/m. Use a below-threshold volumetric conductivity only when
its cells and loss model match the intended physical approximation.
Configuration limits
Section titled “Configuration limits”Geometry and materials are covered only when paired with a documented boundary, source or port, mesh, and observable combination. Check Support Boundaries before reporting RF accuracy for a structure that uses a limited configuration.