Structure and Scene
This page discusses scenes and how to create physical structures in Flexcompute RF (also Flex RF).
Structure
Section titled “Structure”Physical structures are modeled as Structure objects in Flex RF. A Structure is comprised of a geometry and a medium. You can also optionally name a Structure.
# Create a PEC box structuremy_structure = Structure( geometry=Box(center=(0,0,0), size=(500, 100, 200)), medium=PECMedium(), name='My structure')Structure Overlaps
Section titled “Structure Overlaps”Structures are allowed to overlap spatially. Structure overlaps are resolved in two different ways: equal and conductor.
In equal mode, the later structure in the structure list overrides all prior structures.
In conductor mode (the default), the override priority is determined by medium, from highest to lowest: PECMedium > LossyMetalMedium > other mediums. Within each medium tier, a later structure overrides an earlier one.
Set the structure priority in TerminalComponentModeler.
# In `equal` mode, later structures override earlier.# In `conductor` mode, PEC > LossyMetalMedium > the rest.my_structure_list = [ signal_trace, substrate, ground ]
# Set priority modetcm = TerminalComponentModeler( simulation=Simulation( structures=my_structure_list, ... ), structure_priority_mode='conductor', ...)A Scene is a collection of structures and a background medium.
my_scene = Scene( structures=my_structure_list, medium=Medium(permittivity=1.0), # Background medium optional, default setting is air/vacuum)While it is currently optional to construct a Scene in a regular workflow, it can be useful to inspect the physical scene before defining any simulation settings.
As with Simulation, you can use the plot() and plot_3d() methods of Scene to visualize the scene domain.
# Plot the scene at z = 50 umfig, ax = plt.subplots(figsize=(8,6))my_scene.plot(z=50, ax=ax)plt.show()
# Plot the scene using the inline 3D viewer in Jupyter notebookmy_scene.plot_3d()You can create a base Simulation directly from a Scene using the from_scene() method.
my_sim = Simulation.from_scene( scene=my_scene, ... # Rest of Simulation settings)