diagnostics_fluxes_fullfluxsurface Module


Subroutines

public subroutine calculate_fluxes_fullfluxsurface(dens, upar, pres, pflux_vs_s, vflux_vs_s, qflux_vs_s, pflux_kxkyzts, vflux_kxkyzts, qflux_kxkyzts)

Calculate the total particle, momentum and heat fluxes (pflux_vs_s, vflux_vs_s, qflux_vs_s) and the contributions from a given (kx,ky,z) location (pflux_kxkyz, vflux_kxkyz, qflux_kxkyz) inputs are the particle density (dens), parallel flow (upar) and pressure (pres)

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :) :: dens
complex, intent(in), dimension(:, :, -nzgrid:, :) :: upar
complex, intent(in), dimension(:, :, -nzgrid:, :) :: pres
real, intent(out), dimension(:) :: pflux_vs_s
real, intent(out), dimension(:) :: vflux_vs_s
real, intent(out), dimension(:) :: qflux_vs_s
real, intent(out), dimension(:, :, -nzgrid:, :, :) :: pflux_kxkyzts
real, intent(out), dimension(:, :, -nzgrid:, :, :) :: vflux_kxkyzts
real, intent(out), dimension(:, :, -nzgrid:, :, :) :: qflux_kxkyzts

private subroutine get_one_flux_ffs(mom, dphidy, flxfac, flx, flx_vs_kxkyz)

Multiply input moment (e.g. density, momentum, or energy) but Jacobian (called flxfac) Need to do this because Jacobian has y-dependence then Fourier transform back to (ky,kx)-space pflx_vs_kxkyz is the particle flux before summing over (kx,ky) and integrating over z calculate the volume average of the particle flux note that the factor of 1/B that appears in the Jacobian has already been taken into account in the numerator of the flux surface average

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :) :: mom
complex, intent(in), dimension(:, :, -nzgrid:) :: dphidy
real, intent(in), dimension(:, -nzgrid:) :: flxfac
real, intent(out), dimension(:) :: flx
real, intent(out), dimension(:, :, -nzgrid:, :) :: flx_vs_kxkyz

private subroutine get_modified_fourier_coefficient(moment, moment_ky, flxfac)

is_end is either nspec for fluxes, or ntubes when calcualting |phi|^2

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :) :: moment
complex, intent(out), dimension(:, :, -nzgrid:, :) :: moment_ky
real, intent(in), dimension(:, -nzgrid:) :: flxfac

public subroutine calculate_moments_fullfluxsurface(g, dens, upar, pres)

For momentum flux species-dependent factor by which velocity moments must be multiplied to get density, pressure, etc. set species-dependent factors needed for density, parallel flow and pressure Already allocated arrays (allocated in time_advance.f90). Set to zero just in case

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
complex, intent(out), dimension(:, :, -nzgrid:, :) :: dens
complex, intent(out), dimension(:, :, -nzgrid:, :) :: upar
complex, intent(out), dimension(:, :, -nzgrid:, :) :: pres

private subroutine g_to_f0(g, phi, f)

the Fourier components of the guiding centre distribution function normalized by the equilibrium Maxwellian is passed in as g, along with the Fourier components of the electrostatic potential, phi. g_to_f calculates the Maxwellian-normalized distribution function f, which is related to g via f = g + (Ze/T)*(_R - phi)

Read more…

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
complex, intent(in), dimension(:, :, -nzgrid:, :) :: phi
complex, intent(out), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: f

private subroutine g_to_f1(g, phi, f)

compute phi * maxwellian in real space and transform back to k-space phiy = maxwellian * phi Put this back into k-space for future calculations Note that adjust here is (_R - phi) * maxwellian calculate the normalized f, given (_R - phi) f = g + Z/T * ( - phi) * maxwellian f = g + J0 * phi * maxwellian

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
complex, intent(in), dimension(:, :, -nzgrid:, :) :: phi
complex, intent(out), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: f