Configuration
A single simulation configuration file in JSON
is required to for gerber2ems.
An example of a configuration file can be found here: simulation.json
Signal properties
Field | Type | Default | Description |
---|
frequency.start | float | 0.5e6 | Start frequency of Gaussian pulse in Hz |
frequency.stop | float | 10e6 | Stop frequency of Gaussian pulse in Hz |
Simulation settings
Field | Type | Default | Description |
---|
max_steps | int | None | Maximum number of simulation time steps. If nothing is provided then simulation continues until total energy in system approaches -60dB. |
margin.xy | float | 3000 | Distance of air gap around x and y axis in microns |
margin.z | float | 3000 | Distance of air gap around z axis in microns |
offset.x | float | 0 | Distance to offset port locations along x axis in millimeters |
offset.y | float | 0 | Distance to offset port locations along y axis in millimeters |
Via properties
Field | Type | Default | Description |
---|
via.filling_epsilon | float | 1 | Dielectric constant of dielectric material that fills vias |
via.plating_thickness | float | 50 | Thickness of via electro-deposited coating in microns |
PCB mesh properties
Field | Type | Default | Description |
---|
mesh | object | | |
mesh.xy | float | 200 | Distance between mesh lines along x and y axis for PCB in microns |
mesh.inter_layers | int | 5 | Number of default mesh lines along z axis for PCB in microns |
mesh.smoothing_ratio | float | 2 | Factor to ease between differently spaced mesh lines |
mesh.margin.xy | float | 200 | Distance in microns from x and y axis to add a mesh line |
mesh.margin.z | float | 200 | Distance in microns from z axis to add a mesh line |
Configuring nanomesh
- Nanomesh is the python package that converts image files into a mesh to import into
openEMS
. - Image files are generated by
gerbv
from Gerber files. - Done since we cannot directly convert Gerber files into mesh data.
- Useful links to relevant library documentation.
Field | Type | Default | Description |
---|
nanomesh | object | | |
nanomesh.threshold | int | 127 | Threshold to take for gerbv when determining regions. |
nanomesh.precision | int | 10 | Maximum distance error of each vertex position in microns. |
nanomesh.max_edge_distance | float | 10 | Maximum distance of a triangle edge in cm. |
nanomesh.minimum_angle | int | 20 | Minimum angle in triangle for entire mesh in degrees. |
nanomesh.max_triangle_area | float | 100 | Maximum area for a triangle in the mesh in cm². |
Simulation ports
- Define list of simulation ports.
- Simulation ports are labelled
SP{number}
in exported component placement file (*-pos.csv)
. - The index of the port (starting from 0) in this list corresponds to the exported simulation port.
Field | Type | Default | Description |
---|
ports | list | | |
ports.name | str | “Unnamed” | Name of port |
ports.width | float | Required | Width of port in microns |
ports.length | float | Required | Length of port in microns |
ports.impedance | float | 50 | Impedance of simulation port in ohms |
ports.layer | int | Required | Metal layer starting from top down where signal trace is (0 indexed) |
ports.plane | int | Required | Metal layer starting from top down where reference plane is (0 indexed) |
ports.excite | bool | false | Should the port be simulated with an excitation pulse? |
ports.dB_margin | float | -15 | S11 margin of port in decibels |
Differential pairs
- Define list of differential pairs based on pairs of two simulation ports.
- Automatically calculate and generate graphs for that differential pair.
- All simulation port indices start from 0.
Field | Type | Default | Description |
---|
differential_pairs | list | | |
differential_pairs.name | str | “{start_p}{stop_p}{start_n}{stop_n}” | Name of differential pair |
differential_pairs.start_p | int | Required | Index of simulation port for start of positive trace |
differential_pairs.stop_p | int | Required | Index of simulation port for end of positive trace |
differential_pairs.start_n | int | Required | Index of simulation port for start of negative trace |
differential_pairs.stop_n | int | Required | Index of simulation port for end of negative trace |
Signal traces
- Define list of signal traces based on two simulation ports.
- Automatically calculate and generate graphs for that signal trace.
- All simulation port indices start from 0.
Field | Type | Default | Description |
---|
traces | list | | |
traces.name | str | “{start}{stop}” | Name of signal trace |
traces.start | int | Required | Index of simulation port for start of trace |
traces.stop | int | Required | Index of simulation port for end of trace |
Stackup layers
- Define list of layers that make up the PCB stackup.
- Includes copper and dielectric layers.
Field | Type | Default | Description |
---|
layers | list | | |
layers.name | str | None | Name of layer |
layers.type | str | Required | Type of layer: [copper, core] |
layers.file | str | None | Name of Gerber file without extension and prefix (*-{name}.gbr ) |
layers.thickness | float | 0 | Thickness of layer in millimeters |
layers.export_field | bool | false | Export field if --export-field was provided to gerber2ems |
layers.z_mesh_count | int | None | Override the default number of z-mesh lines to add to layer |
layers.epsilon | float | Required | Dielectric constant required for dielectric layers |
layers.priority | int | Defaults | Priority of layer (higher priorities override lower priorities). By default metal layers have higher priority and override dielectric layers. |
Default material priorities
Higher priority means it overrides lower priority materials.
Name | Priority |
---|
Simulation port | 200 |
Via dielectric | 101 |
Via metal | 100 |
Metal layer | 51 |
Dielectric layer | 50 |