Skip to content
Snippets Groups Projects
Constants.hs 8.36 KiB
Newer Older
module SaltMarsh.Constants where

--------------------------------------------------------------------------------
--                           Hydrodynamic parameters                          --
--------------------------------------------------------------------------------

h0       = 0.02    -- 0.02
g        = 9.81    -- 9.81
nn       = 0.05    -- 5e-2
hCrit    = 0.001   -- 1e-3
slope    = 0.00    -- 2e-3
difU     = 5e-2    -- 1e-2
--hIn      = 0.00003 -- 1e-4/5e-5

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  h0            m               Imposed initial water layer thickness (equals
 -                                the homogeneous equilibrium state)
 -
 -  g             m s^-2          Gravitational acceleration constant
 -  nn            s m^(-1/3)      Gauckler-Manning friction coefficient
 -                                (Chow, 1959);
 -                                (Mariotti and Fagherazzi, 2012 JGR) => n=0.016
 -
 -  hCrit         m               Critical water layer thickness (is always
 -                                retained) in wetting-drying algorithm
 -
 -  slope         m m^-1          Subsediment plane bed slope
 -  difU          m^2 s^-1        Turbulent eddy viscosity
 -  hIn           m               Rain (G:later redefined?)
 -}


--------------------------------------------------------------------------------
--                       Vegetation roughness parameters                      --
--------------------------------------------------------------------------------

cb       = 20.0
cd       = 2.0
--hv       = 0.5
kv       = 0.41
-- difD     = 1e-4

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  cb                            Chezy roughness of the bed
 -  cd                            Chezy friction coefficient for maximal
 -                                vegetation density
 -
 -  hv                            Shoot length
 -  kv                            Von Karman constant
 -  difD                          Lateral expansion of vegetation (G: dfined
 -                                later?)
 -}


--------------------------------------------------------------------------------
--                          Sedimentation parameters                          --
--------------------------------------------------------------------------------


s_in     = 0.0010  -- 1e-3
e0       = 10.0    -- 3e-2
pE       = 0.9     -- 0.5 / 0.9
--d0       = 1e-4    -- 5e-2
--pD       = 1.0     -- [0..1]

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  s_in          m s^-1          Sediment input
 -  e0            s^-1            "Background" erosion rate.
 -  pE            -               Fraction by which sediment erosion is reduced
 -                                if algae are at carrying capacity
 -
 -  d0            m^2 s^-1        Sediment diffusivity in absence of algae
 -                                (G:defined later?)
 -
 -  pD            -               Fraction by which sediment diffusivity is
 -                                reduced if algae are at carrying capacity
 -}


--------------------------------------------------------------------------------
--                    Diatom growth and erosion parameters                    --
--------------------------------------------------------------------------------

rr       = 0.060   -- 0.30
kk       = 1.0     -- 1.0
qq       = 0.5     -- 0.031
qs       = 0.006   -- 0.3
ec       = 10.0    -- 20.0
dc       = 1e-3

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  rr            s^-1            Growth rate algae
 -  kk            g m^-2          Carrying capacity algae
 -  qq            m               Value of water level where algae loss is
 -                                (approximately) half max (higher Qq = lower
 -                                overall loss rate)
 -
 -  qs            -               Fraction of initial (homogeneous) water layer
 -                                thickness at which sedimentation rate is
 -                                (approximately) half maximal
 -
 -  ec            -               Conversion factor from sediment erosion to
 -                                algae loss
 -
 -  dc            -               Conversion factor from sediment to biomass
 -                                diffusion
 -}

--------------------------------------------------------------------------------
--                                  Gradients                                 --
--------------------------------------------------------------------------------

-- Gradient 1 (D0)
gradient_D0 = False
d0       = 1e-4     -- 1e-1
d0min    = 1e-4     -- 1e-1
d0max    = 1e-4     -- 1e-1

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  d0            m^2 s^-1        In absence of algae, background sediment
 -  d0min         m^2 s^-1        diffusivity varies spatially between d0min and
 -  d0max         m^2 s^-1        d0max
 -}

-- Gradient 2 (Hin)
gradient_Hin = False
hIn      = 0.00010  -- 3e-5 [m] Rain
hInMin   = 0.00001  -- 1e-4 [m] Rain
hInMax   = 0.00010  -- 1e-4 [m] Rain

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  d0            m^2 s^-1        In absence of algae, background sediment
 -  d0min         m^2 s^-1        diffusivity varies spatially between d0min and
 -  d0max         m^2 s^-1        d0max
 -}

-- Gradient 3 (DifD)
gradient_DifD = False
difD     = 1e-4     -- 1e-4  # Lateral expansion of vegetation
difDmin  = 1e-6     -- 1e-5
difDmax  = 1e-1     -- 1e-2

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  difD          m^2 s^-1        Lateral expansion of vegetation
 -  difDmin       m^2 s^-1
 -  difDmax       m^2 s^-1
 -}

-- Gradient 4 (pD)
gradient_pD = False
pD          = 1e0      -- 0.0 [-] Fraction by which sediment diffusivity is reduced when at carrying capacity
pDmin       = 1e-1  :: Exp Float   -- 1e-5
pDmax       = 1e1   :: Exp Float   -- 1e-2
pDcon       = 2.0      -- Constant determines curvature of logarithmic pD-gradient

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  pD            -               Fraction by which sediment diffusivity is
 -                                reduced when at carrying capacity
 -
 -  pDmin         -
 -  pDmax         -
 -  pDcon         -               Constant determines curvature of logarithmic
 -                                pD-gradient
 -}

-- Gradient 5 (Hv)
gradient_Hv :: Bool
gradient_Hv = False
hv       = 5e-1     -- Shoot length
hvmin    = 1e-3     -- 1e-5
hvmax    = 1e0      -- 1e-2

{-  Symbol        Dimension       Description
 -  ----------------------------------------------------------------------------
 -  hv            ?               Shoot length
 -  hvmin         ?
 -  hvmax         ?
 -}


--------------------------------------------------------------------------------
--                            Simulation constants                            --
--------------------------------------------------------------------------------

endTime        = 2000
numFrames      = 100
dT             = 0.01


lengthX, lengthY :: Exp Float
lengthX        = 100.0
lengthY        = 100.0

block_Size_X   =  16
block_Size_Y   =  16

block_Number_X =  32
block_Number_Y =  32

{-  Symbol           Default Value   Description
 -  ----------------------------------------------------------------------------
 -  endTime          20              Total time
 -  numFrames        50              Number of times the figure is updated
 -  dT               0.0005          Time step size (frame interval time)
 -  lengthX          800             Size of the domain in physical dimensions
 -  lengthY          100             Size of the domain in physical dimensions
 -  block_Size_X     16              Thread block size(*)
 -  block_Size_Y     16              Thread block size
 -  block_Number_X   32              ?
 -  block_Number_Y   32              ?
 -
 -  * We do not need it here, just to calculate matrix sizes
 -}