Regarding Boundary setting on FDTD using python API

felix0616felix0616 Member Posts: 2

Currently, I am having difficulties on setting the PML boundaries respectively for each end, as PML settings is given as a table, while using tuples only allow one variable and one input.


Is there any way to alter settings, say y max bc PML conditions, respectively using python API?


Thank you

Answers

  • gsungsun Posts: 729Ansys Employee

    Hi, Felix,

    Did you write your own code in the first screenshot? Do you want to set the PML all the same, or you want to specify it for each direction? It seems the the x,y PML BCs have been set correctly. Could you please try to modify the script as you expect, and let us know what the error message it shows? you can find all the parameters for script settings by type ?setnamed("FDTD"), here is the list:

     ?setnamed("FDTD");

    allow grading in x

    allow grading in y

    allow grading in z

    allow symmetry on all boundaries

    always use complex fields

    angle phi

    angle theta

    auto shutoff max

    auto shutoff min

    background material

    bfast alpha

    bfast dt multiplier

    bloch units

    checkpoint at shutoff

    checkpoint during simulation

    checkpoint period

    conformal meshing refinement

    define x mesh by

    define y mesh by

    define z mesh by

    dimension

    direction

    down sample time

    dt

    dt stability factor

    dx

    dy

    dz

    enabled

    extend structure through pml

    force symmetric x mesh

    force symmetric y mesh

    force symmetric z mesh

    global monitor custom frequency samples

    global monitor frequency center

    global monitor frequency points

    global monitor frequency span

    global monitor maximum frequency

    global monitor maximum wavelength

    global monitor minimum frequency

    global monitor minimum wavelength

    global monitor sample spacing

    global monitor use source limits

    global monitor use wavelength spacing

    global monitor wavelength center

    global monitor wavelength span

    global source bandwidth

    global source center frequency

    global source center wavelength

    global source eliminate discontinuities

    global source frequency

    global source frequency span

    global source frequency start

    global source frequency stop

    global source offset

    global source optimize for short pulse

    global source pulse type

    global source pulselength

    global source set frequency

    global source set time domain

    global source set wavelength

    global source wavelength span

    global source wavelength start

    global source wavelength stop

    grading factor

    index

    injection axis

    kx

    ky

    kz

    max source time signal length

    mesh accuracy

    mesh cells per wavelength

    mesh cells x

    mesh cells y

    mesh cells z

    mesh frequency max

    mesh frequency min

    mesh refinement

    mesh type

    mesh wavelength max

    mesh wavelength min

    meshing refinement

    meshing tolerance

    min mesh step

    name

    nx

    ny

    nz

    override simulation bandwidth for mesh generation

    param1

    param2

    pml alpha

    pml alpha polynomial

    pml kappa

    pml layers

    pml max layers

    pml min layers

    pml polynomial

    pml profile

    pml sigma

    pml type

    same settings on all boundaries

    set based on source angle

    set process grid

    set simulation bandwidth

    simulation frequency max

    simulation frequency min

    simulation temperature

    simulation time

    simulation wavelength max

    simulation wavelength min

    snap pec to yee cell boundary

    source index

    type

    use auto shutoff

    use bfast fdtd

    use divergence checking

    use early shutoff

    use legacy conformal interface detection

    use relative coordinates

    x

    x max

    x max bc

    x min

    x min bc

    x span

    y

    y max

    y max bc

    y min

    y min bc

    y span

    z

    z max

    z max bc

    z min

    z min bc

    z span


    You can set those parameters using the code in the 1st screen image. You can also refer this link https://support.lumerical.com/hc/en-us/articles/360037824513-Python-API-overview and the related examples. The examples have python files that you can borrow for your use.

Sign In or Register to comment.