REMI Lab
OPEN KNOWLEDGE / TOOLS

API Reference

이 페이지의 내용

These pages describe the rfx API you should build on: the Simulation class, its add_*, run() and calculator methods, and the result objects they return. Each entry gives the signature, what it does, the key arguments and what it returns. For every public symbol, including lower-level helpers, see the generated reference.

Pages

PageCovers
Simulationthe constructor, preflight, run(), forward(), Simulation.auto()
Results & Observablesprobes, flux monitors, DFT planes, NTFF, snapshots; Result, ForwardResult and the S-parameter result objects
Geometry & Materialsadd_material, dispersive poles, shapes, CAD import, metal sheets
Sources & Portswaveforms, sources, the four port families, lumped R/L/C, the S-parameter calculators
Automationplan_mesh, auto_configure, graded-profile builders
Support Boundarieswhat is supported, limited, experimental or refused

Conventions

  • Import from the top-level package: from rfx import Simulation, Box, GaussianPulse.
  • Units are SI: lengths in metres, frequencies in hertz, time in seconds, conductivity in S/m, impedance in ohms.
  • Positions are physical coordinates measured from the domain’s lower corner, which is the inner edge of the absorber, not grid indices.
  • add_* methods return the simulation, so they can be chained.
  • S-parameter matrices are indexed S[receiver_port, driven_port, freq_index].
  • A combination rfx does not implement raises an error. It is not silently skipped.

Minimal example

from rfx import Box, GaussianPulse, Simulation
sim = Simulation(freq_max=5e9, domain=(0.04, 0.03, 0.03), dx=2e-3,
boundary="cpml", cpml_layers=6)
sim.add_material("slab", eps_r=3.0, sigma=0.01)
sim.add(Box((0.018, 0.0, 0.0), (0.024, 0.03, 0.03)), material="slab")
sim.add_source((0.010, 0.015, 0.015), "ez",
waveform=GaussianPulse(f0=3e9, bandwidth=0.8),
amplitude_kind="current")
sim.add_probe((0.030, 0.015, 0.015), "ez")
result = sim.run(n_steps=300)
print(result.time_series.shape, f"{result.settling_db:.1f} dB")

Quick Start walks through the same steps, and Core Concepts explains the choices behind them.

Back to top ↑