Handles setting of boundary conditions at parallel boundaries according to Taylor expansion method
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | allocatable, dimension(:) | :: | b_bnd_direction |
Indicates if the magnetic field is directed towards or away the boundary at the closest parallel boundary: - = 1 : if B points toward the boundary - = -1 : if B points away from the boundary) - = 0 : if no boundary is found nearby (e.g., in closed field line region or when the boundary is too far from the point) |
||
| real(kind=FP), | public, | allocatable, dimension(:,:) | :: | dists_to_bnd |
Distances along the magnetic field line to the boundary For each point l: - dists_to_bnd(l, 1): distance from point l to the boundary - dists_to_bnd(l, 2): distance from the mapped point of point l to the boundary - dists_to_bnd(l, 3): distance from the next-but-one mapped point of point l to the boundary Sign convention: - Distance is positive if measured in the direction of the magnetic field B - Distance is negative if measured in the opposite direction of B |
||
| real(kind=FP), | public, | allocatable, dimension(:) | :: | depth_in_bnd |
Corresponding toridal angle to boundary in units of dphi - Positive values indicate that point is inside boundary - Negative values indicate that point is outside boundary - A value of zero indicates that boundary is too far away (e.g., in closed field line region) |
Destructor for parbnd_taylor_t
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(parbnd_taylor_t), | intent(inout) | :: | self |
Initialises parbnd_taylor, by computing distances to boundaries
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parbnd_taylor_t), | intent(inout) | :: | self |
Instance of type |
||
| class(equilibrium_t), | intent(inout) | :: | equi |
Equilibrium |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| real(kind=FP), | intent(in) | :: | dphi |
Toroidal grid distance |
||
| character(len=*), | intent(in), | optional | :: | filename |
Filename, where to read parameters from, if not provided default parameters will be used |
Writes basic information of parbnd_taylor_t to stdout
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parbnd_taylor_t), | intent(in) | :: | self |
Instance of class |
Writes parbnd_taylor data to NetCDF id
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parbnd_taylor_t), | intent(in) | :: | self |
Instance of class |
||
| integer, | intent(in) | :: | fgid |
NetCDF file or group id |
Reads parbnd_taylor data from NetCDF id
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parbnd_taylor_t), | intent(inout) | :: | self |
Instance of class |
||
| integer, | intent(in) | :: | fgid |
NetCDF file or group id |
Sets boundary condition on guard points according to eq. (B.2) in DOI 10.1088/1361-6587/aaa373, with modifications for deep guard points
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parbnd_taylor_t), | intent(in) | :: | self |
Instance of class |
||
| class(equilibrium_t), | intent(inout) | :: | equi |
Equilibrium |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| real(kind=FP), | intent(in) | :: | fac_dir |
Factor for Dirichlet boundary condition (beta in DOI 10.1088/1361-6587/aaa373) |
||
| real(kind=FP), | intent(in) | :: | fac_nmn |
Factor for Neumann boundary condition (gamma in DOI 10.1088/1361-6587/aaa373) |
||
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | bnd_vals |
Boundary values at intersection point of field line with boundary (alpha in DOI 10.1088/1361-6587/aaa373) |
|
| real(kind=FP), | intent(inout), | dimension(mesh%get_n_points()) | :: | u |
Field on which guard points are set according to boundary condition |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u_bwd2 |
Map points up to two backward and two forward planes |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u_bwd1 |
Map points up to two backward and two forward planes |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u_fwd1 |
Map points up to two backward and two forward planes |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u_fwd2 |
Map points up to two backward and two forward planes |
|
| integer, | intent(in), | optional | :: | order |
Specifies the order of the method (1 or 2, default 2) |
|
| real(kind=FP), | intent(out), | optional, | dimension(mesh%get_n_points()) | :: | uisect |
Values of field at intersection point of field line with boundary |
Extrapolates field into parallel guard points region. Method is based on prescribing second parallel derivative along field lines to zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parbnd_taylor_t), | intent(in) | :: | self |
Instance of class |
||
| class(equilibrium_t), | intent(inout) | :: | equi |
Equilibrium |
||
| type(mesh_cart_t), | intent(in) | :: | mesh |
Mesh |
||
| real(kind=FP), | intent(inout), | dimension(mesh%get_n_points()) | :: | u |
Field on which guard points are set according to boundary condition |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u_bwd2 |
Map points up to two backward and two forward planes |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u_bwd1 |
Map points up to two backward and two forward planes |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u_fwd1 |
Map points up to two backward and two forward planes |
|
| real(kind=FP), | intent(in), | dimension(mesh%get_n_points()) | :: | u_fwd2 |
Map points up to two backward and two forward planes |
|
| real(kind=FP), | intent(out), | optional, | dimension(mesh%get_n_points()) | :: | uisect |
Values of field at intersection point of field line with boundary |