- InitialCondition
Initial and Boundary Conditions¶
Nested input block for fields in MultiField that is applied only at the beginning of the simulation to describe initial conditions. In typical use, an InitialCondition is set throughout a volume (although this convention is not a requirement and, as with a BoundaryCondition, an InitialCondition may be set at select surfaces).
- BoundaryCondition:
Nested input block for fields in MultiField that is applied at every time step to describe boundary conditions. In typical use, boundary conditions are set at select surfaces (although this convention is not a requirement and, as with an InitialCondition, a boundary condition may be set throughout a volume).
Periodic boundary conditions are defined in the Decomp input block.
InitialCondition and BoundaryCondition Parameters¶
- kind (string)
Type of boundary condition. Possible kind values include:
constant
copy
varadd
varset
outGoingWave (for electromagnetic fields only)
- lowerBounds (integer vector)
Lower bounds of the volume where initial or boundary condition is applied.
- upperBounds (integer vector)
Upper bounds of the volume where initial or boundary condition is applied.
- amplitudes (float vector)
Values of the amplitude for each of the indices.
- phases (float vector)
Values of the phase for each of the indices.
- components (integer vector)
Components to be set by the condition.
- STFunc (block)
The space-time function to be used. STFunc Block is a kind-dependent parameter. The STFunc block must be named componentn where n is the component the function is setting.
STFunc
applies only to the following initial or boundary conditions:varadd
varset
outGoing
- sourceLowerBounds (integer vector)
Lower bounds of the region from which to copy; copy boundary condition only.
- sourceUpperBounds (integer vector)
Upper bounds of the region from which to copy; copy boundary condition only.
- maxApplyTime (real)
Time until which this boundary condition is applied; this applies to only BoundaryCondition.
BoundaryCondition outGoing Kind¶
Specifying kind = outGoing
in the BoundaryCondition block
sets an open boundary which allows electromagnetic waves with specific
characteristics to leave the domain, instead of reflecting, as they
would from a conductor.
You can also use the open BoundaryCondition to launch a wave. You might want to do this, for example, in the case when you have launched a wave from the left, as a result of which some wave is reflected. You can use an outGoing BoundaryCondition to launch the wave while allowing the reflected wave back through. See the Example of Using kind = open to Handle Wave Reflection.
outGoing Kind Parameters¶
- phaseVelocity (float)
Sets the phase velocity of the wave the user would like to leave the boundary. Giving phaseVelocity a value of the speed of light allows plane waves in vacuum to leave a boundary. For modes in a waveguide or other structure, the phase velocity may differ from the speed of light. A perfectly matched layer is required for allowing modes with differing phase velocities all to leave a boundary.
Example BoundaryCondition Block for launching an electromagnetic wave¶
# Wave launcher for E_y at left
<BoundaryCondition lower0Launcher>
kind = varset
lowerBounds = [0 -1 -1]
upperBounds = [1 21 21] # upperBounds = [1 NY1 NZ1]
minDim = 1
components = [1]
<STFunc component1>
k = [5026548.24574 0. 0.] # k = [KAY 0. 0.]
vg = 299790000.0 # vg = LIGHTSPEED
omega = 1.50690889859e+15
amplitudes = [2.56837310961e+12]
phases = [0.] # sine
kind = planeWavePulse
widths = [4e-06 2e-05 2e-05] # widths = [WXPUMP WYPUMP WZPUMP]
origin = [-4e-06 0.0 0.0] # origin = [XSTARTPUMP 0.0 0.0]
</STFunc>
</BoundaryCondition>
Examples of BoundaryCondition Blocks for conductor electromagnetic boundary conditions¶
# Set E_y to zero on x-lower boundary
<BoundaryCondition xLowerConductor>
kind = constant
# Value same at all cells
lowerBounds = [0 -1 -1]
# Lower cell limits for BC application
upperBounds = [1 21 21]
# Upper cell limits for BC application
# There should be one amplitude for each index
indices = [1]
# E_y set by this
amplitudes = [0.]
</BoundaryCondition>
# Set E_y and E_z to zero on x-upper boundary
<BoundaryCondition xUpperConductor>
kind = constant
lowerBounds = [40 -1 -1]
upperBounds = [41 21 21]
indices = [1 2]
amplitudes = [0. 0.]
</BoundaryCondition>
Example of Using kind = outGoingWave
boundary condition¶
<BoundaryCondition rightOpen>
kind = outGoingWave
phaseVelocity = $V_OVER_C*LIGHTSPEED$
normalDir = 0
velOverC = V_OVER_C
lowerBounds = [NX -1 -1] # Lower cell limits for application of BC
upperBounds = [NX1 NY1 NZ1] # Upper cell limits for BC application
components = [1 2] # field components boundary is applied to
<STFunc function>
kind = constantFunc
amplitude = 0.
</STFunc>
</BoundaryCondition>
Example of Using kind = open
to Handle Wave Reflection¶
<BoundaryCondition leftOpenWaveLauncher>
kind = outGoingWave
phaseVelocity = $V_OVER_C*LIGHTSPEED$
normalDir = 0
lowerBounds = [0 -1 -1]
upperBounds = [1 NY1 NZ1]
components = [2]
<STFunc function>
kind = planeWavePulse
amplitude = EWAVE
phase = 1.57
k = [KAY 0 0 ]
omega = OMEGA
vg = LIGHTSPEED
widths = [5.e-6 1.e-5 1.e-5]
origin = [-5.e-6 0.e-5 0.e-5]
</STFunc>
</BoundaryCondition>