Skip to content

Commit

Permalink
fix heater_3d
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeGehring committed Oct 18, 2023
1 parent 50c8f0b commit ca64e6a
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions docs/julia/heater_3d.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import gdsfactory as gf
from gdsfactory.generic_tech import LAYER
from gdsfactory.pdk import LayerStack, get_layer_stack
from gplugins.gmsh.xyz_mesh import xyz_mesh
from gplugins.common.utils.get_component_with_net_layers import (
get_component_with_net_layers,
)
from gplugins.gmsh.get_mesh import get_mesh

# Choose some component
c = gf.component.Component()
waveguide = c << gf.get_component(gf.components.straight_heater_metal(length=40))
e1 = c << gf.components.straight(1, cross_section="metal3")
e1 = c << gf.components.straight(1, cross_section="xs_m3")
e1.connect(e1["e1"], waveguide["l_e1"])
e2 = c << gf.components.straight(1, cross_section="metal3")
e2 = c << gf.components.straight(1, cross_section="xs_m3")
e2.connect(e2["e1"], waveguide["r_e3"])
c.add_port("e1", port=e1["e2"])
c.add_port("e2", port=e2["e2"])
Expand All @@ -19,9 +22,10 @@

# Generate a new component and layerstack with new logical layers
layerstack = get_layer_stack()
c = layerstack.get_component_with_net_layers(
c = get_component_with_net_layers(
c,
portnames=["e1", "e2"],
layerstack,
port_names=["e1", "e2"],
delimiter="#",
)

Expand Down Expand Up @@ -57,17 +61,18 @@

resolutions = {
"core": {"resolution": 0.3},
"via2": {"resolution": 0.1},
"via1": {"resolution": 0.1},
"heater": {"resolution": 0.1},
"via2": {"resolution": 0.2},
"via1": {"resolution": 0.2},
"heater": {"resolution": 0.2},
}
geometry = xyz_mesh(
geometry = get_mesh(
type="3D",
component=c,
layerstack=filtered_layerstack,
layer_stack=filtered_layerstack,
resolutions=resolutions,
filename="mesh.msh",
default_characteristic_length=0.5,
global_3D_algorithm=10,
default_characteristic_length=2,
# global_3D_algorithm=10,
verbosity=5,
global_scaling=1e-6,
)
Expand Down

0 comments on commit ca64e6a

Please sign in to comment.