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)
Type | Intent | Optional | 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 |
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
Type | Intent | Optional | 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 |
is_end is either nspec for fluxes, or ntubes when calcualting |phi|^2
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | moment | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | moment_ky | ||
real, | intent(in), | dimension(:, -nzgrid:) | :: | flxfac |
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
Type | Intent | Optional | 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 |
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)*(
Type | Intent | Optional | 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 |
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 (
Type | Intent | Optional | 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 |