Skip to contents

These functions calculates flux or concentration profile of a gas based on fixed production and known diffusion coefficient Ds. The basis is a step-wise calculation beginning from the bottom-most layer with incoming flux F0 and known concentration C0 at the lower end of the step.

The following input parameters must be vectors sorted from the lowest depth of the profile to the highest. Note that the assigned units are examples. However, units should be concise and match over all parameters. The functions are designed to be used in optimization and are hence as fast as possible.

Usage

prod_mod_conc(prod, height, DS, F0, C0)

prod_mod_flux(prod, height, F0)

Arguments

prod

the production assigned to this step production in \(\mu~mol/s/m^3\)

height

the height of each step in m

DS

the diffusion coefficient DS in \(m^2/s\)

F0

(numeric) Incoming flux to lowest step in \(\mu mol/m^2/s\)

C0

(numeric) Concentration at the lower end of the lowest step in \(\mu mol/m^3\).

Value

conc in \(\mu mol/m^3\) or flux in \(\mu mol/m^2/s\) at top of each step.

Functions

  • prod_mod_flux(): flux output only

See also

Other proflux: prod_optim()

Examples

prod_mod_conc(prod = c(0.01,0.02,0.65,0.5,0.4),
              height = c(0.5,0.2,0.1,0.03,0.02),
              DS = c(rep(2.5E-7,3),rep(1E-6,2)),
              F0=0,
              C0=48000E-6)
#> [1]  -4999.952 -10599.952 -27199.952 -29644.952 -31504.952
prod_mod_flux(prod = c(0.01,0.02,0.65,0.5,0.4),
              height = c(0.5,0.2,0.1,0.03,0.02),
              F0=0
              )
#> [1] 0.005 0.009 0.074 0.089 0.097