V3FIT
|
Takes the Curl(B) to return the contravariant current density. Contravariant components of the magnetic field must be converted to covariant components first. More...
Functions/Subroutines | |
subroutine | cv_currents (bsupsijh, bsupuijh, bsupvijh, |
Compute current density from Curl(B). More... | |
subroutine | curlb (ksupsmnf, ksupumnf, ksupvmnf, |
Compute fourier components of contravariant currents on full radial grid. More... | |
subroutine | getcv (ksupsmnf, ksupumnf, ksupvmnf, |
Transform full grid contravariant currents to real space. More... | |
Takes the Curl(B) to return the contravariant current density. Contravariant components of the magnetic field must be converted to covariant components first.
subroutine siesta_currents::curlb | ( | ksupsmnf, | |
ksupumnf, | |||
ksupvmnf | |||
) |
Compute fourier components of contravariant currents on full radial grid.
[in,out] | ksupsmnf | Contravarant s component of the current with jacobian. |
[in,out] | ksupumnf | Contravarant u component of the current with jacobian. |
[in,out] | ksupvmnf | Contravarant v component of the current with jacobian. |
[in] | bsubsijh | Covariant s component of the magnetic field. |
[in] | bsubuijh | Covariant u component of the magnetic field. |
[in,out] | bsubvijh | Covariant v component of the magnetic field. |
[in,out] | bs_filter | |
[in,out] | bu_filter | |
[in,out] | bv_filter | |
[in,out] | edge_cur | Edge current. |
[out] | jsju_ratio | Ratio of <K^s + r12*K^u>/<K^s - r12*K^u>. |
[in] | iparity | Parity flag for the fouier components. |
[in] | lcurr | UNKNOWN |
[in] | nsmax | Maximum radial index. |
[in] | nsmin | Minimum radial index. |
[in,out] | curtor | Current enclosed at the boundary. |
Definition at line 298 of file siesta_currents.f90.
subroutine siesta_currents::cv_currents | ( | bsupsijh, | |
bsupuijh, | |||
bsupvijh | |||
) |
Compute current density from Curl(B).
Current density K is defined as
K = Curl(B)/mu0 (1)
In curvilinear coordinates this becomes
K^s = 1/sqrt(g)(dB_v/du - dB_u/dv) (2a)
K^u = 1/sqrt(g)(dB_s/dv - dB_v/ds) (2b)
K^v = 1/sqrt(g)(dB_u/ds - dB_s/du) (2c)
where sqrt(g) is the coordinate system Jacobian. Since there are derivatives with respect to s, these routines take the half grid values as input. The contravariant current computed will be on the full grid. These routines also output currents in real space. Note the computed Kmn are [sqrt(g)*K]mn with the embedded jacobian factor.
[in] | bsupsijh | B^s on the half grid. |
[in] | bsupuijh | B^u on the half grid. |
[in] | bsupvijh | B^v on the half grid. |
[in,out] | ksupsijf | K^s on the full grid. |
[in,out] | ksupuijf | K^u on the full grid. |
[in,out] | ksupvijf | K^v on the full grid. |
[in] | lmagen | Logical controlling calc of magnetic energy wb. |
[in] | lcurr | UNKNOWN |
Definition at line 62 of file siesta_currents.f90.
subroutine siesta_currents::getcv | ( | real(dp), dimension(:,:,:), intent(in), allocatable | ksupsmnf, |
real(dp), dimension(:,:,:), intent(in), allocatable | ksupumnf, | ||
real(dp), dimension(:,:,:), intent(in), allocatable | ksupvmnf | ||
) |
Transform full grid contravariant currents to real space.
[in] | ksupsmnf | Contravariant fourier current in the s direction. |
[in] | ksupumnf | Contravariant fourier current in the u direction. |
[in] | ksupvmnf | Contravariant fourier current in the v direction. |
[in,out] | ksupsmnf | Contravariant real space current in the s direction. |
[in,out] | ksupumnf | Contravariant real space current in the u direction. |
[in,out] | ksupvmnf | Contravariant real space current in the v direction. |
[in] | parity | Partity flag fourier components. |
[in] | nsmin | Minimum radial index. |
[in] | nsmax | Maximum radial index. |
Definition at line 415 of file siesta_currents.f90.