Setting PML properties using script commands



I’m trying to find out how to set the PML properties using commands in order to include them on a script. What would be the commands to set the PML type to custom with a given number of layers, sigma, …?

Thank you


To get the information about the parameter names related to the PML properties, you can first select the ‘FDTD’ (or ‘varFDTD’) in the object tree and enter the ‘get’ command in the command prompt:


This will show you all the list of parameters available for the selected object.
Here are some of the parameters related to the PML settings:

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

If you want to set one of these parameters, you can use the ‘set’ command as follows:

set(“pml layers”,24);

One thing you need to be aware of is that the value of these parameters can be number or string. It is obvious that the above ‘pml layers’ parameter takes a number as its value, but in some cases it can be less obvious. If in any doubt, you can check this by using a ‘get’ command as follows:

?get(“pml type”);
stretched coordinate PML

?get(“pml profile”);

You will be able to notice that the ‘pml profile’ takes 1, 2, 3, 4 in places of “standard”, “stabilized”, “steep angle”, “custom.”


Thank you very much for your reply… I’ve checked it and is working.