This video is taken from the Scripting Learning Track on Ansys Innovation Courses.
Transcript
A typical simulation workflow broadly consists of three steps.
First, set up simulation by adding simulation objects such as structures, simulation region,
sources and monitors and then setting up their properties.
Next, run the simulation and finally analyze the results.
You can do this all manually by clicking the relevant menus and entering the parameter
values.
Or you can make use of scripts to automate these same actions.
To add simulation objects, you can use 'add' commands associated with the specific objects
of your interest.
For example, addring for ring structure, addfdtd for fdtd simulation region, addplane for planewave
source, and addpower for frequency-domain field and power monitor.
To set the properties of objects, use the 'select' and 'set' commands to specify the
values of various parameters associated with the object.
To get these properties, use 'get' command instead.
To run the simulation, you can use 'run' command.
For sweep objects, you can use 'runsweep'
After running the simulation, you can use getresult, getdata, getelectric, transmission,
etc to retrieve various simulation results in various formats.
There are also a lot of script commands that does not fall into a specific stage of the
workflow.
To name a few, there are commands for manipulating variables, operators, functions and loop and
conditional statements.
When properly used in conjunction with the previously introduced workflow-related commands,
these script commands can help you to create a more complicated simulation settings/workflows
and to do a more advanced analysis of your simulation results.