korc_spatial_distribution Module

This distribution is generated using the Inverse Transform Sampling method. This distribution follows the same radial distribution of a uniform disk/ring distribution, see the documentation of the disk subroutine.

Core KORC simulation parameters.

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

Radial position of the particles .

Uniform deviates in the range representing the uniform poloidal angle distribution of the particles.

Uniform deviates in the range representing the uniform toroidal angle distribution of the particles.


Uses

  • module~~korc_spatial_distribution~~UsesGraph module~korc_spatial_distribution korc_spatial_distribution module~korc_avalanche korc_avalanche module~korc_spatial_distribution->module~korc_avalanche module~korc_hpc korc_hpc module~korc_spatial_distribution->module~korc_hpc module~korc_input korc_input module~korc_spatial_distribution->module~korc_input module~korc_rnd_numbers korc_rnd_numbers module~korc_spatial_distribution->module~korc_rnd_numbers module~korc_profiles korc_profiles module~korc_spatial_distribution->module~korc_profiles module~korc_hdf5 korc_HDF5 module~korc_spatial_distribution->module~korc_hdf5 module~korc_experimental_pdf korc_experimental_pdf module~korc_spatial_distribution->module~korc_experimental_pdf module~korc_constants korc_constants module~korc_spatial_distribution->module~korc_constants module~korc_hammersley_generator korc_hammersley_generator module~korc_spatial_distribution->module~korc_hammersley_generator module~korc_fields korc_fields module~korc_spatial_distribution->module~korc_fields module~korc_random korc_random module~korc_spatial_distribution->module~korc_random module~korc_types korc_types module~korc_spatial_distribution->module~korc_types module~korc_avalanche->module~korc_hpc module~korc_avalanche->module~korc_input module~korc_avalanche->module~korc_profiles module~korc_avalanche->module~korc_hdf5 module~korc_avalanche->module~korc_constants module~korc_avalanche->module~korc_fields module~korc_avalanche->module~korc_types module~korc_coords korc_coords module~korc_avalanche->module~korc_coords module~korc_hpc->module~korc_types omp_lib omp_lib module~korc_hpc->omp_lib mpi mpi module~korc_hpc->mpi module~korc_input->module~korc_hpc module~korc_input->module~korc_types module~korc_rnd_numbers->module~korc_types ifport ifport module~korc_rnd_numbers->ifport module~korc_profiles->module~korc_hpc module~korc_profiles->module~korc_input module~korc_profiles->module~korc_hdf5 module~korc_profiles->module~korc_types module~korc_interp korc_interp module~korc_profiles->module~korc_interp module~korc_profiles->module~korc_coords module~korc_hdf5->module~korc_hpc module~korc_hdf5->module~korc_constants module~korc_hdf5->module~korc_types HDF5 HDF5 module~korc_hdf5->HDF5 module~korc_experimental_pdf->module~korc_hpc module~korc_experimental_pdf->module~korc_input module~korc_experimental_pdf->module~korc_rnd_numbers module~korc_experimental_pdf->module~korc_hdf5 module~korc_experimental_pdf->module~korc_constants module~korc_experimental_pdf->module~korc_fields module~korc_experimental_pdf->module~korc_random module~korc_experimental_pdf->module~korc_types module~korc_experimental_pdf->module~korc_interp module~special_functions special_functions module~korc_experimental_pdf->module~special_functions module~korc_experimental_pdf->module~korc_coords module~korc_constants->module~korc_types module~korc_hammersley_generator->module~korc_types module~korc_fields->module~korc_hpc module~korc_fields->module~korc_input module~korc_fields->module~korc_hdf5 module~korc_fields->module~korc_types module~korc_fields->module~korc_interp module~korc_fields->module~korc_coords module~korc_random->module~korc_types iso_c_binding iso_c_binding module~korc_random->iso_c_binding module~korc_types->iso_c_binding module~korc_interp->module~korc_hpc module~korc_interp->module~korc_rnd_numbers module~korc_interp->module~korc_types module~korc_interp->module~korc_coords EZspline_obj EZspline_obj module~korc_interp->EZspline_obj EZspline EZspline module~korc_interp->EZspline module~korc_fio korc_fio module~korc_interp->module~korc_fio module~korc_coords->module~korc_constants module~korc_coords->module~korc_types module~korc_fio->module~korc_input module~korc_fio->module~korc_hdf5 module~korc_fio->module~korc_types module~korc_fio->iso_c_binding module~korc_fio->mpi

Used by

  • module~~korc_spatial_distribution~~UsedByGraph module~korc_spatial_distribution korc_spatial_distribution module~korc_initialize korc_initialize module~korc_initialize->module~korc_spatial_distribution program~main main program~main->module~korc_initialize

Contents


Variables

TypeVisibility AttributesNameInitial
real(kind=rp), private, parameter:: minmax_buffer_size =10.0_rp

Functions

private function fzero(r, a, ko, P) result(f)

Read more…

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in) :: r
real(kind=rp), intent(in) :: a
real(kind=rp), intent(in) :: ko
real(kind=rp), intent(in) :: P

Return Value real(kind=rp)

private function PSI_ROT(R, R0, sigR, Z, Z0, sigZ, theta)

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in) :: R

R-coordinate of MH sampled location

real(kind=rp), intent(in) :: R0

R-coordinate of center of 2D Gaussian

real(kind=rp), intent(in) :: sigR

Variance of first dimension of 2D Gaussian

real(kind=rp), intent(in) :: Z

Z-coordinate of MH sampled location

real(kind=rp), intent(in) :: Z0

Z-coordinate of center of 2D Gaussian

real(kind=rp), intent(in) :: sigZ

