RUFAS.routines.manure.gas_emissions.calculator module#
- class RUFAS.routines.manure.gas_emissions.calculator.GasEmissionsCalculator#
Bases:
object
- classmethod calculate_liquid_storage_methane(accumulated_liquid_manure_total_degradable_volatile_solids: float, accumulated_liquid_manure_total_non_degradable_volatile_solids: float, stored_manure_temperature: float) Tuple[float, float] #
Calculate the methane emission from manure storage using total volatile solids.
The equation used to calculate the methane emission from manure storage is as follows:
\[E_{CH_4} = 24 \cdot e^{lnA - \frac{E}{RT}} \cdot VS_{d} \cdot b_{1} \cdot \]- rac{1}{1000}
24 cdot e^{lnA - frac{E}{RT}} cdot VS_{nd} cdot b_{2} cdot
rac{1}{1000}
where:
\(E_{CH_4}\) is the methane emission from manure storage (kg \(CH_4\)/day),
\(VS_{d}\) is the degradable volatile solids in manure (kg),
\(b_{1}\) is the degradable volatile solids rate correcting factor (1.0, unitless),
\(VS_{nd}\) is the non-degradable volatile solids in manure (kg),
\(b_{2}\) is the non-degradable volatile solids rate correcting factor (0.01, unitless),
\(lnA\) is the natural log of the Arrhenius constant (31.2, $
rac{ ext{kg VS}}{ ext{h}}^{-1}$),
\(E\) is the activation energy (81,000.0 J/mol),
\(R\) is the ideal gas constant (8.314 J/mol \(\cdot\) K),
\(T\) is the temperature in Kelvin (\(K\)).
- accumulated_liquid_manure_total_degradable_volatile_solids: float
Total degradable volatile solids in manure (kg).
- accumulated_liquid_manure_total_non_degradable_volatile_solids: float,
Total non-degradable volatile solids in manure (kg).
- stored_manure_temperaturefloat
Temperature of the manure in storage in Celsius (\(^\circ C\)).
- float
Methane emission from manure volatile solids (kg \(CH_4\)/day).
- float
Methane emission from degradable volatile solids (kg \(CH_4\)/day).
- ValueError
If the total volatile solids is not positive.
- classmethod _arrhenius_exponent(temp: float) float #
Calculate the Arrhenius exponent.
Notes#
The Arrhenius exponent is calculated as follows:
\[e^{lnA - \frac{E}{RT}}\]where:
\(lnA\) is the natural log of the Arrhenius constant (unitless),
\(E\) is the activation energy (joules per mol, J/mol),
\(R\) is the universal gas constant (joules per mol Kelvin, J/mol \(\cdot\) K),
\(T\) is the temperature in Kelvin (K).
Parameters#
- tempfloat
Temperature in Celsius (\(^\circ C\)).
Returns#
- float
Arrhenius exponent (unitless).
Raises#
- ValueError
If the temperature is not between -40 and 50 degrees Celsius.
- classmethod _modified_hours(hours: float) float #
Calculate modified hours based on the specific conditions.
Notes#
The modified hours is calculated using a piecewise-defined hyperbolic tangent function as follows:
\[\begin{split}\begin{cases} \frac{-\tanh(hours - 21.5)}{3.5} & \text{if } hours > 14 \\ \frac{\tanh(hours - 9.5)}{2.5} & \text{if } 4 < hours \leq 14 \\ \frac{-\tanh(hours + 3.5)}{3.5} & \text{if } hours \leq 4 \end{cases}\end{split}\]where:
\(hours\) is the input hour(s) of the day.
Parameters#
- hoursfloat
The input hour(s) of the day, must be in the range of [0, 24].
Returns#
- float
The modified hours as calculated using the piecewise-defined hyperbolic tangent function.
Raises#
- ValueError
If the input hours is not in the range [0, 24].
- classmethod calculate_housing_methane_emission(barn_area: float, barn_temperature: float) float #
Calculate housing methane emissions from manure handlers.
Notes#
The equation used to calculate housing methane emissions is:
\[E_{CH_4} = max(0, 0.13 * T_{barn}) \times barn\_area / 1000\]where:
\(E_{CH_4}\) is the methane housing emission in kg \(CH_4/day\),
\(T_{barn}\) is the barn temperature in \(^{\circ}C\), and
\(barn\_area\) is the total barn area based on the pen type and number of stalls in \(m^2\).
Parameters#
- barn_areafloat
Barn area per animal based on housing type (\(m^2\)).
- barn_temperaturefloat
Current barn temperature (\(^{\circ}C\)).
Returns#
- float
Housing methane emissions (kg \(CH_4/day\)).
Raises#
- ValueError
If the barn area is less than 0.
- classmethod calculate_housing_carbon_dioxide_emission(barn_area: float, barn_temperature: float) float #
Calculate carbon dioxide housing emission.
Notes#
The equation used to calculate housing carbon dioxide emissions is:
\[E_{CO_2} = max(0, 0.0065 + 0.0192 * T_{barn}) \times barn\_area / 1000\]where:
\(E_{CO_2}\) is the carbon dioxide housing emission in kg \(CO_2/day\),
\(T_{barn}\) is the barn temperature in \(^{\circ}C\), and
\(barn\_area\) is the total barn area based on the pen type and number of stalls in \(m^2\).
Parameters#
- barn_areafloat
Barn area per animal based on housing type (\(m^2\)).
- barn_temperaturefloat
Current barn temperature (\(^{\circ}C\)).
Returns#
- float
Carbon dioxide housing emission (kg \(CO_2\)/day).
Raises#
- ValueError
If the number of animals or barn area is less than 0.
- classmethod calculate_housing_ammonia_emission(num_animals: int, barn_area: float, urine_total_ammoniacal_nitrogen: float, urine: float, barn_temperature: float, pH: float = 7.7, housing_specific_constant: float = 260.0) float #
Calculate housing ammonia emission.
Notes#
The equation used to calculate housing ammonia emission is:
\[E_{NH_3} = total\_barn\_area \times \frac{TAN \times c \times \gamma}{r \times M \times Q}\]where:
\(E_{NH_3}\) is the housing ammonia emission in kg \(NH_3\)/day,
\(total\_barn\_area\) is the total barn area in \(m^2\), calculated as \(num\_animals \times barn\_area\_per\_animal\),
\(TAN\) is the total ammoniacal nitrogen in urine in kg, calculated as \(urine\_total\_ammoniacal\_nitrogen / total\_barn\_area\),
\(c\) is the number of seconds in a day (86400 s),
\(\gamma\) is the manure density in kg/\(m^3\),
\(r\) is the resistance of \(NH_3\) transport to the atmosphere in s/m,
\(M\) is the urine per area of exposed surface in kg/\(m^2\), calculated as \(urine / total\_barn\_area\),
\(Q\) is the equilibrium coefficient for the \(NH_3\) gas in the air (unitless).
The value of \(r\) is calculated as:
\[r_{barn} = HSC \times [1 - 0.027 \times (20 - T)]\]where:
\(r_{barn}\) is the resistance of \(NH_3\) transport to the atmosphere (s/m),
\(HSC\) is the housing-specific constant (s/m, default is 260 s/m),
\(T\) is the barn temperature (\(^{\circ}C\)).
The value of \(Q\) is calculated as:
\[Q = K_h \times K_a\]where:
\(Q\) is the equilibrium coefficient for the \(NH_3\) gas in the air (unitless),
\(K_h\) is the Henry’s law coefficient of \(NH_3\) (unitless),
\(K_a\) is the dissociation coefficient of ammonium ion (unitless).
The value of \(K_h\) is calculated as:
\[K_h = 10^{1478 / T - 1.69}\]where:
\(K_h\) is the Henry’s law coefficient of \(NH_3\) (unitless),
\(T\) is the barn temperature (\(^{\circ}C\)).
The value of \(K_a\) is calculated as:
\[K_a = 1 + 10^{0.09018 + 2729.9 / T - pH}\]where:
\(K_a\) is the dissociation coefficient of ammonium ion (unitless),
\(T\) is the barn temperature (\(^{\circ}C\)),
\(pH\) is the manure solution acidity (unitless).
Parameters#
- num_animalsint
Number of animals in the barn (unitless).
- barn_areafloat
Barn area based on housing type and number of stalls(\(m^2\)).
- urine_total_ammoniacal_nitrogenfloat
Total ammoniacal nitrogen in manure (kg).
- urinefloat
Amount of manure produced by animals in the barn (kg).
- barn_temperaturefloat
Current barn temperature (\(^{\circ}C\)).
- pHfloat, optional
- pH value for housing ammonia emission (unitless). Default is set to 7.7. This value is listed as
DEFAULT_PH_FOR_HOUSING_AMMONIA
inGasEmissionConstants
.
- housing_specific_constantfloat, optional
- Housing-specific constant (unitless). Default is set to 260 s/m. This value is listed as
HOUSING_HSC
inGasEmissionConstants
.
Returns#
- float
Housing ammonia emission (kg \(NH_3\)/day).
Raises#
- ValueError
If the number of animals, barn area, urine total ammoniacal nitrogen, or urine is less than 0.
- classmethod calculate_liquid_storage_ammonia_emission(num_animals: int, manure_total_ammoniacal_nitrogen: float, manure_volume: float, manure_density: float, storage_temperature: float, storage_area_per_animal: float = 1.0, pH: float = 7.5) float #
Calculate storage ammonia emissions for liquidmanure treatments.
Notes#
The equation used to calculate storage ammonia emission is:
\[E_{NH_3} = total\_storage\_area \cdot \frac{TAN \cdot c \cdot \gamma}{r \cdot M \cdot Q}\]where:
\(E_{NH_3}\) is the storage ammonia emission in kg \(NH_3\)/day,
\(total\_storage\_area\) is the total storage area in \(m^2\), calculated as \(num\_animals \times storage\_area\_per\_animal\),
\(TAN\) is the total ammoniacal nitrogen in manure in kg,
\(c\) is the number of seconds in a day (86400 s),
\(\gamma\) is the manure density in kg/\(m^3\),
\(r\) is the resistance of \(NH_3\) transport to the atmosphere in s/m,
\(M\) is the manure mass excluding solids per area of exposed surface in kg/\(m^2\), calculated as \((total\_manure\_mass - total\_solids) / total\_storage\_area\),
\(Q\) is the equilibrium coefficient for the \(NH_3\) gas in the air (unitless).
The value of \(r\) is calculated as:
\[r_{storage} = HSC \cdot [1 - 0.027 \cdot (20 - T)]\]where:
\(r_{storage}\) is the resistance of \(NH_3\) transport to the atmosphere (s/m),
\(HSC\) is the housing-specific constant (s/m, default is 260 s/m),
\(T\) is the storage area temperature (\(^{\circ}C\)).
The value of \(Q\) is calculated as:
\[Q = K_h \cdot K_a\]where:
\(Q\) is the equilibrium coefficient for the \(NH_3\) gas in the air (unitless),
\(K_h\) is the Henry’s law coefficient of \(NH_3\) (unitless),
\(K_a\) is the dissociation coefficient of ammonium ion (unitless).
The value of \(K_h\) is calculated as:
\[K_h = 10^{1478 / T - 1.69}\]where:
\(K_h\) is the Henry’s law coefficient of \(NH_3\) (unitless),
\(T\) is the storage area temperature in Kelvin.
The value of \(K_a\) is calculated as:
\[K_a = 1 + 10^{0.09018 + 2729.9 / T - pH}\]where:
\(K_a\) is the dissociation coefficient of ammonium ion (unitless),
\(T\) is the storage area temperature in Kelvin,
\(pH\) is the manure solution acidity (unitless).
Parameters#
- num_animalsint
Number of animals in the storage area (unitless).
- manure_total_ammoniacal_nitrogenfloat
Total ammoniacal nitrogen in manure (kg).
- manure_volumefloat
Total volume of the manure produced by the animals in the storage area (\(m^3\)).
- manure_densityfloat
Density of the manure (kg/\(m^3\)).
- total_solidsfloat
Total solids present in the manure (kg).
- storage_temperaturefloat
Current storage area temperature (\(^{\circ}C\)).
- storage_area_per_animalfloat, optional
Storage area per animal based on manure treatment type (\(m^2\)). Default is set to a value listed as
DEFAULT_STORAGE_AREA_PER_ANIMAL in :class:`GasEmissionConstants
.- pHfloat, optional
pH value for storage ammonia emission (unitless). Default is set to a value listed as
DEFAULT_PH_FOR_STORAGE_AMMONIA
inGasEmissionConstants
.
Returns#
- float
Storage ammonia emission (kg \(NH_3\)/day).
Raises#
- ValueError
If the num_animals is < 0. If storage_area < 0. If manure_total_ammoniacal_nitrogen < 0. If manure_volume < 0. If manure_density < 0. If total_solids in manure < 0.
- classmethod _ammonia_resistance(temp: float, hsc: float) float #
Calculate resistance of \(NH_3\) transport to the atmosphere in a barn.
Notes#
The equation used to calculate resistance of \(NH_3\) transport to the atmosphere in a barn is:
\[r_{barn} = HSC \times [1 - 0.027 \times (20 - T)]\]where:
\(r_{barn}\) is resistance of \(NH_3\) transport to the atmosphere in a barn (s/m),
\(HSC\) is housing specific constant (s/m, default is 260 s/m),
\(T\) is barn temperature (\(^{\circ}C\)).
Parameters#
- tempfloat
Temperature in Celsius (\(^{\circ}C\)).
- hscfloat, optional
- Housing specific constant, s/m. Default is set to 260 s/m. This value is listed as
HOUSING_HSC
inGasEmissionConstants
.
Returns#
- float
Resistance of \(NH_3\) transport to the atmosphere in a barn, s/m.
- classmethod _henry_law_coefficient_of_ammonia(temp: float) float #
Calculate Henry’s law coefficient of ammonia.
Notes#
The equation used to calculate Henry’s law coefficient of ammonia is:
\[K_h = 10^{1478/T - 1.69}\]where:
\(K_h\) is Henry’s law coefficient (unitless),
\(T\) is temperature (K).
Parameters#
- tempfloat
Temperature in Kelvin (K).
Returns#
- float
Henry’s law coefficient of ammonia (unitless).
- classmethod _dissociation_coefficient_of_ammonium(temp: float, pH: float) float #
Calculate dissociation coefficient of ammonium.
Notes#
The equation used to calculate the dissociation coefficient of ammonium is:
\[K_a = 1 + 10^{0.09018 + 2729.9/T - pH}\]where:
\(K_a\) is the dissociation coefficient of ammonium (unitless),
\(T\) is temperature (K),
\(pH\) is the manure solution acidity (unitless).
Parameters#
- tempfloat
Temperature in Kelvin (K).
- pHfloat
Manure solution acidity (unitless).
Returns#
- float
Dissociation coefficient of ammonium (unitless).
- classmethod _equilibrium_coefficient(temp: float, pH: float) float #
Calculate Q, the equilibrium coefficient for the \(NH_3\) gas in the air for a given concentration of total ammoniacal nitrogen in the solution.
Notes#
The equation used to calculate Q is:
\[Q = K_h * K_a\]where:
\(Q\) is the equilibrium coefficient for the \(NH_3\) gas in the air (unitless),
\(K_h\) is Henry’s law coefficient of ammonia (unitless), and
\(K_a\) is the dissociation coefficient of ammonium (unitless).
Parameters#
- tempfloat
Manure solution temperature in Kelvin (K).
- pHfloat
Manure solution acidity (unitless).
Returns#
- float
Equilibrium coefficient for the \(NH_3\) gas in the air (unitless).
- classmethod _convert_temperature_celsius_to_kelvin(temperature_celsius: float) float #
Converts a temperature from Celsius to Kelvin.
- Args:
temperature_celsius: temperature in Celsius, C.
- Returns:
Temperature in Kelvin, K.
- classmethod calculate_CSTR_methane_volume(manure_total_volatile_solids: float) float #
Calculates CH4 generation volume of anaerobic digestion in a continuously-stirred tank reactor.
Parameters#
- manure_total_volatile_solidsfloat
Total volatile solids, kg.
Returns#
- float
CH4 generation volume, m^3.
Notes#
This function originates from personal communications with subject matter experts Wei Liao (liaow@msu.edu) and April Leytem (april.leytem@usda.gov). The equation is a simplification of the IPCC Tier II estimate of CH4 emissions from anaerobic digesters, where CH4 generated in the digester is assumed to be equivalent to the amount of manure volatile solids loaded per day, multiplied by the generally-accepted methane potential value for dairy manure (240 L CH4 per kg of manure volatile solids).
- classmethod calculate_digester_methane_leakage(generated_methane_mass: float, digester_methane_leakage_fraction: float) float #
Calculates the mass of methane lost from a digester.
Parameters#
- generated_methane_massfloat
Amount of methane generated within the digester, kg.
- digester_methane_leakage_fractionfloat
Fraction of generated methane that escapes as leakage (unitless).
Returns#
- float
Mass of methane lost as leakage, kg.
- classmethod calculate_methane_energy_content(methane_mass: float) float #
Calculates energy content of methane generated in a digester.
Parameters#
- methane_massfloat
Methane generation mass, kg.
Returns#
- float
Methane energy content, MJ.
- classmethod methane_emission_from_anaerobic_lagoon(manure_volatile_solids: float) float #
Calculate methane emission from anaerobic lagoon.
Notes#
The equation used to calculate methane emission from anaerobic lagoon is:
\[E_{CH_4} = Bo \cdot MCF \cdot MS \cdot MF \cdot VS\]where:
\(E_{CH_4}\) is methane emissions from anaerobic lagoon (kg \(CH_4\)-N/day),
\(Bo\) is the achievable emission of methane during anaerobic digestion (\(m^3 CH_4\)/kg VS),
\(MCF\) is the methane conversion factor (unitless),
\(MS\) is the fraction of manure handled by the anaerobic lagoon (unitless),
\(MF\) is the unit conversion factor for methane from \(m^3\) to kg (unitless),
\(VS\) is the amount of volatile solids in manure (kg).
Parameters#
- manure_volatile_solidsfloat
Amount of volatile solids in manure (kg).
Returns#
- float
Methane emission from anaerobic lagoon (kg \(CH_4\)-N/day).
- classmethod _methane_conversion_factor(ambient_barn_temp: float) float #
Calculate the Methane Conversion Factor (MCF) for the open lots treatment using the following function:
MCF(T) = 0.0625 * T - 0.25
Parameters#
- ambient_barn_tempfloat
The ambient barn temperature (in Celsius).
Returns#
- float
The calculated Methane Conversion Factor (MCF) for the given ambient barn temperature.
References#
- classmethod ifsm_methane_emission(manure_volatile_solids: float, ambient_barn_temp: float) float #
Calculates emission of methane for a day using an adaptation of the tier 2 approach of the IPCC(2006), given ambient barn temperature and a methane conversion factor for the manure management.
CH4 emission = (VS * Bo * 0.67 * MCF) / 100
Parameters#
- manure_volatile_solidsfloat
The volatile solids (in kg)
- ambient_barn_tempfloat
The ambient barn temperature (in Celsius)
Returns#
- float
The calculated methane emissions (in kg) for the given ambient barn temperature.
- classmethod _microbial_decomp_rate(temperature: float) float #
Calculates the microbial decomposition (unitless) rate per day:
max decomp rate = eff. decomp rate * (1.066^(temp - 10) - 1.21^(temp - 50))
Parameters#
- temperaturefloat
The temperature of the medium (in Celsius)
Returns#
- float
The microbial decomposition rate per day (unitless)
- classmethod _carbon_decomposition_rate(days_since_last_tillage: int = 1, lag: int = 2) float #
Calculates the carbon decomposition taking place in the composting process of the manure-bedding mix due to microbial activity.
Rate C Decomp = (max decomp rate - slow decomp rate) * e^(decay * (days_since_last_tillage - lag)) * slow decomp rate
Parameters#
- days_since_last_tillageint
The number of days since manure was last tilled
- lagint
Lag time in days.
Returns#
- float
The carbon decomposition rate per day (unitless)
- classmethod _anaerobic_effect(oxygen_mole_fraction: float = 0.15, oxygen_half_saturation_constant: float = 0.02, oxygen_ambient_air_mole_fraction: float = 0.21) float #
Calculates the anaerobic effect.
Anaerobic effect = (O2 / (O2,hsat + O2)) * ((O2,hsat + O2,amb) / O2,amb)
Parameters#
- oxygen_mole_fractionfloat
Mole fraction of oxygen in the air within the windrow
- oxygen_half_saturation_constantfloat
half saturation constant for oxygen gas
- oxygen_ambient_air_mole_fractionfot
mole fraction of oxygen gas in ambient air
Returns#
- float
The anaerobic effect (unitless)
Raises#
- ValueError
If oxytem_mole_fraction or oxygen_ambient_air_mole_fraction are not between [0, 1].
- classmethod total_carbon_decomposition(manure_total_solids: float, bedding_total_mass: float, days_since_last_tillage: int, lag: int, moisture_effect: float = 0.65, carbon_available_in_manure: float = 0.5, carbon_available_in_bedding: float = 0.35) float #
Calculates the carbon decomposition from the composting process of the manure-bed mixture due to microbial activity (decomposition, consumption, respiration).
Parameters#
- manure_total_solidsfloat
The total solids from the manure (in kg)
- bedding_total_massfloat
The total mass of the bedding material (in kg)
- days_since_last_tillageint
The number of days since the last tillage event
- lagint
The lag time
- moisture_effectfloat
The effect of moisture on microbial decomposition
- carbon_available_in_manurefloat
the proportion of carbon available in manure (unitless)
- carbon_available_in_beddingfloat
the carbon available in the bedding (unitless)
Returns#
- float
The total carbon decomposition (in kg).
- static nitrogen_loss_in_compost_bedded_pack_barn_from_ammonia_emission(daily_nitrogen_input: float, is_bedding_tilled: bool) float #
Calculate the nitrogen loss from ammonia emission in the compost bedded pack barn.
Parameters#
- daily_nitrogen_inputfloat
The mass of nitrogen present in the manure excreted by animals (kg).
- is_bedding_tilledbool
Indicator for if the bedding is tilled for the current simulation day.
Returns#
- float
The nitrogen lost to ammonia emission in the compost bedded pack barn (kg).
Raises#
- ValueError
If the daily nitrogen input is negative.
- static _nitrogen_loss_from_leaching(daily_nitrogen_input: float) float #
Calculate the mass of nitrogen that leaches out of the manure-bedding mixture.
Parameters#
- daily_nitrogen_inputfloat
The mass of nitrogen present in the manure excreted by animals (kg).
Returns#
- float
The amount of nitrogen that leaches out of the bedding mixture (kg).
Raises#
- ValueError
If the daily nitrogen input is negative.
- static nitrogen_loss_in_compost_bedded_pack_barn_from_nitrous_oxide_emission(daily_nitrogen_input: float, is_bedding_tilled: bool) float #
Calculate the nitrogen loss from nitrous oxide emission in a compost bedded pack barn.
Parameters#
- daily_nitrogen_inputfloat
The mass of nitrogen present in the manure excreted by animals (kg).
- is_bedding_tilledbool
Indicator for if the bedding is tilled for the current simulation day.
Returns#
- float
The nitrogen lost to nitrous oxide emissions in the compost bedded pack barn (kg).
Raises#
- ValueError
If the daily nitrogen input is negative.
- static total_nitrogen_loss_from_compost_bedded_pack_barn(daily_nitrogen_input: float, is_bedding_tilled: bool) float #
Calculate the total nitrogen loss from a compost bedded pack barn.
Parameters#
- daily_nitrogen_inputfloat
The mass of nitrogen present in the manure excreted by animals (kg).
- is_bedding_tilledbool
Indicator for if the bedding is tilled for the current simulation day.
Returns#
- float
The total nitrogen loss from the compost bedded pack barn (kg).
Raises#
- ValueError
If the daily nitrogen input is negative.
- static nitrogen_loss_in_open_lots_from_ammonia_emission(daily_nitrogen_input: float) float #
Calculate the nitrogen loss from ammonia emission in the open lots manure treatment.
Parameters#
- daily_nitrogen_inputfloat
The amount of nitrogen present in the manure excreted by animals (kg).
Returns#
- float
The amount of nitrogen lost to ammonia emission (kg).
Raises#
- ValueError
If the daily nitrogen input is negative.
- static nitrogen_loss_in_open_lots_from_nitrous_oxide_emission(daily_nitrogen_input: float) float #
Calculate the nitrogen loss from nitrous oxide emission in the open lots manure treatment.
Parameters#
- daily_nitrogen_inputfloat
The amount of nitrogen present in the manure excreted by animals (kg).
Returns#
- float
The nitrogen lost to nitrous oxide emission (kg).
Raises#
- ValueError
If the daily nitrogen input is negative.
- static total_nitrogen_loss_from_open_lots(daily_nitrogen_input: float) float #
Calculate the total nitrogen loss from the open lots manure treatment.
Parameters#
- daily_nitrogen_inputfloat
The amount of nitrogen present in the manure excreted by animals (kg).
Returns#
- float
The total nitrogen loss from the open lots manure treatment (kg).
- static calculate_empirical_nitrogen_loss_from_nitrous_oxide_emission(emission_factor_kg_nitrous_oxide_N_per_kg_manure_N: float, manure_nitrogen_kg_N_per_day: float) float #
Calculate the daily empirical nitrogen loss from nitrous oxide emission from a manure treatment and storage system (kg \(N_2O\)-N/day).
Parameters#
- emission_factor_kg_nitrous_oxide_N_per_kg_manure_Nfloat
The emission factor for nitrous oxide based on the type of manure treatment and storage system and whether the manure is covered or not (kg \(N_2O\)-N/kg manure N).
- manure_nitrogen_kg_N_per_day: float
The amount of manure nitrogen that enters the manure treatment system each day (kg N/day).
Returns#
- float
The empirical nitrogen loss from nitrous oxide emission (kg \(N_2O\)-N/day).
- static determine_barn_air_temperature(air_temperature: float) float #
Determines the ambient inside barn temperature based on the outdoor air temperature.
Parameters#
- air_temperaturefloat
The air temperature (°C).
Returns#
- float
The barn temperature (°C).
References#
Between 5 and 30 C, barn temperature is assumed to be equal to outdoor air temperature. This function assumes that barn temperature does not drop below 5 C or increase above 30 C. These bounds were suggested by manure SMEs and are supported by barn temperature ranges reported in Bucklin et al. (FL, upper limit; https://doi.org/10.13031/2013.28851). The lower bound (5 C) suggested by SMEs was based on general industry standards/conditions.