This module allows to read the FDTD-JSON format and parse it into the semba-fdtd data structures.
Assuming gfortran
and cmake
are accessible from path, this module can be compiled from the project main directory run
cmake -S . -B <BUILD_DIR> -G Ninja
cmake --build <BUILD_DIR> -j
Use the Intel provided scripts to set environment variables and use same command as for gfortran
.
Not supported. Tested to work with -O0
optimizations. Higher optimizations produce SEGFAULTs.
This project uses the googletest. Once build, from project root folder run,
<PATH_TO_BUILD>/bin/smbjson_tests
This format aims to provide a way to input data for a full FDTD simulation. Being in JSON, it can be easily navigated with most text editors, such as Visual Studio Code or Notepad++. There are also multiple tools to read and write them. This document assumes that you are familiar with the basic JSON notation, a brief explanation on this notation can be found here.
The following are examples of valid inputs:
- An empty space illuminated by a plane wave: planewave.fdtd.json. The field at a point close to the center is recorded.
- A thin straight wire illuminated by a plane wave: holland1981.fdtd.json which aims to replicate the case described in https://doi.org/10.1109/TEMC.1981.303899. It contains a probe which records the wire at the middle of the wire.
- A current injection which mimics a lightning strike on a square metallic surface: currentinjection.fdtd.json. It contains two bulk current probes to measure the current at the entry and exit lines.
- A shielded pair of wires fed by a voltage source in one of its ends: shieldedPair.fdtd.json. The interior of the shield uses a multiconductor transmission line (MTL) algorithm to evolve the common mode currents which are induced in the shield and propagated inside using a transfer impedance.
- A multiconductor transmission line network (MTLN) case which includes three cable bundles with a shared junction: mtln.fdtd.json.
All units are assumed to be SI-MKS.
Angle brackets surrounding an entry, as in <entry>
, indicate that that entry is mandatory.
Square brackets, as in [entry]
, are optional entries.
The following entries are shared by several FDTD-JSON objects and have a common description:
type
followed by a string, indicates the type of JSON object that. Some examples of types areplanewave
forsources
objects, andpolyline
forelements
.id
is a unique integer identifier for objects that belong to a list and which can be referenced by other objects. For instance, an element in theelements
list must contain aid
which can be referenced by a source insources
through its list ofelementIds
.[name]
is an optional entry which is used to make the FDTD-JSON input human-readable, helping to identify inputs and outputs.
This object must always be present and contains general information regarding the solver. It must contain the following entries:
<timeStep>
: A real number indicating the time step used by the solver, in seconds.<numberOfSteps>
: An integer for the number of steps which the solver will iterate.
Addtionally, it may contain the following optional entry:
<mtlnProblem>
: A bool indicating whether the problem is a pure MTLN problem and will solved using only the MTLN solver. If it is not present, its default value isfalse
Example:
"general": {
"timeStep": 10e-12,
"numberOfSteps": 2000
}
This specifies the boundaries which will be used to terminate the computational domain.
If boundary
is not present it defaults to a mur
absorbing condition in all bounds.
The entries within boundary
are objects labelled with the place where they will be applied:
all
, orxLower
,xUpper
,yLower
,yUpper
,zLower
zUpper
.
These objects must contain a <type>
label which can be:
-
pec
for perfectly electric conducting termination. -
pmc
for perfectly magnetic conducting termination. -
mur
for Mur's first order absorbing boundary condition. -
pml
for perfectly matched layer termination. If thistype
is selected, it must also contain:[layers]
: with an integer indicating the number of pml layers which will be used. TODO Change to an optional input which defaults to 10 layers[order]
: TODO Change to an optional input which defaults to order 2.[reflection]
: TODO Change to an optional input which defaults to 0.001 refl.
Example:
"boundary": {
"all": {
"type": "pml",
"layers": 6,
"order": 2.0,
"reflection": 0.001
}
}
All the geometrical information of the simulation case is exclusively stored by the mesh
object. It is a JSON object which contains three objects: a <grid>
, a list of [coordinates]
and a list of [elements]
.
"mesh": {
"grid": { ... },
"coordinates": [ ... ],
"elements": [ ... ]
}
The grid
object represents a collection of rectangular cuboids or cells which tessellate the space to form a structured mesh. This object is defined with the following entries:
<numberOfCells>
is an array of three positive integers which indicate the number of cells in each Cartesian direction.<steps>
is an object which contains three arrays, labeled with<x>
,<y>
and<z>
which represent the cell sizes, expressed in meters, in that direction. Each array may contain a single real to define a regular grid; or, alternatively, a number of reals equal to the number of cells to define a rectilinear grid.
The following example describes a regular grid with
"mesh": {
"grid": {
"numberOfCells": [20, 20, 22],
"steps": { "x": [0.1], "y": [0.1], "z": [0.1] }
}
}
This is an array of objects which represent Cartesian coordinates within the grid. Each object of the array must contain the following entries:
<id>
: an integer number that must be unique within this array.<relativePosition>
: Containing an array of 3 numbers which can be integers or reals. The whole part of the number indicates the cell and the fractional part indicates the fractional position within that cell.
Example: The following figure represents a grid with the numbers of the cells marked in light gray. The third dimension is ignored for clarity. The two coordinates (blue) represent positions in the grid. Note that coordinate 2 has a fractional position in the
"mesh": {
"grid": {
"numberOfCells": [8, 5, 1],
"steps": { "x": [0.1], "y": [0.1], "z": [0.1] }
}
"coordinates": [
{"id": 1, "relativePosition": [2, 2, 0]},
{"id": 2, "relativePosition": [3.4, 1, 0]}
]
}
The elements
entry contains an array of JSON objects, each of which represents a geometrical entity. Within the context of this format specification, an element can be a relatively simple entity such as node
or a polyline
, but it can also be a much more complex geometrical entity such as a cell
. An element objects must contain the entries
-
<id>
formed by an integer which uniquely identifies it within theelements
array. -
<type>
which can be one of the following:node
, representing a point in space. Elements with this type include a<coordinateIds>
entry which is an array of a single integer representing theid
of a coordinate and which must exist in the within themesh
coordinates
list.polyline
, representing an oriented collection of segments. It must contain a list<coordinateIds>
with at least two coordinates.cell
, containing a list of one or more<intervals>
defined following the interval convention.
Below there is an example of a mesh object which includes several types of elements.
"mesh": {
"grid": {
"numberOfCells": [20, 20, 22],
"steps": { "x": [0.1], "y": [0.1], "z": [0.1] }
},
"coordinates": [
{"id": 1, "relativePosition": [11, 11, 7]},
{"id": 2, "relativePosition": [11, 11, 12]},
{"id": 3, "relativePosition": [11, 11, 17]}
],
"elements": [
{"id": 1, "type": "node", "coordinateIds": [2]},
{"id": 2, "type": "polyline", "coordinateIds": [1, 2, 3] },
{"id": 3, "type": "cell", "intervals": [ [ [1, 1, 1], [19, 19, 21] ] ] }
]
}
A interval
is defined by a pair of two triplets of integer numbers
-
A point is defined when
$\mathbf{a} = \mathbf{b}$ , i.e. the intersection of three grid planes. Points have no orientation. -
An oriented line is defined when the interval has the same initial and ending values in all directions except one, for instance
$a_x \neq b_x$ . In this case there are two possibilities:- when
$(b_x - a_x) > 0$ , the line is oriented towards$+\hat{x}$ . - when
$(b_x - a_x) < 0$ , the line is oriented towards$-\hat{x}$ .
- when
-
An oriented surface is defined when one initial and ending value is the same and the other two are different, e.g.
$a_x = b_x$ ,$a_y \neq b_y$ ,$a_z \neq b_z$ . In this case there are four possibilities:- when the
$(b_y - a_y) > 0$ and$(b_z - a_z) > 0$ , the surface normal is assumed to be oriented towards$+\hat{x}$ . - when the
$(b_y - a_y) < 0$ and$(b_z - a_z) < 0$ , the surface normal is assumed to be oriented towards$-\hat{x}$ . - The other two cases, in which there is a mix of positive and negative signs, are undefined.
- when the
-
A volume is defined when each component of
$\mathbf{a}$ is strictly smaller than the corresponding component in$\mathbf{b}$ for each direction, i.e.$a_x < b_x$ ,$a_y < b_y$ , and$a_z < b_z$ . The rest of the cases in which all numbers are different but not necessarily smaller are undefined.
Example: The following figure represents a grid with the numbers of the cells marked in light gray. The third dimension is ignored for clarity. There are four cell
elements.
- The first one represents a single rectangular surface with its normal oriented towards the
$+\hat{z}$ direction (light green). - The second one is formed by an square surface oriented towards the
$-\hat{z}$ direction (light red) and a line oriented towards$-\hat{x}$ . - The third is formed by two oriented lines towards
$+\hat{x}$ and$+\hat{y}$ , respectively. - Finally, the fourth
cell
is formed by a single line, oriented towards$-\hat{y}$ .
"mesh": {
"grid": {
"numberOfCells": [8, 5, 1],
"steps": { "x": [0.1], "y": [0.1], "z": [0.1] }
}
"elements": [
{"id": 1, "type": "cell", "intervals": [ [[1,1,0], [2,3,0]] ]},
{"id": 2, "type": "cell", "intervals": [ [[3,5,0], [2,4,0]],
[[5,4,0], [3,4,0]] ]},
{"id": 3, "type": "cell", "intervals": [ [[3,2,0], [5,2,0]],
[[5,2,0], [5,3,0]] ]},
{"id": 4, "type": "cell", "intervals": [ [[7,3,0], [7,0,0]] ]},
]
}
This entry is an array formed by all the physical models contained in the simulation. Each object within the array must contain:
<id>
, an integer number that uniquely identifies the material.<type>
, with one of the allowed labels described below.
These materials represent a perfectly electrically conducting (pec
) and perfectly magnetically conducting (pmc
).
Example:
"materials": [ {"id": 1, "type": "pec"} ]
A material
with type
simple
represents an isotropic material with constant (not frequency dependent) relative permittivity
-
[relativePermittivity]
is a real which defaults to$1.0$ . Must be greater than$1.0$ . -
[relativePermeability]
is a real which defaults to$1.0$ . Must be greater than$1.0$ . -
[electricConductivity]
is a real which defaults to$0.0$ . Must be greater than$0.0$ . -
[magneticConductivity]
is a real which defaults to$0.0$ . Must be greater than$0.0$ .
Example:
{
"name": "teflon"
"id": 1,
"type": "simple",
"relativePermittivity": 2.5,
"electricConducitivity": 1e-6
}
In surface materials, elementIds
must reference cell
elements. All intervals
modeling entities different to oriented surfaces are ignored.
A multilayeredSurface
must contain the entry <layers>
which is an array indicating materials which are described in the same way as simple materials and a <thickness>
.
{
"name": "Composite",
"type": "multilayeredSurface",
"id": 2,
"layers": [
{"thickness": 1e-3, "relativePermittivity": 1.3, "electricConductivity": 2e-4},
{"thickness": 5e-3, "relativePermittivity": 1.3}
{"thickness": 1e-3, "relativePermittivity": 1.3, "electricConductivity": 2e-4}
]
}
The entry <file>
is the path to a file containing the poles and residues which are used to model the surface impedance of the material.
{
"name": "carbon_fiber_model",
"type": "frequencyDependentSurface",
"id": 3,
"file": "cfc.dat"
}
A wire
, or thin wire, represents an electrically conducting wire-like structure with a radius much smaller than the surrounding cell sizes.
These structures are solved by an algorithm similar to the one described in:
R. Holland and L. Simpson,
"Finite-Difference Analysis of EMP Coupling to Thin Struts and Wires,"
IEEE Transactions on Electromagnetic Compatibility, vol. EMC-23, no. 2, pp. 88-97, May 1981,
doi: 10.1109/TEMC.1981.303899.
Materials of this type must contain:
<radius>
as a real number.<resistancePerMeter>
as a real number.[inductancePerMeter]
as a real number. Defaults to0.0
.
Example:
{
"name": "Shield",
"id": 2,
"type": "wire",
"radius": 0.0001,
"resistancePerMeter": 22.9e-3
}
A multiwire
, models
Paul, C. R. (2007). Analysis of multiconductor transmission lines. John Wiley & Sons.
multiwire
materials are assumed to be contained within a wire
or another multiwire
(see the cable materialAssociation
) which is the external domain and is used as voltage reference.
They must contain the following entries:
-
<inductancePerMeter>
and<capacitancePerMeter>
which must be matrices with a size$N \times N$ . -
[resistancePerMeter]
and[conductancePerMeter]
which must be arrays of size$N$ . Defaults to zero. -
[transferImpedancePerMeter]
which represents the coupling with the external domain, described below. If not present, it defaults to zero, i.e. perfect shielding.
If the number of wires of the multiwire
is equal to 1, none of the properties above are scalars:
-
<inductancePerMeter>
and<capacitancePerMeter>
will be a$1 \times 1$ matrix, i.e[[1e-7]]
-
[resistancePerMeter]
and[conductancePerMeter]
will be arrays of size$1$ , i.e[50]
transferImpedancePerMeter
can contain:
[resistiveTerm]
defined by a real representing transfer impedance resistance. Defaults to0.0
[inductiveTerm]
defined by a real representing transfer impedance inductance. Defaults to0.0
.[pole-residues]
TODO REVIEW[direction]
which can beboth
,inwards
, oroutwards
. Indicating the type of coupling considered. Defaults toboth
meaning that fields can couple from the exterior to interior and the other way round.
Example:
{
"name": "Bundle_2_level_2",
"id": 62,
"type": "multiwire",
"resistancePerMeter" : [62.0e-3,62.0e-3],
"inductancePerMeter": [
[2.4382084E-07, 4.7377505E-08],
[4.7377508E-08, 2.4382081E-07]
],
"capacitancePerMeter": [
[105.5e-12, -20.5e-12],
[-20.5e-12, 105.5e-12 ]
],
"transferImpedancePerMeter" : {
"inductiveTerm" : 4.2e-9,
"direction" : "inwards"
}
}
A terminal
models a lumped circuit which is assumed to located at one end of a wire
or multiwire
. Terminals are assumed to be assigned on points and therefore have zero dimension.
- If the terminal is associated with a
wire
, theterminations
array must contain a singletermination
. - In the case it is associated with a
$N+1$ conductorsmultiwire
, theterminations
array must contain$N$ entries.
Each entry in terminations
is specified by a type
short
if the wire is short-circuited with another wire or with any surface which might be present.open
if the wire does not end in an ohmic contact with any other structure.- Different configurations of passive circuit elements R, L, and C can be defined with
series
(for RLC series circuits),LCpRs
(LC parallel in series with a resistance) andRLsCp
(for series RL in parallel with C). The are defined as follows:[resistance]
which defaults to0.0
,[inductance]
which defaults to0.0
,[capacitance]
which defaults to1e22
.
- 2-port SPICE models can used in a termination. In this case the
type
iscircuit
, and is defined with:[file]
which is the name of the file where the SPICE model is defined[name]
which is the name of the subcircuit as defined insidefile
There is an optional key which is needed in case the termination is attached to a N-port circuit, circuitPort
. This must be an integer which indicates to which port in the circuit defined in the subcircuits is attached.
Example:
{
"name": "shieldTerminal",
"id": 4,
"type": "terminal",
"termination": [ {"type": "series", "resistance": 50.0} ]
}
As with the rest of terminations, SPICE terminations have to be equivalents to 2-port networks, i.e, the model in file
can be composed of an arbitrary number of components, but it must have only two external nodes.
Example:
{
"name": "SpiceTerminal",
"id": 5,
"type": "terminal",
"termination": [ {"type": "circuit", "file": "ListOfComponents.lib", "name": "Component_1"} ]
}
ListOfComponents.lib
is a file where one or more SPICE subcircuits are defined. The file does not need to contain only the subcircuit that is going to be used in the termination. The particular subcircuit among those defined in the file is selected using the key name
.
The connector
assigns properties to the initial or last segment of a wire
or a multiwire
as explained in the material associations section. The following entries can be present:
-
[resistances]
, an array of$N$ real numbers which will be converted to resistances per unit length and will replace theresistancePerMeter
of that segment of themultiwire
. -
[transferImpedancePerMeter]
, described in the same way as explained in the multiwire section. Only valid in aconnector
associated withmultiwire
.
Example:
{
"name": "SegmentConnector1",
"id": 204,
"type": "connector",
"resistances": [100e-3],
"transferImpedancePerMeter" : {
"resistiveTerm" : 3.33,
"inductiveTerm" : 2.6e-9,
"direction" : "inwards"
}
}
This entry stores associations between materials
and elements
using their respective id
s as follows:
<materialId>
: A single integer indicating theid
of a material which must be present in thematerials
list.<elementIds>
: A list ofid
s of the elements to which this material will be associated.<type>
: can bebulk
,surface
, orcable
; described below.
Bulk materials such as pec
, pmc
or simple
can be assigned to one or many elements of type cell
. If the cell
contains intervals
representing points, these will be ignored.
"materialAssociations": [
{"type": "bulk", "materialId": 1, "elementIds": [2]},
{"type": "bulk", "materialId": 1, "elementIds": [3]}
]
Surface materials can only be assigned to elements of type cell
. If the cell
contains intervals
representing entities different to oriented surfaces these will be ignored.
"materialAssociations": [
{"type": "surface", "materialId": 1, "elementIds": [2]}
]
This object establishes the relationship between the physical models described in a material
and parts of the geometry. Besides a type
, materialId
and elementIds
; a cable
can contain the following inputs:
<initialTerminalId>
and<endTerminalId>
which must be present within thematerials
list of type. These entries indicate the lumped circuits connected at the ends of the cable.[initialConnectorId]
and[endConnectorId]
entries which must point to materials of typeconnector
and are assigned to the last segments of the corresponding ends of the cable.- Its
materialId
must point to awire
or amultiwire
material. If it points to amultiwire
, it must also contain an entry named<containedWithinElementId>
which indicates thepolyline
in which thismultiwire
is embedded.
Example:
{
"name": "line_0_0",
"type": "cable",
"elementIds": [ 1 ],
"materialId": 10,
"initialTerminalId": 20,
"endTerminalId": 7,
"initialConnectorId": 24
}
A series of terminals connected together (belonging to the same junction) can be connected to a N-port SPICE circuit. In that case, each of these junction circuits have to described separately in the subCircuits
section.
This section stores associations between materials
of type circuit
and elements
using their respective id
s as follows:
<materialId>
: A single integer indicating theid
of a material of typecircuit
which must be present in thematerials
list.<elementIds>
: A list of with a singleid
. This id must correspond to an element of typenode
, associated to thecoordinateId
shared by all the polylines connected to the subcircuit.<name>
: A unique name that will be used to identify the ports of the subcircuit.
If a terminal represents a connection to a subcircuit described in this sections, the key circuitPort
has to be present in the description of the terminal.
The objects in the probes
array define the outputs of the simulation. Each probe must contain:
- A
<type>
of the ones described below. <elementIds>
indicating the place in which the probe is defined. The allowedelements
depend on the particular probetype
.- A
[domain]
as described in the domain section
Records a vector field a single position referenced by elementIds
which must contain a single id
referencing an element of type node
. The vector field to be recorded is selected using the following entries:
[field]
,electric
ormagnetic
. Defaults toelectric
.[directions]
which contains a list of the field components to be recorded. Defaults to["x", "y", "z"]
.
Example:
{
"name": "electric_field_point_probe",
"type": "point",
"field": "electric",
"elementIds": [1],
"directions": ["x", "y", "z"],
"domain": { "type": "time" }
}
Records a scalar field at a single position referenced by elementIds
. elementIds
must contain a single id
referencing an element of type node
. Additionally, this node
must point to a coordinateId
belonging to at least one polyline
.
If the node's coordinateId
is shared by more than one polyline
a probe will be defined for each one of them
The [field]
can be voltage
or current
. Defaults to current
. When current
is selected, the orientation of the polyline
on which the probe is located indicates the direction of the current. Voltages are well defined at polyline points. However, currents are defined over segments so:
- If the point is in the interior of the wire, the output will be an average on the currents of the segments which are contiguous to it.
- If the point is at one wire end, the current will be the output of the last segment.
{
"name": "mid_point",
"type": "wire",
"field": "voltage",
"elementIds": [1]
}
Performs a loop integral along on the contour of the surface reference in the elementIds
entry. This must point to a single cell
containing a single interval
which is used to define one or several surfaces. These surfaces are build by enlarging half grid step in the directions perpendicular to the entry direction
which can take one of the following values: x
, y
or z
. Depending on the type of interval
, direction
can be assumed (and therefore is optional), or not, specifically:
- If it is a point or a volume,
direction
must be present. - For an oriented line,
direction
is optional and the orientation of the line will be used as default. - For an oriented surface,
direction
is also optional, and if not value is given it is assumed to be the normal of the surface.
Due to Ampere's law, the loop integral of the magnetic field is equal to the total electric current passing through the surfaces. [field]
, can be electric
or magnetic
. Defaults to electric
, which gives the total current passing through the surface.
TODO REVIEW DO BULK CURRENTS DO AVERAGES OF MAGNETIC FIELDS IN CELLS NEXT TO THE SELECTED?
In the following example elementId
points an element describing a single oriented surface, therefore direction
does not need to be stated explicitly.
{
"name": "bulk_current_at_surface",
"type": "bulkCurrent",
"elementIds": [4]
}
In this example elementId
points to a volume element, therefore direction
must be present
{
"name": "bulk_current_at_volume",
"type": "bulkCurrent",
"elementIds": [8],
"direction": "x"
}
TODO EXAMPLE IMAGE
Probes of type farField
perform a near to far field transformation of the electric and magnetic vector fields and are typically located in the scattered field region which is defined by a total/scatterd field excitation, e.g. a planewave.
They must be defined with a single cell
element which must contain a single interval
defining a cuboid.
The direction of the radiated field <theta>
and <phi>
, which must contain <initial>
, <final>
, and <step>
, expressed in degrees.
The domain
of a farField
probe can only be of type frequency
.
If not magnitudeFile
is specified and only one source
is defined, the magnitudeFile
of that source will be used to calculate as normalizing function.
{
"name": "far_field_example",
"type": "farField",
"elementIds": [4],
"theta": {"initial": 0, "final": 180, "step": 10},
"phi": {"initial": 0, "final": 0, "step": 0}
"domain": {
"type": "frequency",
"initialFrequency": 1e6,
"finalFrequency": 1e9,
"numberOfFrequencies": 30,
"frequencySpacing": "logarithmic"
}
}
Probes of type movie
record a vector field in a volume region indicated by elementIds
. [field]
can be electric
, magnetic
, or currentDensity
; defaults to electric
.
currentDensity
will store only the surface density currents on pec
or lossy surfaces.
The stored values can be selected using the [component]
entry, which stores one of the following labels x
, y
, z
, or magnitude
; if no component is specified, defaults to magnitude
.
An example follows:
{
"name": "electric_field_movie",
"type": "movie",
"field": "electric",
"component": "x",
"elementIds": [4]
}
If domain
is not specified, it defaults to record from the beginning to the end of the simulation.
The domain must specify a <type>
from the following ones:
-
time
, means recording only in time domain. A probe with adomain
of thistype
can contain the following entries:[initialTime]
, the probe will be active for times greater than or equal to the selected value. Defaults to 0.0.[finalTime]
, the probe will be active for times smaller than the selected value. Defaults to the final time of the simulation.[samplingPeriod]
. Defaults to the simulation time step which is the minimum sampling period.
-
frequency
, means that the output will be converted into the frequency domain.<initialFrequency>
,<finalFrequency>
as real numbers, and<numberOfFrequencies>
as an integer.[frequencySpacing]
can belinear
orlogarithmic
. Defaults tolinear
.
-
timeFrequency
will record both time and frequency.
Additionally, a domain
can contain a [magnitudeFile]
as specified in sources. This file will be used as to compute a transfer function between the recorded output and the specified magnitude.
This entry is an array which stores all the electromagnetic sources of the simulation case. Each source is a JSON object which must contain the following entries:
<magnitudeFile>
contains a relative path to the plain text file which will be used as a magnitude for this source. This file must contain two columns, with the first stating the time and the second one the magnitude value; an example magnitude file can be found at gauss.exc.<type>
must be a label of the ones defined below. Some examples of sourcetype
areplanewave
ornodalSource
.<elementIds>
is an array of integers which must exist within themesh
elements
list. These indicate the geometrical place where this source is located. Thetype
and number of the allowed elements depends on the sourcetype
and can be check in the descriptions of each source object, below.
The planewave
type represents an electromagnetic wave with a plane phase-front which propagates towards a elementIds
must point to a single cell
element formed by a single cuboid region which defines the total and scattered field regions, respectively.
Besides the other common entries in sources, it must also contain the following ones:
-
<direction>
, is an object containing<theta>
and<phi>
, which are the angles of the propagation vector$\hat{k} (\theta, \phi)$ . -
<polarization>
, is an object containing<theta>
and<phi>
which indicates the direction of the electric field vector$\hat{E}(\theta, \phi)$ .
An example of a planewave propagating towards
{
"type": "planewave",
"magnitudeFile": "gauss.exc",
"elementIds": [2],
"direction": {
"theta": 0.0,
"phi": 0.0
},
"polarization": {
"theta": 1.5708,
"phi": 0.0
}
}
This object represents a time-varying vector field applied along an oriented line with the same orientation of the line. Therefore, the elementIds
within must contain only elements of type cell
with intervals
describing a collection of oriented lines. Additionally, it may contain:
[field]
with aelectric
ormagnetic
label which indicates the vector field which will be applied. If not present, it defaults toelectric
.[hardness]
withsoft
orhard
label. Asoft
hardness indicated that the magnitude will be added to the field this situation is typical for a waveport.hard
sources mean that the field is substituted by the value established by themagnitudeFile
, which for an electric fieldnodalSource
would be equivalent to apec
material if the magnitude is zero.
Example:
{
"name": "entry_line_curent",
"type": "nodalSource",
"magnitudeFile": "gauss.exc",
"elementIds": [1],
"hardness": "soft",
"field": "electric"
}
A generator
source must be located on a single node
whose coordinateId
is used by a single polyline
. The entry [field]
can be voltage
or current
; defaults to voltage
.
Example:
{
"name": "voltage_source",
"type": "generator",
"field": "current",
"magnitudeFile": "gauss.exc",
"elementIds": [1]
}