Running simulation

Running simulation

Important

Make sure that you have initialised the virtual environment following these instructions.

Options

These are the arguments for gerber2ems

OptionDescription
-h --helpPrints the help message.
--config [file]Specifies the location of the simulation configuration file.
default: ./simulation.json
-i [dir] --input [dir]Specifies the directory containing the exported Gerber, drill and simulation port files.
default: ./fab
-o [dir] --output [dir]Specifies the location of the: geometry data, simulation results, export E-fields, and post processed graphs.
default: ./ems
-c --convertConvert Gerber files to images.
-g --geometryCreate geometry files for openEMS.
-s --simulateRun openEMS simulation.
-p --postprocessProcess openEMS results into S parameters and impedance values and saves them to a csv file.
-r --renderRenders graph of processed data.
-a --allRun convert, geometry, simulate, and postprocess steps.
--ef --export-fieldFlag to enable exporting field data if specified in layer config.
-t [threads] --threads [threads]Number of threads that openEMS simulation will use.
default: auto
-d --debugFlag to enable debug level logging output.
-l [level] --log [level]Set logging level: [DEBUG, INFO, WARNING, ERROR].
default: INFO

Explanation

These are the following steps taken to go from your exported PCB files to graphs.

StepDescription
ConvertGerber files are converted into images using gerbv.
GeometryPCB image files, via drills, simulation port and PCB stackup configuration are read to produce a single geometry.xml file.
SimulationopenEMS imports the geometry.xml file and simulation configuration to produce E-field data (if exported) and time domain port measurements for each excitation source.
PostprocessingopenEMS data is processed into S-parameters, impedance values (for signal traces and differential traces), and graphs are generated for each of these accordingly

Examples

Consider an example where our directory has:

Run entire pipeline and output to default location
gerber2ems -a
Run entire pipeline and input/output from custom locations
gerber2ems --config "custom_simulation.json" -i "custom_fab/" -o "custom_results/" -a
Run convert to images pass only
gerber2ems -c
Run geometry pass only
gerber2ems -g
Run simulation pass only
gerber2ems -s
Run postprocessing results only
gerber2ems -p
Run graph rendering only
gerber2ems -r
Run simulation with custom number of threads
gerber2ems -a --threads 16
Run simulation and export field data
gerber2ems -a --export-field