Operators acting within poloidal plane (~perpendicular)
Evaluates derivative in x direction
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which x-derivative shall be computed |
Evaluates derivative in y direction
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which y-derivative shall be computed |
Evaluates J^(-1) d/dx(J co du/dx u) + d/dy(co du/dy) where J is the Jacobian
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which nabla_pol_sqrd is be computed |
||
| real(kind=GP), | intent(in), | optional, | dimension(self%n_points) | :: | co |
Coefficient, if not present it is assumed 1 |
Evaluates Arakawa bracket [u,v] = du/dxdv/dy - du/dydv/dx second order, see [A. Arakawa, J. Comput. Phys. 135, 103 (1997)]
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | v |
Values of variable v |
|
| integer, | intent(in) | :: | l |
Index, for which Arakawa Bracket is be computed |
Evaluates doubled Arakawa bracket [u,[u,v]], second order
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | v |
Values of variable v |
|
| integer, | intent(in) | :: | l |
Index, for which double Arakawa bracket is be computed |
Interface for (squared) curvature operator
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which curvature is computed |
Curvature operator Computation based on toroidal magnetic field
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which curvature is computed |
Curvature operator Simple computation via vertical derivative -2 d/dy Useful for slab/circular geometry
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which curvature is computed |
Evaluates squared curvature operator Computation based on toroidal magnetic field
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which curvature is computed |
Evaluates squared curvature operator Simple computation via vertical derivative 4 d^2/dy^2 second order, central finite difference
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which curvature is computed |
Evaluates non-linear advection div(co [adv_pot, v]_{x,y}) where v = grad(pot) + diafac*grad(pi) / ne
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in) | :: | dia_fac |
Factor in front of diamagnetic term |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | co |
Values of coefficient |
|
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | adv_pot |
Values of the first input in bracket [adv_pot, v] |
|
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | potv |
Values of electrostatic potential |
|
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | tiv |
Values of ion temperature |
|
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | nev |
Values of density |
|
| integer, | intent(in) | :: | l |
Index, for which term is computed |
Evaluates arakawa bracket on local 3x3 stencil without its prefactor 1/(12 hf^2)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(-1:1,-1:1) | :: | zeta |
First entry in arakawa bracket given as local 3x3 stencil |
|
| real(kind=GP), | intent(in), | dimension(-1:1,-1:1) | :: | psi |
First entry in arakawa bracket given as local 3x3 stencil |
Evaluates arakawa bracket on local 5x5 stencil If jac_loc not present: [u,[u,v]] If jac_loc present: 1/J[Ju, 1/J[Ju,v]]
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(-2:2,-2:2) | :: | u_loc |
Values of variable u given as local 5x5 stencil |
|
| real(kind=GP), | intent(in), | dimension(-2:2,-2:2) | :: | v_loc |
Values of variable v given as local 5x5 stencil |
|
| real(kind=GP), | intent(in), | optional, | dimension(-2:2,-2:2) | :: | jac_loc |
Jacobian given as local 5x5 stencil |
Evaluates flutter gradient of f using Arakawa bracket co*[apar,u]/btor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | apar |
Values of variable apar |
|
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which flutter_grad is be computed |
Evaluates flutter divergence of f using Arakawa bracket co*[apar,u]/btor
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | apar |
Values of variable apar |
|
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | l |
Index, for which flutter_div is be computed |
Initialises inplane operators
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(inout) | :: | self |
Instance of the type |
||
| class(equilibrium_t), | intent(inout), | target | :: | equi |
Equilibrium |
|
| type(mesh_cart_t), | intent(inout), | target | :: | mesh |
Mesh |
|
| class(equilibrium_storage_t), | intent(inout), | target | :: | equi_on_mesh |
Equilibrim quantities on mesh |
|
| real(kind=GP), | intent(in) | :: | norm_scale | |||
| real(kind=GP), | intent(in) | :: | norm_flutter |
Applies dissipation of order ndiss: du = div (co grad (nabla_pol_sqrd^{ndiss-1} u) )
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(inplane_operators_t), | intent(inout) | :: | self |
Instance of the type |
||
| real(kind=GP), | intent(in), | dimension(self%n_points) | :: | u |
Values of variable u |
|
| integer, | intent(in) | :: | ndiss |
Order of dissipation operator |
||
| real(kind=GP), | intent(out), | dimension(self%n_points_inner) | :: | du |
Change added with dissipation |
|
| real(kind=GP), | intent(in), | optional, | dimension(self%n_points) | :: | co |
Coefficient applied in last Laplacian operation |
Frees memory associated with karniadakis
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(inplane_operators_t), | intent(inout) | :: | self |
Instance of the type |
Datatype for inplane operators
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| procedure(curvature_interface), | public, | pointer | :: | curvature | => | null() |
Curvature operator |
| procedure(curvature_interface), | public, | pointer | :: | curvature_sqrd | => | null() |
Curvature operator |
| final :: destructor |
| procedure , public :: init => init_inplane_operators Interface | |
| procedure , public :: ddx Interface | |
| procedure , public :: ddy Interface | |
| procedure , public :: nabla_pol_sqrd Interface | |
| procedure , public :: arakawa Interface | |
| procedure , public :: doubled_arakawa Interface | |
| procedure , public :: curvature_btor_based Interface | |
| procedure , public :: curvature_ddy_based Interface | |
| procedure , public :: curvature_sqrd_btor_based Interface | |
| procedure , public :: curvature_sqrd_ddy_based Interface | |
| procedure , public :: polarisation_advection Interface | |
| procedure , public :: apply_dissipation_inplane Interface | |
| procedure , public :: flutter_grad Interface | |
| procedure , public :: flutter_div Interface |