ORB5  v4.9.4
sources.F90 File Reference

Data Types

type  sources::pointer_ncmatrix
 
type  sources::pointer_intnc
 

Modules

module  sources
 

Functions/Subroutines

subroutine, public sources::init_sources
 Initialize the sources module. More...
 
subroutine, public sources::add_sources (step)
 Add various source terms to the RHS of Vlasov/Boltzmann equation. More...
 
subroutine sources::source_diagnostics (isp, spos, weightperb, ut, utob, av_ut, en, ithread, type)
 Diagnostic for the source terms. More...
 
subroutine sources::heating_init
 Initialize heating source. More...
 
subroutine read_profile_from_file (filename, profile)
 Read radial profile of the heat source from a file. More...
 
subroutine sources::heating_disp (isp)
 Call the heating routines. More...
 
subroutine sources::fixed_heating_basic (isp)
 Heat the plasma using a fixed heat source with a defined radial profile and amplitude. More...
 
subroutine fhs_build_mat (pic1_loc, pic2_loc, npart_loc, isp)
 
subroutine fhs_solve_sys (isp)
 Solve heating conservation system. More...
 
subroutine fhs_apply (pic1_loc, pic2_loc, npart_loc, isp)
 
subroutine sources::fixed_heating_ecrh (pic1_loc, pic2_loc, isp)
 Heat the electrons using the ECRH heating scheme. More...
 
subroutine stix_quantites (isp, st, chit, omega_p, omega_ce, omega_b, P_loc, S_loc, T_loc)
 
subroutine dispersion_relation (isp, theta, P_loc, S_loc, T_loc, N_loc)
 
subroutine compute_integral (isp, omega_b, P_loc, S_loc, T_loc, theta0, int_ref)
 
subroutine compute_thetares (isp, omega_ce, omega_b, P_loc, lambda, theta_res)
 
subroutine compute_group_velocity (isp, N_theta0, omega_p, omega_ce, omega_b, theta, group_velocity)
 
subroutine compute_theta0 (isp, st, chit, theta0_loc)
 
subroutine compute_dn (isp, st, chit, Rt, Zt, vpar, vperp, omega_p, omega_ce, omega_b, P_loc, S_loc, T_loc, tau_abs, Nbin_tau, Dn, s_par, s_perp)
 
subroutine compute_gamma (isp, st, chit, Rt, Zt, vpar, vperp, omega_p, omega_ce, omega_b, P_loc, S_loc, T_loc, tau_abs, Nbin_tau, Dn, s_par, s_perp, Gamma_par, Gamma_perp)
 
subroutine compute_tau_abs (isp, Nbin_tau, tau_abs)
 
subroutine compute_albajar_derivatives (m, xn, yn, A_c, A_x, A_y, A_xy, A_yy)
 
subroutine compute_jm (m, xn, yn, j_m)
 
subroutine compute_gm (m, x_loc, gm, d_gm, dd_gm)
 
subroutine compute_km (m, x_loc, Km, d_Km, dd_Km)
 
subroutine sources::edge_buffer_krook_conserving (pic1_loc, pic2_loc, npart_loc, isp)
 Add a Krook buffer at the outer radial edge to damp df. This Krook conserve density. More...
 
subroutine sources::edge_buffer_krook_non_conserving (pic1_loc, pic2_loc, npart_loc, isp)
 Add a naive Krook buffer at the outer radial edge to damp df. More...
 
subroutine sources::edge_buffer_collisional (pic1_loc, pic2_loc, isp)
 Add a collisional buffer at the outer radial edge to damp df. More...
 
real function sources::get_radial_profile (species, s)
 Get source radial profile at particle's position by interpolation. More...
 
subroutine sources::heating (isp)
 Heating term: damp \delta f(\eps,\psi)->0 in order to control departure of temperature profile from initial state With nl_wdecay_gyro_switch=.true. designed to simulate GYRO heating source. More...
 
subroutine build_heating (pic1_loc, pic2_loc, npart_loc, isp)
 Build heat source. More...
 
subroutine fourier_filter (wtot)
 
subroutine radialcomps (r_bin, q)
 
