gplugins.palace.run_scattering_simulation_palace#
- gplugins.palace.run_scattering_simulation_palace(component: Component, element_order: int = 1, n_processes: int = 1, layer_stack: LayerStack | None = None, material_spec: dict[str, dict[str, float | int]] | None = None, simulation_folder: Path | str | None = None, simulator_params: Mapping[str, Any] | None = None, driven_settings: Mapping[str, float | int | bool] | None = None, mesh_refinement_levels: int | None = None, only_one_port: bool | None = True, mesh_parameters: dict[str, Any] | None = None, mesh_file: Path | str | None = None) DrivenFullWaveResults [source]#
Run full-wave finite element method simulations using Palace. Returns the field solution and resulting scattering matrix.
Note
You should have palace in your PATH.
- Parameters:
component – Simulation environment as a gdsfactory component.
element_order – Order of polynomial basis functions. Higher is more accurate but takes more memory and time to run.
n_processes – Number of processes to use for parallelization
layer_stack –
LayerStack
defining defining what layers to include in the simulation and the material properties and thicknesses.material_spec –
RFMaterialSpec
defining material parameters for the ones used inlayer_stack
.simulation_folder – Directory for storing the simulation results. Default is a temporary directory.
simulator_params – Palace-specific parameters. This will be expanded to
solver["Linear"]
in the Palace config, see Palace documentationdriven_settings –
Driven full-wave parameters in Palace. This will be expanded to
solver["Driven"]
in the Palace config, see Palace documentationmesh_refinement_levels – Refine mesh this many times, see Palace for details.
only_one_port – Whether to solve only scattering from the first port to other ports, e.g., S11, S12, S13, …
mesh_parameters – Keyword arguments to provide to
get_mesh()
.mesh_file – Path to a ready mesh to use. Useful for reusing one mesh file. By default a mesh is generated according to
mesh_parameters
.