pkGetSources -- Gets the source terms for the continuity equations and the relative contribution of each process


The subroutine pkGetSources evaluates the collisional source and loss terms of the continuity equations for each species. The relative contribution of each reaction can also be evaluated.


pkGetSources( LDensity, SrcC[, SrcP][, Ratios][, locus][, STAT] )

NameDescriptionData type and attributes

{LDensity(NnTV) | LDensity(NnTV+NPhot)}

Local density of species with variable concentrationREAL(double), INTENT(IN)
SrcC(NnTV)Collisional gain term of continuity equationsREAL(double), INTENT(OUT)
SrcP(NnTV)Collisional loss term of continuity equations divided by LDensityREAL(double), OPTIONAL, INTENT(OUT)
Ratios(NKgas,NnTV)Percent contribution of each reaction to the collisional source and loss terms of each speciesREAL(double), OPTIONAL, INTENT(OUT)
locusIdentifies where the reactions take placeCHARACTER(10), OPTIONAL, INTENT(IN)
STATExecution status indicatorINTEGER, OPTIONAL, INTENT(OUT)


The gain term is in L-3s-1 units where L-3 is the unit used to indicate the gas density in the data file; the loss term is in s-1 units.

STAT = 0: no errors; STAT = n: error number.


If locus is not present or is equal to 'gas', the reactions are in the gas. Otherwise the reactions are on a surface and the value of locus identifies the surface. This allows having different reactions on different surfaces.

The dimensions of array LDensity can be NnTV or NnTV+NPhot. In the first case we do not consider reactions with photons. In the second case and after the initial NnTV values of the density of variable species, the LDensity array also includes the densities of NPhot photons.

In the previous version of PLASMAKIN the photon density was set by an independent routine pkSetPhoton. With the increase of the size of LDensity to NnTV+NPhot this routine was no longer needed and was removed.


Example E-8. pkGetSources: Computing the source terms in a 1D discharge, taking into account gas temperature gradients.

  INTEGER                   :: i, Nxp
  REAL(double)              :: Tgas(Nxp)
  REAL(double), ALLOCATABLE :: Dens(:,:), SrcC(:,:), SrcP(:,:)
  ALLOCATE( Dens(NnTV,Nxp), SrcC(NnTV,Nxp), SrcP(NnTV,Nxp) )
  DO i = 1, Nxp
    CALL pkSetValue( GasTemp=Tgas(i) )
    CALL pkGetSources( Dens(:,i), SrcC(:,i), SrcP(:,i) )