subroutine apply_heating (pic1_loc, pic2_loc, npart_loc, isp)
 Apply heating source. More...
 
subroutine sources::bin_en_radius (en, sigmak, isp, bin_en, bin_r)
 Compute the bin index of a particle. More...
 
subroutine sources::noise_control_init
 Initialize the noise control. More...
 
subroutine sources::noise_control (isp, act)
 Add a decay term to the weights, while conserving various moments in spatial bins. Also 'splits' weight by collecting adiabatic distributions in bins. More...
 
subroutine build_source_mat (pic1_loc, pic2_loc, npart_loc, isp)
 Builds the source matrix. More...
 
subroutine solve_source_sys (isp)
 Solves the source system. More...
 
subroutine apply_sources (pic1_loc, pic2_loc, npart_loc, isp)
 Apply the noise control to the Vlasov equation. More...
 
subroutine sources::source_cons (moments, ut, ut_over_b, ut_over_b_ba, en, isp)
 Returns the moment M_i to be conserved. More...
 
subroutine sources::force_flow (pic1_loc, pic2_loc, npart_loc, isp)
 
subroutine sources::coarsen (isp)
 Routine to apply coarse graining. More...
 
subroutine smooth (pic1_loc, pic2_loc, npart_loc, isp)
 
integer function bin_cg (phi, chi, uval, muB, Tloc, valid)
 

Variables

integer, dimension(:,:,:), allocatable, save sources::nbin
 
integer, save sources::nbins_nc
 
type(pointer_ncmatrix), dimension(:), allocatable, save sources::ncmat
 
type(pointer_ncmatrix), dimension(:), allocatable, save sources::fhsmat
 
type(pointer_intnc), dimension(:), allocatable, save sources::ncint
 
type(pointer_intnc), dimension(:), allocatable, save sources::fhsint
 
integer, save sources::nbins_r
 
integer, save sources::nbins_en
 
real, dimension(:,:,:,:), allocatable, save sources::wtot
 
real, dimension(:,:,:,:), allocatable, save sources::wtot2
 
real, dimension(:,:,:,:), allocatable, save sources::ntot
 
real, dimension(:,:,:,:), allocatable, save sources::ftot
 
real, dimension(:,:,:,:), allocatable, save sources::v2ft
 
real, dimension(:,:,:), allocatable, save sources::source_part
 
real, dimension(:,:,:), allocatable, save sources::source_heat
 
real, dimension(:,:,:), allocatable, save sources::f0_bins
 
real, dimension(:,:,:), allocatable, save sources::v2ft2
 
real, dimension(:), allocatable, save sources::wtot_all_ff
 
real, dimension(:), allocatable, save sources::wtot_all_f0
 
real, dimension(:,:), allocatable, save sources::en_max
 
real, dimension(:,:), allocatable, save sources::radial_profile
 
real, dimension(:), allocatable, save sources::rpar
 
integer, parameter sources::momentcons =3
 
integer, parameter sources::maxmoments =4
 
integer, dimension(:,:), allocatable, save sources::wd_cons
 
integer, dimension(:), allocatable, save sources::nmoments
 

Function/Subroutine Documentation

◆ apply_heating()

subroutine heating::apply_heating ( real, dimension(:,:), intent(inout)  pic1_loc,
real, dimension(:,:), intent(inout)  pic2_loc,
integer, intent(in)  npart_loc,
integer, intent(in)  isp 
)
private

Apply heating source.

Parameters
[in]npart_locLocal number of particles
[in,out]pic1_locMarkers from pic1 array
[in,out]pic2_locMarkers from pic2 array
[in]ispCurrent species
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply_sources()

subroutine noise_control::apply_sources ( real, dimension(:,:), intent(inout)  pic1_loc,
real, dimension(:,:), intent(inout)  pic2_loc,
integer, intent(in)  npart_loc,
integer, intent(in)  isp 
)
private

Apply the noise control to the Vlasov equation.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bin_cg()

