Layer-Based Grid Refinement
Layer-based grid refinement targets thin, planar structures such as PCB traces,
ground planes, and laminate layers. Use
LayerRefinementSpec
to refine the grid near metallic corners and edges inside a specified layer.
from flex_rf.tidy3d import GridRefinement, GridSpec, LayerRefinementSpec
layer_refinement = LayerRefinementSpec( axis=2, center=(0, 0, 0), size=(3, 2, 0.1), min_steps_along_axis=2, corner_refinement=GridRefinement(dl=100, num_cells=2),)
grid_spec = GridSpec( # Other grid settings. layer_refinement_specs=[layer_refinement],)More than one LayerRefinementSpec can be used. Use separate specs for
structures on different physical layers.
Convenience Constructors
Section titled “Convenience Constructors”LayerRefinementSpec can be constructed from explicit layer bounds or from
existing structures. The structure-based constructor is useful when the layer
position, size, and normal axis should be inferred from geometry.
from flex_rf.tidy3d import LayerRefinementSpec
trace_refinement = LayerRefinementSpec.from_structures( structures=[my_planar_structure], min_steps_along_axis=2,)Related API Symbols
Section titled “Related API Symbols”| Symbol | Purpose |
|---|---|
LayerRefinementSpec | Defines a layer where grid snapping and refinement are applied. |
CornerFinderSpec | Configures corner detection on a 2D plane. |
GridRefinement | Defines local refinement step size and cell count. |
GridSpec | Collects grid settings for a simulation. |
Related Pages
Section titled “Related Pages”| Page | Why open it |
|---|---|
| RF Material Models | Configure metals and dielectrics used in refined layers. |
| Lumped Ports and Elements | Add lumped ports and elements to planar RF layouts. |