Variance of second dimension of 2D Gaussian

real(kind=rp), intent(in) :: theta

Angle of counter-clockwise rotation (in radians), of 2D Gaussian distribution relative to R,Z

Return Value real(kind=rp)

Argument of exponential comprising 2D Gaussian distribution

private function indicator(psi, psi_max)

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in) :: psi
real(kind=rp), intent(in) :: psi_max

Return Value real(kind=rp)

public function random_norm(mean, sigma)

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in) :: mean
real(kind=rp), intent(in) :: sigma

Return Value real(kind=rp)

private function Spong_2D(R0, b, w, dlam, R, Z, T)

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in) :: R0
real(kind=rp), intent(in) :: b
real(kind=rp), intent(in) :: w
real(kind=rp), intent(in) :: dlam
real(kind=rp), intent(in) :: R
real(kind=rp), intent(in) :: Z
real(kind=rp), intent(in) :: T

Return Value real(kind=rp)

public function fRE_BMC(Nr_a, r_a, nRE, rm)

Arguments

Type IntentOptional AttributesName
integer :: Nr_a
real(kind=rp), intent(in), dimension(Nr_a):: r_a
real(kind=rp), intent(in), dimension(Nr_a):: nRE
real(kind=rp), intent(in) :: rm

Return Value real(kind=rp)


Subroutines

private subroutine uniform(spp)

Read more…

Arguments

Type IntentOptional AttributesName
type(SPECIES), intent(inout) :: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

private subroutine disk(params, spp)

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params

Core KORC simulation parameters.

type(SPECIES), intent(inout) :: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

private subroutine torus(params, spp)

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params
type(SPECIES), intent(inout) :: spp

private subroutine elliptic_torus(params, spp)

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params

Core KORC simulation parameters.

type(SPECIES), intent(inout) :: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

private subroutine exponential_torus(params, spp)

@brief Subroutine that generates a exponentially decaying radial distribution of particles in a circular cross-section torus of major and minor radi and , respectively. @details We generate this exponentially decaying radial distribution following the same approach as in \ref korc_spatial_distribution.disk, but this time, the radial distribution is given by:

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params
type(SPECIES), intent(inout) :: spp

private subroutine exponential_elliptic_torus(params, spp)

@brief Subroutine that generates an exponentially decaying radial distribution in an elliptic torus as the initial spatial condition of a given particle species in the simulation. @details As a first step, we generate an exponentially decaying radial distribution in a circular cross-section torus as in \ref korc_spatial_distribution.exponential_torus. Then we transform this spatial distribution to a one in an torus with an elliptic cross section, this following the same approach as in \ref korc_spatial_distribution.elliptic_torus.

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params
type(SPECIES), intent(inout) :: spp

private subroutine gaussian_elliptic_torus(params, spp)

@brief Subroutine that generates a Gaussian radial distribution in an elliptic torus as the initial spatial condition of a given particle species in the simulation. @details As a first step, we generate an Gaussian radial distribution in a circular cross-section torus as in \ref korc_spatial_distribution.gaussian_torus. Then we transform this spatial distribution to a one in an torus with an elliptic cross section, this following the same approach as in \ref korc_spatial_distribution.elliptic_torus.

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params
type(SPECIES), intent(inout) :: spp

private subroutine MH_gaussian_elliptic_torus(params, spp)

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params

Core KORC simulation parameters.

type(SPECIES), intent(inout) :: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

private subroutine gaussian_torus(params, spp)

@brief Subroutine that generates a Gaussian radial distribution of particles in a circular cross-section torus of major and minor radi and , respectively. @details We generate this exponentially decaying radial distribution following the same approach as in \ref korc_spatial_distribution.disk, but this time, the radial distribution is given by:

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params
type(SPECIES), intent(inout) :: spp

private subroutine Spong_3D(params, spp)

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params

Core KORC simulation parameters.

type(SPECIES), intent(inout) :: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

Read more…

private subroutine MH_psi(params, spp, F)

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(inout) :: params

Core KORC simulation parameters.

type(SPECIES), intent(inout) :: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

type(FIELDS), intent(in) :: F

An instance of the KORC derived type FIELDS.

public subroutine FIO_therm(params, spp, F, P)

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(inout) :: params

Core KORC simulation parameters.

type(SPECIES), intent(inout) :: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

type(FIELDS), intent(in) :: F

An instance of the KORC derived type FIELDS.

type(PROFILES), intent(in) :: P

public subroutine load_data_from_hdf5_BMC(params, Nr_a, r_a, nRE)

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(in) :: params
integer, intent(out) :: Nr_a
real(kind=rp), intent(out), ALLOCATABLE, DIMENSION(:):: r_a
real(kind=rp), intent(out), ALLOCATABLE, DIMENSION(:):: nRE

public subroutine BMC_radial(params, spp, F, P)

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(inout) :: params

Core KORC simulation parameters.

type(SPECIES), intent(inout) :: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

type(FIELDS), intent(in) :: F

An instance of the KORC derived type FIELDS.

type(PROFILES), intent(in) :: P

public subroutine intitial_spatial_distribution(params, spp, P, F)

Read more…

Arguments

Type IntentOptional AttributesName
type(KORC_PARAMS), intent(inout) :: params

Core KORC simulation parameters.

type(SPECIES), intent(inout), DIMENSION(:), ALLOCATABLE:: spp

An instance of the derived type SPECIES containing all the parameters and simulation variables of the different species in the simulation.

type(PROFILES), intent(in) :: P

An instance of the KORC derived type PROFILES.

type(FIELDS), intent(in) :: F

An instance of the KORC derived type FIELDS.