示例#1
0
def sim_impedance(sim: Simulation):
    """
    Get the characteristic impedance of a simulation.
    """
    sim.run(csx=False)
    ports = sim.ports
    z0 = ports[0].impedance()
    idx = array_index(sim.center_frequency(), sim.freq)
    return np.abs(z0[idx])
示例#2
0
from pyems.boundary import BoundaryConditions

freq = np.arange(4e9, 18e9, 1e7)
unit = 1e-3
sim = Simulation(
    freq=freq,
    unit=unit,
    boundary_conditions=BoundaryConditions(
        (("PML_8", "PML_8"), ("PML_8", "PML_8"), ("PML_8", "PML_8")), ),
)

dielectric = common_dielectrics["PTFE"]
length = 50
coax_rad = mil_to_mm(190 / 2)  # RG-141
core_rad = (coax_core_diameter(
    2 * coax_rad, dielectric.epsr_at_freq(sim.center_frequency())) / 2)

Coax(
    sim=sim,
    position=Coordinate3(0, 0, 0),
    length=length,
    radius=coax_rad,
    core_radius=core_rad,
    shield_thickness=mil_to_mm(5),
    dielectric=dielectric,
    propagation_axis=Axis("x"),
    port_number=1,
    excite=True,
    feed_shift=0.3,
    ref_impedance=50,
)