Field in Boozer coordinates, loadable from several file formats.
Call one init_from_* loader, then fix_to_surface before any evaluation. Only one Boozer field can be active at a time (singleton — the splines live in module-global state). Calling a loader a second time aborts.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | initialized | = | .false. | ||
| logical, | public | :: | fixed_to_surface | = | .false. | ||
| real(kind=dp), | public | :: | fixed_stor | ||||
| real(kind=dp), | public | :: | nfp | ||||
| real(kind=dp), | public | :: | psi_tor_edge | ||||
| real(kind=dp), | public | :: | R |
Load Boozer-coordinate splines from a VMEC wout netCDF file.
Reasonable defaults: radial_spline_order=5, angular_spline_order=5, grid_refinement=6.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(inout) | :: | self | |||
| character(len=*), | intent(in) | :: | vmec_file |
path to VMEC .nc file |
||
| integer, | intent(in), | optional | :: | radial_spline_order | ||
| integer, | intent(in), | optional | :: | angular_spline_order | ||
| integer, | intent(in), | optional | :: | grid_refinement |
Load Boozer-coordinate splines from a booz_xform boozmn netCDF file.
The boozmn file fixes its own grid and spline orders.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(inout) | :: | self | |||
| character(len=*), | intent(in) | :: | boozmn_file |
Load Boozer-coordinate splines from an extended chartmap netCDF file.
The chartmap carries its own grid and spline orders.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(inout) | :: | self | |||
| character(len=*), | intent(in) | :: | chartmap_file |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(in) | :: | self | |||
| real(kind=dp), | intent(in) | :: | x(3) | |||
| real(kind=dp), | intent(out) | :: | bmod | |||
| real(kind=dp), | intent(out) | :: | sqrtg | |||
| real(kind=dp), | intent(out) | :: | bder(3) | |||
| real(kind=dp), | intent(out) | :: | hcovar(3) | |||
| real(kind=dp), | intent(out) | :: | hctrvr(3) | |||
| real(kind=dp), | intent(out) | :: | hcurl(3) |
Return the rotational transform iota at flux surface stor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(in) | :: | self | |||
| real(kind=dp), | intent(in) | :: | stor |
normalized toroidal flux s, range [0, 1] |
||
| real(kind=dp), | intent(out) | :: | iota |
Return covariant B_theta and B_phi for the surface fixed by fix_to_surface.
These are flux-surface constants in Boozer coordinates, angle-independent, SI: T*m.
Requires fix_to_surface to have been called first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(in) | :: | self | |||
| real(kind=dp), | intent(out) | :: | B_theta_covariant | |||
| real(kind=dp), | intent(out) | :: | B_phi_covariant |
Fix the field to the flux surface at normalized toroidal flux stor.
Must be called before any compute_* call or get_covariant_components.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(inout) | :: | self | |||
| real(kind=dp), | intent(in) | :: | stor |
normalized toroidal flux s, range [0, 1] |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(in) | :: | self | |||
| real(kind=dp), | intent(in) | :: | theta | |||
| real(kind=dp), | intent(in) | :: | phi | |||
| real(kind=dp), | intent(out) | :: | B_mod | |||
| real(kind=dp), | intent(out) | :: | sqrtg | |||
| real(kind=dp), | intent(out) | :: | dB_dx(3) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(in) | :: | self | |||
| real(kind=dp), | intent(in) | :: | theta | |||
| real(kind=dp), | intent(in) | :: | phi | |||
| real(kind=dp), | intent(out) | :: | B_mod | |||
| real(kind=dp), | intent(out) | :: | dB_dx(3) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(in) | :: | self | |||
| real(kind=dp), | intent(in) | :: | theta | |||
| real(kind=dp), | intent(in) | :: | phi | |||
| real(kind=dp), | intent(out) | :: | B_mod |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(in) | :: | self | |||
| real(kind=dp), | intent(in) | :: | theta | |||
| real(kind=dp), | intent(in) | :: | phi | |||
| real(kind=dp), | intent(out) | :: | nabla_s |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(boozer_field_t), | intent(in) | :: | self |