Fieldline Geometry Component#

The fieldline_geometry component in Hermes-3 helps to set up 1D simulations and to compute cell geometry for other modules.

Implementation#

The component is implemented in hermes-3/src/fieldline_geometry.cxx and its header file is hermes-3/include/fieldline_geometry.hxx.

Input parameters#

  • lambda_int: \(\lambda_q + 1.64S\), the radial width of the flux tube mapped upstream (i.e. removing flux expansion effects)

  • fieldline_radius: \(R\), the major radius of the magnetic fieldline

  • poloidal_magnetic_field: \(B_{pol}\), the poloidal magnetic field strength

  • compute_Btor_from_R: if true, \(B_{tor} = B_{tor,up}R_{up}/R\), else \(B_{tor}\) must be provided

  • upstream_toroidal_magnetic_field: \(B_{tor,up}\), required if compute_Btor_from_R=true, the upstream toroidal magnetic field strength

  • toroidal_magnetic_field: \(B_{tor}\), required if compute_Btor_from_R=false, the toroidal magnetic field along the fieldline

  • diagnose: add output variables to the state

For lambda_int, fieldline_radius, poloidal_magnetic_field and toroidal_magnetic_field, you can provide expressions (as described in the BOUT++ documentation). In addition to the standard y and t expressions (x and z don’t vary in 1D), you can use {lpar} to write expressions in terms of the parallel length \(L_\parallel\). For example,

[fieldline_geometry]
lambda_q = 1e-3
b = 2.0
lambda_int = where({lpar} > mesh:length_xpt, b, 1) * lambda_q

would set lambda_int to \(1mm\) above the X-point and \(2mm\) below the X-point.

Return variables#

  • fieldline_geometry_lpar: \(L_\parallel\), parallel distance from upstream

  • fieldline_geometry_lambda_int: \(\lambda_{int}=\lambda_q + 1.64S\), the provided lambda_int function

  • fieldline_geometry_magnetic_pitch: \(\sin(\theta)=B_{pol}/B\), the magnetic pitch (ratio of poloidal to total field)

  • fieldline_geometry_Rxy: \(R\), the provided fieldline_radius function

  • fieldline_geometry_Bpxy: \(B_{pol}\), the poloidal magnetic field strength

  • fieldline_geometry_Btxy: \(B_{tor}\), the toroidal magnetic field strength

  • fieldline_geometry_Bxy: \(B\), the total magnetic field strength

  • fieldline_geometry_transport_broadening: \(\lambda_{int}/\lambda_{int,up}\), the flux tube broadening due to cross-field transport

  • fieldline_geometry_f_R: \(f_R=(B_{pol,up}/B_{up})/(B_{pol}/B)\), the total flux expansion

  • fieldline_geometry_flux_tube_width: \(\lambda_{int} f_R\), the flux tube radial width

  • fieldline_geometry_dlpol: \(dl_{pol}=dl_\parallel B_{pol}/B\), the poloidal length of the flux tube

  • fieldline_geometry_cell_side_area: \(2 \pi R \cdot dl_{pol}\), the poloidal length of the flux tube times its circumference

  • fieldline_geometry_cell_volume: \(2 \pi R \cdot dl_{pol} \lambda_{int} f_R\), the poloidal length of the flux tube times its circumference and radial width

Effect of these terms#

The transport_broadening and magnetic_field_strength terms directly affect the Jacobian, which is set to \(J=(\lambda_{int}/\lambda_{q,up})/B\). The cell_side_area and cell_volume affect the interaction of the cells with other components such as the reservoir model.