MaxwellFunctions
MaxwellFunctions
Section Maxwell
Type block
This block specifies the shape of a "spatial-dependent function", such as the
envelope needed when using the MaxwellFunctions block. Each line in the block
specifies one function. The first element of each line will be a string
that defines the name of the function. The second element specifies which type
of function we are using; in the following we provide an example for each of the
possible types. In the following, we will use
$
\mathbf{r} = \begin{pmatrix} {\rm x} \\ {\rm y} \\ {\rm z} \end{pmatrix},
\mathbf{r}_0 = \begin{pmatrix} {\rm x0} \\ {\rm y0} \\ {\rm z0} \end{pmatrix},
\mathbf{k} = \begin{pmatrix} {\rm kx} \\ {\rm ky} \\ {\rm kz} \end{pmatrix},
w = {\rm width},
g = {\rm growth}
$
Options:
- mxf_const_wave:
%MaxwellFunctions
"function-name" | mxf_const_wave | kx | ky | kz | x0 | y0 | z0
%The function is constant plane wave $ f(\mathbf{r}) = \cos( \mathbf{k} (\mathbf{r} - \mathbf{r}_0) ) $
- mxf_const_phase:
%MaxwellFunctions
"function-name" | mxf_const_phase | kx | ky | kz | x0 | y0 | z0
%The function is a constant phase of $ f(\mathbf{r}) = (\mathbf{k} \mathbf{r}_0) $
- mxf_gaussian_wave:
%MaxwellFunctions
"function-name" | mxf_gaussian_wave | kx | ky | kz | x0 | y0 | z0 | width
%The function is a Gaussian, $ f(\mathbf{r}) = \exp( -( \mathbf{k} (\mathbf{r}-\mathbf{r}_0) )^2 / (2 {w}^2) ) $
- mxf_cosinoidal_wave:
%MaxwellFunctions
"function-name" | mxf_cosinoidal_wave | kx | ky | kz | x0 | y0 | z0 | width
%$ f(\mathbf{r}) = \begin{cases} \cos( \frac{\pi}{2} \frac{ \mathbf{k}(\mathbf{r}-\mathbf{r}_0) - 2 w}{w} + \pi ) & \text{if } | \mathbf{k}(\mathbf{r}-\mathbf{r}_0) | \le w \\ 0 & \text{otherwise} \end{cases} $
- mxf_logistic_wave:
%MaxwellFunctions
"function-name" | mxf_logistic_wave | kx | ky | kz | x0 | y0 | z0 | growth | width
%The function is a logistic function,
$ f(\mathbf{r}) = \left( \frac{1}{1 + e^{g \left( \frac{\mathbf{k} \cdot (\mathbf{r-r_0})}{|\mathbf{k}|} + \frac{w}{2} \right)}} \right) \cdot \left( \frac{1}{1 + e^{-g \left( \frac{\mathbf{k} \cdot (\mathbf{r-r_0})}{|\mathbf{k}|} - \frac{w}{2} \right)}} \right) \cdot {\left(1 + e^{\frac{g \cdot w}{2}}\right)}^2 $
- mxf_trapezoidal_wave:
%MaxwellFunctions
"function-name" | mxf_trapezoidal_wave | kx | ky | kz | x0 | y0 | z0 | growth | width
%The function is a logistic function,
$ f(\mathbf{r}) = \begin{cases} 0 & \text{if } \mathbf{k} \cdot (\mathbf{r} - \mathbf{r}_0) / |\mathbf{k}| \leq -\frac{w}{2} \\ 1 & \text{if } -\frac{w}{2} + \frac{1}{g} < \mathbf{k} \cdot (\mathbf{r} - \mathbf{r}_0) / |\mathbf{k}| < \frac{w}{2} - \frac{1}{g} \\ 1 - g\left[\mathbf{k} \cdot (\mathbf{r} - \mathbf{r}_0) / |\mathbf{k}| - \left(\frac{w}{2} - \frac{1}{g}\right)\right] & \text{if } \frac{w}{2} - \frac{1}{g} \leq \mathbf{k} \cdot (\mathbf{r} - \mathbf{r}_0) / |\mathbf{k}| < \frac{w}{2} \\ 0 & \text{if } \mathbf{k} \cdot (\mathbf{r} - \mathbf{r}_0) / |\mathbf{k}| \geq \frac{w}{2} \end{cases} $ - mxf_from_expr:
%MaxwellFunctions
"function-name" | mxf_from_expr | kx | ky | kz | "expression"
%The temporal shape of the field is given as an expression (e.g., cos(2.0x-3y+4*z). The letter x, y, z means spatial coordinates, obviously. The expression is used to construct the function f that defines the field.