integer function coarsen::bin_cg ( real, intent(in)  phi,
real, intent(in)  chi,
real, intent(in)  uval,
real, intent(in)  muB,
real, intent(in)  Tloc,
logical, intent(out)  valid 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ build_heating()

subroutine heating::build_heating ( real, dimension(:,:), intent(inout)  pic1_loc,
real, dimension(:,:), intent(inout)  pic2_loc,
integer, intent(in)  npart_loc,
integer, intent(in)  isp 
)
private

Build heat source.

Parameters
[in,out]pic1_locMarkers from pic1 array
[in,out]pic2_locMarkers from pic2 array
[in]npart_locLocal number of particles
[in]ispCurrent species
Note
This source term won't be added if wdecay_heatrate is 0.0
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ build_source_mat()

subroutine noise_control::build_source_mat ( real, dimension(:,:), intent(inout)  pic1_loc,
real, dimension(:,:), intent(inout)  pic2_loc,
integer, intent(in)  npart_loc,
integer, intent(in)  isp 
)

Builds the source matrix.

Parameters
[in]npart_locLocal number of particles
[in,out]pic1_locArray containing the non-static properties of the markers
[in,out]pic2_locArray containing the static propoerties of the markers
[in]ispSpecies under consideration
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_albajar_derivatives()

subroutine fixed_heating_ecrh::compute_albajar_derivatives ( integer, intent(in)  m,
real, intent(in)  xn,
real, intent(in)  yn,
real, intent(out)  A_c,
real, intent(out)  A_x,
real, intent(out)  A_y,
real, intent(out)  A_xy,
real, intent(out)  A_yy 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_dn()

subroutine fixed_heating_ecrh::compute_dn ( integer, intent(in)  isp,
real, intent(in)  st,
real, intent(in)  chit,
real, intent(in)  Rt,
real, intent(in)  Zt,
real, intent(in)  vpar,
real, intent(in)  vperp,
real, intent(in)  omega_p,
real, intent(in)  omega_ce,
real, intent(in)  omega_b,
real, intent(in)  P_loc,
real, intent(in)  S_loc,
real, intent(in)  T_loc,
real, dimension(:), intent(in)  tau_abs,
integer, intent(in)  Nbin_tau,
real, intent(out)  Dn,
real, intent(out)  s_par,
real, intent(out)  s_perp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_gamma()

subroutine fixed_heating_ecrh::compute_gamma ( integer, intent(in)  isp,
real, intent(in)  st,
real, intent(in)  chit,
real, intent(in)  Rt,
real, intent(in)  Zt,
real, intent(in)  vpar,
real, intent(in)  vperp,
real, intent(in)  omega_p,
real, intent(in)  omega_ce,
real, intent(in)  omega_b,
real, intent(in)  P_loc,
real, intent(in)  S_loc,
real, intent(in)  T_loc,
real, dimension(:), intent(in)  tau_abs,
integer, intent(in)  Nbin_tau,
real, intent(in)  Dn,
real, intent(in)  s_par,
real, intent(in)  s_perp,
real, intent(out)  Gamma_par,
real, intent(out)  Gamma_perp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_gm()

subroutine fixed_heating_ecrh::compute_gm ( integer, intent(in)  m,
real, intent(in)  x_loc,
real, intent(out)  gm,
real, intent(out)  d_gm,
real, intent(out)  dd_gm 
)
private
+ Here is the caller graph for this function:

◆ compute_group_velocity()

subroutine fixed_heating_ecrh::compute_group_velocity ( integer, intent(in)  isp,
real, intent(in)  N_theta0,
real, intent(in)  omega_p,
real, intent(in)  omega_ce,
real, intent(in)  omega_b,
real, intent(in)  theta,
real, intent(out)  group_velocity 
)
private
+ Here is the caller graph for this function:

◆ compute_integral()

subroutine fixed_heating_ecrh::compute_integral ( integer, intent(in)  isp,
real, intent(in)  omega_b,
real, intent(in)  P_loc,
real, intent(in)  S_loc,
real, intent(in)  T_loc,
real, intent(in)  theta0,
real, intent(out)  int_ref 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_jm()

subroutine fixed_heating_ecrh::compute_jm ( integer, intent(in)  m,
real, intent(in)  xn,
real, intent(in)  yn,
complex, intent(out)  j_m 
)
private
+ Here is the caller graph for this function:

◆ compute_km()

subroutine fixed_heating_ecrh::compute_km ( integer, intent(in)  m,
real, intent(in)  x_loc,
real, intent(out)  Km,
real, intent(out)  d_Km,
real, intent(out)  dd_Km 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_tau_abs()

subroutine fixed_heating_ecrh::compute_tau_abs ( integer, intent(in)  isp,
integer, intent(in)  Nbin_tau,
real, dimension(:), intent(inout)  tau_abs 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_theta0()

subroutine fixed_heating_ecrh::compute_theta0 ( integer, intent(in)  isp,
real, intent(in)  st,
real, intent(in)  chit,
real, intent(out)  theta0_loc 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute_thetares()

subroutine fixed_heating_ecrh::compute_thetares ( integer, intent(in)  isp,
real, intent(in)  omega_ce,
real, intent(in)  omega_b,
real, intent(in)  P_loc,
real, intent(in)  lambda,
real, intent(out)  theta_res 
)
private
+ Here is the caller graph for this function:

◆ dispersion_relation()

subroutine fixed_heating_ecrh::dispersion_relation ( integer, intent(in)  isp,
real, intent(in)  theta,
real, intent(in)  P_loc,
real, intent(in)  S_loc,
real, intent(in)  T_loc,
real, intent(out)  N_loc 
)
+ Here is the caller graph for this function:

◆ fhs_apply()

subroutine fixed_heating_basic::fhs_apply ( real, dimension(:,:), intent(inout)  pic1_loc,
real, dimension(:,:), intent(inout)  pic2_loc,
integer, intent(in)  npart_loc,
integer, intent(in)  isp 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fhs_build_mat()

subroutine fixed_heating_basic::fhs_build_mat ( real, dimension(:,:), intent(inout)  pic1_loc,
real, dimension(:,:), intent(inout)  pic2_loc,
integer, intent(in)  npart_loc,
integer, intent(in)  isp 
)
private
Parameters
[in]npart_locLocal number of particles
[in,out]pic1_locArray containing the non-static properties of the markers
[in,out]pic2_locArray containing the static propoerties of the markers
[in]ispSpecies under consideration
Bug:
No support for OpenMP for the moment
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fhs_solve_sys()

subroutine fixed_heating_basic::fhs_solve_sys ( integer, intent(in)  isp)

Solve heating conservation system.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fourier_filter()

subroutine heating::fourier_filter ( real, dimension(:,:), intent(inout)  wtot)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ radialcomps()

subroutine heating::radialcomps ( integer, intent(in)  r_bin,
real, dimension(:), intent(inout)  q 
)
private
Parameters
[in]r_binRadial bin index
[in,out]qTrigonometric factors
+ Here is the caller graph for this function:

◆ read_profile_from_file()

subroutine heating_init::read_profile_from_file ( character(len=*), intent(in)  filename,
real, dimension(:), intent(out)  profile 
)

Read radial profile of the heat source from a file.

This subroutine is made to read .dat files produced by the script ./matlab/lanti/python/heat_source.py It assumes that the actual profile begins at the sixth line.

Author
Emmanuel Lanti
Parameters
[in]filenameName of the file containing the radial profile
[out]profileRadial profile read from file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ smooth()

subroutine coarsen::smooth ( real, dimension(:,:), intent(inout)  pic1_loc,
real, dimension(:,:), intent(inout)  pic2_loc,
integer, intent(in)  npart_loc,
integer, intent(in)  isp 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ solve_source_sys()

subroutine noise_control::solve_source_sys ( integer, intent(in)  isp)

Solves the source system.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stix_quantites()

subroutine fixed_heating_ecrh::stix_quantites ( integer, intent(in)  isp,
real, intent(in)  st,
real, intent(in)  chit,
real, intent(out)  omega_p,
real, intent(out)  omega_ce,
real, intent(out)  omega_b,
real, intent(out)  P_loc,
real, intent(out)  S_loc,
real, intent(out)  T_loc 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: