Subroutine that returns the value of a uniform magnetic field.
This subroutine is used only when the simulation is ran for a 'UNIFORM' plasma. As a convention, in a uniform plasma we set .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FIELDS), | intent(in) | :: | F | An instance of the KORC derived type FIELDS. |
||
real(kind=rp), | intent(inout), | DIMENSION(:,:), ALLOCATABLE | :: | B | Magnetic field components in Cartesian coordinates; B(1,:) = , B(2,:) = , B(3,:) = |
subroutine uniform_magnetic_field(F,B)
!! @note Subroutine that returns the value of a uniform magnetic
!! field. @endnote
!! This subroutine is used only when the simulation is ran for a
!! 'UNIFORM' plasma. As a convention, in a uniform plasma we
!! set \(\mathbf{B} = B_0 \hat{x}\).
TYPE(FIELDS), INTENT(IN) :: F
!! An instance of the KORC derived type FIELDS.
REAL(rp), DIMENSION(:,:), ALLOCATABLE, INTENT(INOUT) :: B
!! Magnetic field components in Cartesian coordinates;
!! B(1,:) = \(B_x\), B(2,:) = \(B_y\), B(3,:) = \(B_z\)
B(:,1) = F%Bo
B(:,2:3) = 0.0_rp
end subroutine uniform_magnetic_field