MODFLOW 6  version 6.7.0.dev3
USGS Modular Hydrologic Model
langmuirisothermmodule Module Reference

Data Types

interface  langmuirisothermtype
 Langmuir isotherm implementation of IsothermType. More...
 

Functions/Subroutines

type(langmuirisothermtype) function constructor (Kl, Sbar)
 Constructor for Langmuir isotherm. More...
 
real(dp) function value (this, c, n)
 Evaluate the isotherm at a given node. More...
 
real(dp) function derivative (this, c, n)
 Evaluate derivative of the isotherm at a given node. More...
 

Function/Subroutine Documentation

◆ constructor()

type(langmuirisothermtype) function langmuirisothermmodule::constructor ( real(dp), dimension(:), intent(in), pointer  Kl,
real(dp), dimension(:), intent(in), pointer  Sbar 
)
private
Parameters
[in]klLangmuir constant
[in]sbarTotal concentration of sorption sites

Definition at line 29 of file LangmuirIsotherm.f90.

30  ! -- return
31  type(LangmuirIsothermType) :: isotherm
32  ! -- dummy
33  real(DP), pointer, dimension(:), intent(in) :: Kl !< Langmuir constant
34  real(DP), pointer, dimension(:), intent(in) :: Sbar !< Total concentration of sorption sites
35  ! -- local
36 
37  isotherm%Kl => kl
38  isotherm%Sbar => sbar
39 
Here is the caller graph for this function:

◆ derivative()

real(dp) function langmuirisothermmodule::derivative ( class(langmuirisothermtype), intent(in)  this,
real(dp), dimension(:), intent(in)  c,
integer(i4b), intent(in)  n 
)
private
Returns
derivative d(value)/dc evaluated at c
Parameters
[in]cconcentration array
[in]nnode index

Definition at line 64 of file LangmuirIsotherm.f90.

65  ! -- return
66  real(DP) :: derv !< derivative d(value)/dc evaluated at c
67  ! -- dummy
68  class(LangmuirIsothermType), intent(in) :: this
69  real(DP), dimension(:), intent(in) :: c !< concentration array
70  integer(I4B), intent(in) :: n !< node index
71  ! -- local
72  real(DP) :: denom
73 
74  if (c(n) > 0.0_dp) then
75  denom = (1.0_dp + this%Kl(n) * c(n))**2.0_dp
76  derv = (this%Sbar(n) * this%Kl(n)) / denom
77  else
78  derv = 0.0_dp
79  end if

◆ value()

real(dp) function langmuirisothermmodule::value ( class(langmuirisothermtype), intent(in)  this,
real(dp), dimension(:), intent(in)  c,
integer(i4b), intent(in)  n 
)
private
Returns
isotherm value
Parameters
[in]cconcentration array
[in]nnode index

Definition at line 44 of file LangmuirIsotherm.f90.

45  ! -- return
46  real(DP) :: val !< isotherm value
47  ! -- dummy
48  class(LangmuirIsothermType), intent(in) :: this
49  real(DP), dimension(:), intent(in) :: c !< concentration array
50  integer(I4B), intent(in) :: n !< node index
51  ! -- local
52  real(DP) :: denom
53 
54  if (c(n) > 0.0_dp) then
55  denom = 1.0_dp + this%Kl(n) * c(n)
56  val = (this%Sbar(n) * this%Kl(n) * c(n)) / denom
57  else
58  val = 0.0_dp
59  end if