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

Functions/Subroutines

class(isothermtype) function, pointer, public create_isotherm (isotherm_type, distcoef, sp2)
 Create an isotherm object based on type and parameters. More...
 

Function/Subroutine Documentation

◆ create_isotherm()

class(isothermtype) function, pointer, public isothermfactorymodule::create_isotherm ( integer(i4b), intent(in)  isotherm_type,
real(dp), dimension(:), pointer, contiguous  distcoef,
real(dp), dimension(:), pointer, contiguous  sp2 
)

Returns a pointer to a concrete IsothermType (or null() if sorption is off). Uses isotherm_type to select Linear, Freundlich, or Langmuir, passing distcoef and sp2 as required by the chosen model.

Returns
allocated concrete isotherm or null()
Parameters
[in]isotherm_typeenumerator from IsothermEnumModule
distcoefprimary coefficient (Kd, Kf, or Kl)
sp2secondary parameter (a for Freundlich, Sbar for Langmuir)

Definition at line 24 of file IsothermFactory.f90.

25  ! -- result
26  class(IsothermType), pointer :: isotherm !< allocated concrete isotherm or null()
27  ! -- dummy
28  integer(I4B), intent(in) :: isotherm_type !< enumerator from `IsothermEnumModule`
29  real(DP), dimension(:), pointer, contiguous :: distcoef !< primary coefficient (Kd, Kf, or Kl)
30  real(DP), dimension(:), pointer, contiguous :: sp2 !< secondary parameter (a for Freundlich, Sbar for Langmuir)
31 
32  select case (isotherm_type)
33  case (sorption_off)
34  nullify (isotherm)
35  case (sorption_linear)
36  allocate (isotherm, source=linearisothermtype(distcoef))
37  case (sorption_freund)
38  allocate (isotherm, source=freundlichisothermtype(distcoef, sp2))
39  case (sorption_lang)
40  allocate (isotherm, source=langmuirisothermtype(distcoef, sp2))
41  case default
42  call store_error('Sorption type not implemented.')
43  end select
44 
Here is the call graph for this function:
Here is the caller graph for this function: