pkGetSources
pkGetSources
-- Gets the source terms for the continuity equations and the relative
contribution of each processThe 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] )
Name | Description | Data type and attributes |
---|---|---|
{LDensity(NnTV) | LDensity(NnTV+NPhot)} | Local density of species with variable concentration | REAL(double), INTENT(IN) |
SrcC(NnTV) | Collisional gain term of continuity equations | REAL(double), INTENT(OUT) |
SrcP(NnTV) | Collisional loss term of continuity equations divided by
LDensity | REAL(double), OPTIONAL, INTENT(OUT) |
Ratios(NKgas,NnTV) | Percent contribution of each reaction to the collisional source and loss terms of each species | REAL(double), OPTIONAL, INTENT(OUT) |
locus | Identifies where the reactions take place | CHARACTER(10), OPTIONAL, INTENT(IN) |
STAT | Execution status indicator | INTEGER, 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) ) END DO