#!/usr/bin/env python3 import sys import openems import numpy as np mm = 1e-3 # default unit is the meter em = openems.OpenEMS(sys.argv[1], EndCriteria = 1e-6, fmin = 0e6, fmax = 60e9) em.fsteps = 801 copper = openems.Metal(em, 'copper') sub = openems.Dielectric(em, 'substrate', eps_r=3.2) mask = openems.Dielectric(em, 'mask', eps_r=3.3) air = openems.Dielectric(em, 'air', eps_r=1.0006) foil_thickness = 0.035*mm port_length = 0.05*mm box_length = 5*mm box_width = 1.5*mm ms_width = 0.190*mm box_top = 1.5*mm # dimensions Z substrate_top = 0.102*mm foil_top = substrate_top + foil_thickness em.resolution = 50e-6 em.mesh.AddLine('z', foil_top + box_top) em.mesh.AddLine('z', -0.5*mm) # substrate start = np.array([-0.5*box_length, 0.5*box_width, 0]) stop = np.array([0.5*box_length, -0.5*box_width, substrate_top])
#!/usr/bin/env python3 import sys from scipy.constants import pi, c, epsilon_0, mu_0, mil, inch mm = 0.001 import openems import openems.lpf import numpy as np em = openems.OpenEMS('lpf_6') em.end_criteria = 1e-6 em.fmin = 1e6 em.fmax = 20e9 em.fsteps = 1601 fc = 6e9 sub = openems.Dielectric(em, 'fr408', eps_r=3.66, tand=0.012, fc=fc) foil_thickness = 0.035 * mm substrate_thickness = 6.6 * mil ms_air_above = 1.0 * mm z = [0.0, substrate_thickness, substrate_thickness + foil_thickness] em.mesh.AddLine('z', z[2] + ms_air_above) from math import sqrt em.resolution = c / (em.fmax * sqrt(3.0)) / 100.0 lpf = openems.lpf.generate(em, sub=sub, z=z, port_length=0.1 * mm,
#!/usr/bin/env python3 import sys import openems import openems.LPF_DGS_bowtie import numpy as np em = openems.OpenEMS('LPF_DGS_bowtie_7', EndCriteria = 1e-5, fmin = 0e6, fmax = 30e9, fsteps = 1601) em.resolution = [50e-6, 50e-6, 500e-6] fc = 6e9 foil_thickness = 35e-6 substrate_thickness = 100e-6 z = np.zeros(6) z[1] = 1.6e-3 z[2] = z[1] + foil_thickness z[3] = z[2] + substrate_thickness z[4] = z[3] + foil_thickness z[5] = z[4] + 1.6e-3 openems.LPF_DGS_bowtie.generate( em, sub = openems.Dielectric(em, 'polyimide', eps_r=3.2, tand=0.002, fc=fc), mask = openems.Dielectric(em, 'soldermask', eps_r=3.3, tand=0.020, fc=fc), min_width = 152e-6, cutout_width = 1.0e-3, inductors = 0.15e-3 + 1.55*np.array([1.7e-3, 1.96e-3, 2e-3]), capacitors = 1.45*np.array([0.47e-3, 0.77e-3, 0.81e-3, 0.82e-3]), z = z, port_length = 75e-6,
#!/usr/bin/env python3 # Common SMA edge launch to OSHPark 4 layer import sys from scipy.constants import mil import openems import numpy as np em = openems.OpenEMS('sma_el', EndCriteria=1e-6, fmin=0, fmax=20e9, fsteps=1001) em.resolution = 8e-5 copper = openems.Metal(em, 'copper') copper_shield = openems.Metal(em, 'copper_shield') sub = openems.Dielectric(em, 'ro4350b', eps_r=3.66, tand=0.0035, fc=em.fmax) teflon = openems.Dielectric(em, 'teflon', eps_r=2.1, tand=0.0002, fc=em.fmax) foil_thickness = 35e-6 substrate_thickness = 62 * mil - 7 * mil port_length = 300e-6 box_length = 10e-3 box_width = 6e-3 box_height = 6e-3 ms_width = 1.0e-3 board_gap = 0.0 # coax coax_scale = 2.0 pin_diameter = 0.5e-3 * coax_scale dielectric_diameter = 1.67e-3 * coax_scale
#!/usr/bin/env python3 import sys import openems from openems import wilkinson em = openems.OpenEMS('wilkinson_3', EndCriteria=1e-4, fmin=0e6, fmax=6e9, fsteps=400) fc = 1e9 sub = openems.Dielectric(em, 'fr408', eps_r=3.3, tand=0.012, fc=fc) foil_thickness = 35e-6 substrate_thickness = 180e-6 ms_air_above = 700e-6 z = [0.0, substrate_thickness, substrate_thickness + foil_thickness] em.mesh.AddLine('z', z[2] + ms_air_above) em.resolution = 50e-6 wilkinson.generate(em, y1=5e-3, y2=500e-6, r=200e-6, rv=[None, 100], w=[150e-6] * 4, substrate=sub, z=z, port_length=100e-6,
#!/usr/bin/env python3 import sys from scipy.constants import pi, c, epsilon_0, mu_0, mil, inch mm = 0.001 import openems import openems.miter import numpy as np em = openems.OpenEMS('miter_6.6') em.end_criteria = 1e-6 em.fmin = 0 em.fmax = 40e9 em.fsteps = 1601 fc = 40e9 pec = openems.Metal(em, 'pec') sub = openems.Dielectric(em, 'ro4350b', eps_r=3.66, tand=0.0035, fc=fc) foil_thickness = 0.033*mm substrate_thickness = 6.6*mil ms_air_above = 1.0*mm z = [0.0, substrate_thickness, substrate_thickness + foil_thickness] em.mesh.AddLine('z', z[2] + ms_air_above) em.resolution = 50e-6 openems.miter.generate( em, pec, sub, miter = 0.35 * mm, z = z,
#!/usr/bin/env python import sys from scipy.constants import pi, c, epsilon_0, mu_0, mil, inch mm = 0.001 import openems import numpy as np em = openems.OpenEMS('bend', fmin=1e6, fmax=110e9) em.end_criteria = 1e-6 em.fsteps = 1601 em.boundaries = "'PEC' 'PEC' 'PEC' 'PEC' 'PEC' 'PEC'" fc = em.fmax #em.add_lossy_metal('copper', frequency=fc) em.add_metal('copper') em.add_metal('pec') em.add_dielectric('alumina', eps_r=9.8) em.add_dielectric('is680', eps_r=3.0).set_tanD(0.0035, freq=fc) f_max = em.fmax foil_thickness = 0.035 * mm substrate_thickness = 20 * mil / 4 ms_air_above = 2.0 * mm / 4 port_length = 0.3 * mm / 4 box_length = 4 * mm / 4 box_width = 4 * mm / 4 ms_width = 1.1 * mm / 4 notch = 0.9 * mm / 4 # dimensions Z substrate_bottom = 0.0 substrate_top = substrate_bottom + substrate_thickness foil_top = substrate_top + foil_thickness
#!/usr/bin/env python import sys from scipy.constants import pi, c, epsilon_0, mu_0, mil, inch mm = 0.001 import openems import openems.idbpf import numpy as np em = openems.OpenEMS('idbpf_b3', fmin=1e6, fmax=16e9) em.end_criteria = 1e-10 em.fsteps = 1601 fc = 7.12e9 eps_r = 3.66 #em.add_lossy_metal('copper', frequency=fc, conductivity=56e6/3, ur=1.0) openems.Metal(em, 'copper') openems.Metal(em, 'pec') #em.via_offset_x = 5*mil #em.via_offset_y = 5*mil openems.Dielectric(em, 'sub', eps_r=eps_r).set_tanD(0.0035, freq=fc) foil_thickness = 0.035 * mm substrate_thickness = 22 * mil ms_air_above = 2.0 * mm via = 0.3 * mm via_pad = 0.6 * mm # dimensions Z substrate_bottom = 0.0 substrate_top = substrate_bottom + substrate_thickness foil_top = substrate_top + foil_thickness
#!/usr/bin/env python3 import sys mm = 0.001 # mm in meters mil = 25.4e-6 # mil in meters import openems import openems.geometries import numpy as np em = openems.OpenEMS('via_1_3_oshpark', EndCriteria=1e-4, fmin=0e6, fmax=40e9, boundaries=['PEC', 'PEC', 'PEC', 'PEC', 'PEC', 'PEC'], fsteps=801) copper = openems.Metal(em, 'copper') pcopper = openems.Metal(em, 'pcopper') sub1 = openems.Dielectric(em, 'substrate', eps_r=3.2) sub2 = openems.Dielectric(em, 'substrate', eps_r=4) sub1t = 0.166 * mm sub2t = 47 * mil ifoil = 0.0125 * mm ofoil = 0.035 * mm port_length = 0.1 * mm box_length = 5 * mm box_width = 2 * mm sl_width = 0.24 * mm ms_width = 0.35 * mm airspace = 1 * mm
#!/usr/bin/env python3 import sys import openems from openems import wilkinson em = openems.OpenEMS('wilkinson_1', EndCriteria=1e-4, fmin=0e6, fmax=5e9, fsteps=1601) fc = 1e9 sub = openems.Dielectric(em, 'ro4350b', eps_r=3.66, tand=0.012, fc=fc) foil_thickness = 35e-6 substrate_thickness = 180e-6 ms_air_above = 700e-6 z = [0.0, substrate_thickness, substrate_thickness + foil_thickness] em.mesh.AddLine('z', z[2] + ms_air_above) em.resolution = 50e-6 wilkinson.generate(em, y1=5.5e-3, y2=500e-6, r=200e-6, rv=[None, None, None, 100], w=[175e-6] * 4, substrate=sub, z=z, port_length=100e-6,
#!/usr/bin/env python3 import sys mm = 0.001 import openems import openems.geometries import numpy as np em = openems.OpenEMS('vert_connector_ms_oshpark', EndCriteria = 1e-5, fmin = 0e6, fmax = 50e9, boundaries = ['PEC', 'PEC', 'PEC', 'PEC', 'PML_12', 'PEC']) em.fsteps = 1601 copper = openems.Metal(em, 'copper') pcopper = openems.Metal(em, 'pcopper') sub1 = openems.Dielectric(em, 'substrate', eps_r=3.2) sub2 = openems.Dielectric(em, 'substrate', eps_r=4.0) sub1t = 0.19*mm sub2t = 1.0*mm ifoil = 0.0125*mm ofoil = 0.035*mm port_length = 0.1*mm box_length = 2*mm box_width = 2*mm ms_width = 0.42*mm airspace = 1*mm via_pad = 0.5*mm via_clearance = 0.275*mm bt = sub1t + ofoil bb = -1*(ofoil+sub2t+sub1t)
#!/usr/bin/env python3 import sys from scipy.constants import pi, c, epsilon_0, mu_0, mil, inch mm = 0.001 import openems import openems.idbpf_tapped import numpy as np idx = int(sys.argv[1]) name = 'idbpf_{}'.format(idx) fmax = [0, 0, 0, 8e9, 8e9, 10e9, 12e9][idx] em = openems.OpenEMS(name, fmin=0, fmax=fmax, fsteps=400, EndCriteria=1e-5) fc = [0, 0, 0, 3e9, 4e9, 5e9, 6e9][idx] pec = openems.Metal(em, 'pec') sub = openems.Dielectric(em, 'sub', eps_r=3.3, tand=0.012, fc=fc) foil_thickness = 0.04 * mm substrate_thickness = 0.18 * mm ms_air_above = 1.0 * mm via = 0.4 * mm via_pad = 0.8 * mm # dimensions Z substrate_bottom = 0.0 substrate_top = substrate_bottom + substrate_thickness foil_top = substrate_top + foil_thickness em.mesh.AddLine('z', foil_top + ms_air_above) em.resolution = [0.1 * mm, 0.04 * mm, 0.5 * mm] rl = [0, 0, 0, 14.4 * mm, 10.8 * mm, 8.5 * mm, 7.1 * mm][idx]
#!/usr/bin/env python3 import sys from scipy.constants import pi, c, epsilon_0, mu_0, mil, inch mm = 0.001 import openems import openems.lpf import numpy as np em = openems.OpenEMS('lpf_13') em.end_criteria = 1e-6 em.fmin = 1e6 em.fmax = 30e9 em.fsteps = 1601 fc = 13e9 sub = openems.Dielectric(em, 'fr408', eps_r=3.66, tand=0.012, fc=fc) foil_thickness = 0.035 * mm substrate_thickness = 6.6 * mil ms_air_above = 1.0 * mm z = [0.0, substrate_thickness, substrate_thickness + foil_thickness] em.mesh.AddLine('z', z[2] + ms_air_above) em.resolution = 50e-6 wide = 1.1 * mm narrow = 0.11 * mm lpf = openems.lpf.generate(em, sub=sub, z=z, port_length=0.1 * mm, ms_width=0.36 * mm,
#!/usr/bin/env python3 import sys from scipy.constants import pi, c, epsilon_0, mu_0, mil mm = 0.001 import openems import numpy as np em = openems.OpenEMS('line', EndCriteria = 1e-6) em.fmin = 1e6 em.fmax = 40e9 em.fsteps = 1601 fc = 40e9 pec = openems.Metal(em, 'pec') sub = openems.Dielectric(em, 'fr4', eps_r=3.9, tand=0.0035, fc=fc) foil_thickness = 0.6*mil substrate_thickness = 0.2*mm ms_air_above = 0.36*mm port_length = 0.1*mm box_length = 10*mm box_width = 1*mm ms_width = 0.2*mm # dimensions Z substrate_bottom = 0.0 substrate_top = substrate_bottom + substrate_thickness foil_top = substrate_top + foil_thickness from math import sqrt em.resolution = c/(em.fmax*sqrt(3.0))/100.0 # substrate start = np.array([0.5*box_length, 0.5*box_width, substrate_bottom])