esmatrix.mac
This macro file can be imported to an input file with
$ import esmatrix
It is imported by VSimEs.mac.
This macro file is available to all packages.
This macro file defines macros that set up the matrix for solving electrostatics. Includes setting up the bulk matrix and the boundary conditions. Use by first adding all the needed boundary conditions. Then write the matrix, which will insert those boundary conditions.
Default Accumulation Macros
- addEsDirichletBC(name, value, location)
Add a Dirichlet boundary condition using a simulation boundary location.
- Parameters:
name – The name of the boundary condition block.
value – The voltage for this boundary condition.
location – The boundary condition location, one of lower/upper[X,Y,Z], e.g. for Cartesian coordinates.
- addEsDirichletBC(name, value, lb, ub)
Add a Dirichlet boundary condition using an index slab.
- Parameters:
name – The name of the boundary condition block.
value – The voltage for this boundary condition.
lb – The lower bound indexes of the slab over which this boundary condition is applied.
ub – The upper bound indexes of the slab over which this boundary condition is applied.
- addEsNeumannBC(name, value, location)
Add a Neumann boundary condition using a simulation boundary location.
- Parameters:
name – The name of the boundary condition block.
value – The value of the potential difference between two nodes.
location – The boundary condition location, one of lower/upper[X,Y,Z], e.g. for Cartesian coordinates.
- addEsNeumannBC(name, value, direction, multiplier, lb, ub)
Add a Neumann boundary condition using an index slab.
- Parameters:
name – The name of the boundary condition block.
value – The value of the potential difference between two nodes. (See multiplier).
direction – The direction of the potential difference. One of [0,1,2], corresponding to [X,Y,Z] in Cartesian coordinate systems, e.g.
multiplier – The multiplier for the potential difference. If this is positive, one takes the value one cell up minus the value at the node. If this is negative or zero, one takes the value at the node minus the value one cell down.
lb – The lower bound indexes of the slab over which this boundary condition is applied.
ub – The upper bound indexes of the slab over which this boundary condition is applied.