RUFAS.biophysical.manure.storage.bedded_pack module#

class RUFAS.biophysical.manure.storage.bedded_pack.Mixing(*values)#

Bases: Enum

MIXED = True#
UNMIXED = False#
class RUFAS.biophysical.manure.storage.bedded_pack.BeddedPack(name: str, is_mixed: bool, storage_time_period: int | None, surface_area: float = inf, cover: StorageCover = StorageCover.NO_COVER)#

Bases: Storage

__init__(name: str, is_mixed: bool, storage_time_period: int | None, surface_area: float = inf, cover: StorageCover = StorageCover.NO_COVER)#

Initializes a manure Storage.

process_manure(current_day_conditions: CurrentDayConditions, time: RufasTime) dict[str, ManureStream]#

Processes manure in bedded pack.

Parameters#

current_day_conditionsCurrentDayConditions

The current day conditions.

timeRufasTime

The time of the simulation.

Returns#

dict[str, ManureStream]

_The processed manure stream.

_apply_dry_matter_loss(methane_emission: float, carbon_decomposition: float) None#

This function calculates and then applies the dry matter loss to the received manure in place.

Parameters#

methane_emissionfloat

The methane emission on the current day, kg/day.

carbon_decompositionfloat

The carbon decomposition on the current day, kg/day.

Raises#

ValueError

If any of the dry matter loss calculations results in negative values for received-manure non-degradable volatile solids, degradable volatile solids, or total solids.

_apply_nitrogen_losses(storage_nitrous_oxide_N: float, storage_ammonia_N: float, storage_N_loss_from_leaching: float) None#

This function applies the nitrogen losses to the received manure nitrogen and ammoniacal nitrogen in place.

Parameters#

storage_nitrous_oxide_Nfloat

The nitrogen loss through nitrous oxide emissions on the current day, kg.

storage_ammonia_Nfloat

The nitrogen loss through ammonia emissions on the current day, kg.

storage_N_loss_from_leachingfloat

The nitrogen loss through leaching on the current day, kg.

Raises#

ValueError

If the total nitrogen losses are greater than the total received manure nitrogen.

static _calculate_bedded_pack_nitrous_oxide_emission(received_nitrogen: float, is_mixed: bool) float#

Calculate the nitrogen loss from nitrous oxide emission in a bedded pack barn.

Parameters#

received_nitrogenfloat

The mass of nitrogen present in the manure excreted by animals (kg).

is_mixedbool

Indicator for if the bedding is tilled for the current simulation day.

Returns#

float

The nitrogen lost to nitrous oxide emissions in the bedded pack barn (kg).

Raises#

ValueError

If the daily nitrogen input is negative.

static _calculate_bedded_pack_ammonia_emission(received_nitrogen: float, is_mixed: bool) float#

Calculate the nitrogen loss from ammonia emission in the bedded pack barn.

Parameters#

received_nitrogenfloat

The mass of nitrogen present in the manure excreted by animals (kg).

is_mixedbool

Indicator for if the bedding is tilled for the current simulation day.

Returns#

float

The nitrogen lost to ammonia emission in the bedded pack barn (kg).

Raises#

ValueError

If the daily nitrogen input is negative.

static calculate_bedded_pack_methane_emission(is_mixed: bool, manure_volatile_solids: float, manure_temperature: float, methane_production_potential: float) float#

Calculates emission of methane on the current day based on methodology from IPCC 2019 for mixed and unmixed bedded pack barns.

Parameters#

is_mixedbool

Indicates whether this bedded pack is mixed or not.

manure_volatile_solidsfloat

The volatile solids (kg).

manure_temperaturefloat

The annual average temperature of the barn (Celsius).

methane_production_potentialfloat

Achievable emission of methane from dairy manure (m^3 methane / kg volatile solids).

Returns#

float

The calculated methane emissions for the given day (kg).

static calculate_bedded_pack_methane_conversion_factor(is_mixed: bool, manure_temperature: float) float#

Calculates the Methane Conversion Factor (MCF) for the bedded pack based on annual temperature and whether or not the bedded pack is mixed.

Parameters#

is_mixedbool

Indicates whether this bedded pack is mixed or not.

manure_temperaturefloat

The annual average temperature of the barn (Celsius).

Returns#

float

The calculated Methane Conversion Factor (MCF) for the given annual average temperature (unitless).

References#

2024 USDA GHG inventory methods table 4-9.

_abc_impl = <_abc._abc_data object>#