abm | R Documentation |
An implementation of the ABM model for simulation of anaerobic biodegradation of organic substrates.
abm(days = 365,
delta_t = 1,
times = NULL,
wthr_pars = ABM::wthr_pars2.0,
evap_pars = list(evap = 0.5 * et(temp_C = ABM::wthr_pars2.0$temp_air_C,
pres_kpa = ABM::wthr_pars2.0$pres_kpa,
rs = ABM::wthr_pars2.0$rs)),
mng_pars = list(slurry_prod_rate = 5700,
slurry_mass = 39000,
storage_depth = 0.6,
resid_depth = 0.05,
floor_area = 650,
area = 715,
empty_int = 42,
temp_C = 20,
wash_water = 75000,
wash_int = NA,
rest_d = 5,
cover = 'none',
resid_enrich = 0.9,
slopes = c(urea = NA, slurry_prod_rate = NA),
graze = c(start = 'May', duration = 0, hours_day = 0),
scale = c(ks_coefficient = 1, qhat_opt = 1,
xa_fresh = 1, yield = 1, alpha_opt = 1)),
man_pars = ABM::man_pars2.0,
init_pars = list(conc_init = man_pars$conc_fresh),
grp_pars = ABM::grp_pars2.0,
mic_pars = ABM::mic_pars2.0,
chem_pars = ABM::chem_pars2.0,
arrh_pars = ABM::arrh_pars2.0,
resp = TRUE,
add_pars = NULL,
pars = NULL,
startup = 0,
starting = NULL,
approx_method_temp = 'linear',
approx_method_pH = 'linear',
approx_method_vent_air = 'linear',
par_key = '\\.',
value = 'ts',
warn = TRUE)
days |
Total number of days in simulation. |
delta_t |
Time step in output (d). |
times |
Alternative to |
wthr_pars |
Weather inputs.
List with elements 'temp_air_C' in degree C, 'RH' relative humidity in percent, 'rain' is precipitation in kg/m2/day, 'pres_kpa' is ambient pressure in kPa, 'rs' is solar radiation in MJ/m2/d.
See |
evap_pars |
Evaporation inputs. |
mng_pars |
List of management parameters including slurry production rate (kg/day) ( |
man_pars |
List of manure parameters. The default and alternative parameter values are detailed in |
init_pars |
List of parameters that define the intial concentrations of organic matter components in the slurry.
The elements are similar to the |
grp_pars |
List containing parameter values for the microbial groups included in the model. m designates methanogen and sr designates sulfate reducer. The default and alternative parameter values are detailed in Each of these elements is a vector with a named element for each group. See usage, examples, and vignettes. |
mic_pars |
List of other microbial parameters. The default and alternative parameter values are detailed in |
chem_pars |
List of other chemical parameters.
The default parameter values are detailed in |
arrh_pars |
List of hydrolysis parameters that are related to Arrhenius kinetics.
The default parameter values are detailed in |
resp |
Set to |
pH_inhib_overrule |
Default is |
add_pars |
List of other additional parameters not set in other arguments, or to be modified from defaults. See vignette. |
pars |
Combined parameters, as an alternative to all the '*_pars' arguments.
Used internally when |
startup |
Number of startup times the simulation should be run before running a final time. Results from one simulation become starting conditions for next. Used to spin up or stabilize microbial population and substrates so that initial conditions do not affect results. Length-one integer vector. Optional. |
starting |
Starting conditions.
Output ( |
approx_method_temp |
Sets type of interpolation when temperature is variable ( |
approx_method_pH |
Sets type of interpolation when pH is variable ( |
approx_method_vent_air |
Sets type of interpolation when ventilation flow rate is variable.
Passed to |
par_key |
Special character used to set individual nested elements within some arguments. See vignette for examples. |
value |
Sets the type of output.
Default ( |
warn |
Set to |
The function simulates anaerobic biodegradation.
By default, a data frame with most input and all output variables in a time series.
Each row is separated by the value set with delta_t
.
Typically the primary variable of interest is methane emission, which is returned as a total (g) and rate (g/d), overall or normalized to COD or VS loading.
These columns all start with CH4
.
Microbial biomass (g) is given in columns with names that match those used for the names of the groups.
For more details, see the Output section in the vignette.
Sasha D. Hafner and Frederik R. Dalby
Dalby, F.R., Hafner, S.D., Petersen, S.O., Vanderzaag, A., Habtewold, J., Dunfield, K., Chantigny, M.H., Sommer, S.G., 2021. A mechanistic model of methane emission from animal slurry with a focus on microbial groups. PLOS ONE 16, e0252881. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pone.0252881")}
Dalby, F.R., Hansen, M.J., Guldberg, L.B., Hafner, S.D., Feilberg, A., 2023. Simple Management Changes Drastically Reduce Pig House Methane Emission in Combined Experimental and Modeling Study. Environ. Sci. Technol. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1021/acs.est.2c08891")}
Dalby, F.R., Ambrose, H.W., Poulsen, J.S., Nielsen, J.L., Adamsen, A.P.S., 2023. Pig slurry organic matter transformation and methanogenesis at ambient storage temperatures. JEQ. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/jeq2.20512")}
Dalby, F.R., Hafner, S.D., Ambrose, H.W., Adamsen, A.P.S., 2024. Pig manure degradation and carbon emission: Measuring and modeling combined aerobic–anaerobic transformations. JEQ. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/jeq2.20603")}
Sommer, S.G, Hafner S.D., Laubach, J., van der Weerden, T.J., Pacholski, A., 2022. Model for calculating ammonia emission from stored animal liquid manure. Biosyst Eng \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.biosystemseng.2022.08.007")}
# Simulation 1~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Run model with default parameter values and input variables
out1 <- abm()
# Plot cumulative CH4 emission (g) and emission rate (g/d)
plot(CH4_emis_cum ~ time, data = out1, type = 'l')
plot(CH4_emis_rate ~ time, data = out1, type = 'l')
# Plot microbial biomass
matplot(out1$time, out1[, nn <- c('m0', 'm1', 'm2', 'sr1')],
type = 'l', lty = 1, xlab = 'Time (d)', ylab = 'Microbial biomass (g)')
legend('topleft', nn, col = 1:4, lty = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.