mc_halo Subroutine

public subroutine mc_halo(plasma, ai, vhalo)

Generate velocity vector from a thermal Maxwellian distribution

Arguments

TypeIntentOptionalAttributesName
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]


Calls

proc~~mc_halo~~CallsGraph proc~mc_halo mc_halo interface~randn randn proc~mc_halo->interface~randn

Called by

proc~~mc_halo~~CalledByGraph proc~mc_halo mc_halo proc~dcx_spec dcx_spec proc~dcx_spec->proc~mc_halo proc~dcx dcx proc~dcx->proc~mc_halo proc~halo halo proc~halo->proc~mc_halo proc~read_equilibrium read_equilibrium proc~read_equilibrium->proc~mc_halo proc~halo_spec halo_spec proc~halo_spec->proc~mc_halo proc~cold_spec cold_spec proc~cold_spec->proc~mc_halo program~fidasim fidasim program~fidasim->proc~dcx_spec program~fidasim->proc~dcx program~fidasim->proc~halo program~fidasim->proc~read_equilibrium program~fidasim->proc~halo_spec program~fidasim->proc~cold_spec

Contents

Source Code


Source Code

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