setup_simulation#
- simpleEMS.sim_tools.setup_simulation(params: SimParams, FDTD_boundary: list[str] | None = None) SimSetup#
Build the CSXCAD geometry container and configure the openEMS/FDTD (or FEM) solver from a parameter object.
Creates the
ContinuousStructureandopenEMSobjects, applies the boundary conditions and Gaussian excitation derived fromparams.freq_range, and (for the FEM backend) carriesparams.fem_optionsthrough to the returnedSimSetup, which is passed to most otherSimToolsmethods.- Parameters:
params (SimParams) – Parameter object that holds all simulation parameters, including
freq_range,num_points,FDTD_timestep,FDTD_end_criteria,backend_engine, the flatFEM_*mesh/solver tuning fields (includingFEM_num_solve_points), andcharac_imp.FDTD_boundary (list[str], optional) – Six openEMS boundary-condition strings, one per box face in the order
[xmin, xmax, ymin, ymax, zmin, zmax]. Only used by the FDTD backend. Defaults to["PML_8"] * 6.
- Returns:
Named tuple with
CSX(CSXCAD geometry),FDTD(openEMS FDTD object),freqs(frequency array),backend_engine,FEM_options(Nonefor FDTD), andcharac_imp.- Return type:
SimSetup