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 fieldlinepoloidal_magnetic_field: \(B_{pol}\), the poloidal magnetic field strengthcompute_Btor_from_R: iftrue, \(B_{tor} = B_{tor,up}R_{up}/R\), else \(B_{tor}\) must be providedupstream_toroidal_magnetic_field: \(B_{tor,up}\), required ifcompute_Btor_from_R=true, the upstream toroidal magnetic field strengthtoroidal_magnetic_field: \(B_{tor}\), required ifcompute_Btor_from_R=false, the toroidal magnetic field along the fieldlinediagnose: 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 upstreamfieldline_geometry_lambda_int: \(\lambda_{int}=\lambda_q + 1.64S\), the providedlambda_intfunctionfieldline_geometry_magnetic_pitch: \(\sin(\theta)=B_{pol}/B\), the magnetic pitch (ratio of poloidal to total field)fieldline_geometry_Rxy: \(R\), the providedfieldline_radiusfunctionfieldline_geometry_Bpxy: \(B_{pol}\), the poloidal magnetic field strengthfieldline_geometry_Btxy: \(B_{tor}\), the toroidal magnetic field strengthfieldline_geometry_Bxy: \(B\), the total magnetic field strengthfieldline_geometry_transport_broadening: \(\lambda_{int}/\lambda_{int,up}\), the flux tube broadening due to cross-field transportfieldline_geometry_f_R: \(f_R=(B_{pol,up}/B_{up})/(B_{pol}/B)\), the total flux expansionfieldline_geometry_flux_tube_width: \(\lambda_{int} f_R\), the flux tube radial widthfieldline_geometry_dlpol: \(dl_{pol}=dl_\parallel B_{pol}/B\), the poloidal length of the flux tubefieldline_geometry_cell_side_area: \(2 \pi R \cdot dl_{pol}\), the poloidal length of the flux tube times its circumferencefieldline_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.