Generate velocity vector from a thermal Maxwellian distribution
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(LocalProfiles), | intent(in) | :: | plasma | Plasma Parameters |
||
real(kind=Float64), | intent(in) | :: | ai | Ion mass [amu] |
||
real(kind=Float64), | intent(out), | dimension(3) | :: | vhalo | Velocity [cm/s] |
subroutine mc_halo(plasma, ai, vhalo)
!+ Generate velocity vector from a thermal Maxwellian distribution
type(LocalProfiles), intent(in) :: plasma
!+ Plasma Parameters
real(Float64), intent(in) :: ai
!+ Ion mass [amu]
real(Float64), dimension(3), intent(out) :: vhalo
!+ Velocity [cm/s]
real(Float64), dimension(3) :: random3
call randn(random3)
vhalo = plasma%vrot + sqrt(plasma%ti*0.5/(v2_to_E_per_amu*ai))*random3 !![cm/s]
end subroutine mc_halo