multifields.mac
This macro file can be imported to an input file with
$ import multifields
It is imported by VSim in all cases (electromagnetic and electrostatic).
This macro file is available to all packages.
This macro file contains many macros which add initial conditions to
fields. It also contains macros to setup common operations with fields
such as needed to make nodal fields, add applied (external) magnetic fields,
copy perimieter fields, and perform binary operations with fields. A master
macro, writeMultiField()
, writes the <MultiField> block with all of
the specified field operations.
Public Macros
- addInitialCondition(fieldName, numComponents, comp0, comp1, comp2)
Add initial conditions to field blocks.
- Parameters:
fieldName – The name of the field into which the initial condition block is written. Determines the name of the InitialCondition block.
numComponents – The number of components in the initial condition.
comp0 – Expression (or None) for the component 0 of the initial condition.
comp1 – Expression (or None) for the component 1 of the initial condition.
comp2 – Expression (or None) for the component 2 of the initial condition.
- addInitialCondition(fieldName, numComponents, comp0, comp1, comp2, lb, ub)
Add initial conditions to field blocks.
- param fieldName:
The name of the field into which the initial condition block is written. Determines the name of the InitialCondition block.
- param numComponents:
The number of components in the initial condition.
- param comp0:
Expression (or None) for the component 0 of the initial condition.
- param comp1:
Expression (or None) for the component 1 of the initial condition.
- param comp2:
Expression (or None) for the component 2 of the initial condition.
- param lb:
The grid index (integer) lowerBounds of the initial condition.
- param ub:
The grid index (integer) upperBounds of the initial condition.
- addFieldInitialCondition(fieldName, component, function)
Add an initial update step for initial conditions.
- Parameters:
fieldName – fieldName The name of the field being initialized.
component – The (integer) component of the field to initialize.
function – The function to which the field will be initialized to.