RUFAS.biophysical.manure.storage.compost_bedded_pack_barn module#

class RUFAS.biophysical.manure.storage.compost_bedded_pack_barn.CompostBeddedPackBarn(name: str, storage_time_period: int | None, surface_area: float = inf, cover: StorageCover = StorageCover.NO_COVER)#

Bases: Storage

__init__(name: str, 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 compost 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_cbpb_nitrous_oxide_emission(received_nitrogen: float, is_bedding_tilled: bool) float#

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

Parameters#

received_nitrogenfloat

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 _calculate_cbpb_ammonia_emission(received_nitrogen: float, is_bedding_tilled: bool) float#

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

Parameters#

received_nitrogenfloat

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.

_abc_impl = <_abc._abc_data object>#