RUFAS.biophysical.manure.storage.storage module#

RUFAS.biophysical.manure.storage.storage.MANURE_CONVERSION_CONSTANT = 0.1175#

Factor to estimate m^3 of herd-wide manure produced per day per mature cow housed on the farm (m^3/day).

RUFAS.biophysical.manure.storage.storage.FREEBOARD_CONSTANT = 1.2#

Represents 20% volume allowance above the maximum volume of a slurry or liquid manure storage (unitless).

RUFAS.biophysical.manure.storage.storage.DEPTH_CONSTANT = 4.572#

Value for slurry or liquid manure storage depth (m).

RUFAS.biophysical.manure.storage.storage.PRECIPITATION_CONSTANT = 0.25#

The annual precipitation constant value (m).

class RUFAS.biophysical.manure.storage.storage.Storage(name: str, is_housing_emissions_calculator: bool, cover: str, storage_time_period: int | None, surface_area: float, capacity: float = inf)#

Bases: Processor

Base manure Storage class.

Parameters#

coverstr

What the storage will be covered with, if anything.

storage_time_periodint | None

How long manure is stored for before emptying the storage (days). None if the storage is never emptied.

surface_areafloat

The surface area of the manure storage (m^2).

capacityfloat, default math.inf

Volumetric capacity of the storage (m^3).

Attributes#

_received_manureManureStream

The total amount of manure received by a storage in a single day.

stored_manureManureStream

The current amount of manure currently held by the storage.

_capacityfloat

The volumetric capacity of the storage (m^3).

_coverStorageCover

The cover of the storage.

_storage_time_periodint | None

Interval between emptyings of the storage (days). If the storage is never emptied, this is None.

_surface_areafloat

Surface area of the manure storage (m^2).

_manure_to_processManureStream

The manure that is processed during the process_manure() method call.

__init__(name: str, is_housing_emissions_calculator: bool, cover: str, storage_time_period: int | None, surface_area: float, capacity: float = inf) None#

Initializes a manure Storage.

property is_overflowing: bool#

True if the manure in storage exceeds the storage’s volumetric capacity, else False.

_calculate_surface_area() None#

Calculates the surface area of the storage.

receive_manure(manure: ManureStream) None#

Receives manure and puts it in storage to be processed.

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

Adds the manure received on the current day to the manure already stored, and empties the storage if scheduled.

handle_overflowing_manure(time: RufasTime) None#

Deals with excess manure when amount in storage exceeds capacity.

Parameters#

timeRufasTime

RufasTime instance tracking the current time of the simulation.

_abc_impl = <_abc._abc_data object>#
static _calculate_methane_emissions(volatile_solids: float, manure_temperature: float, is_degradable: bool) float#

Calculates methane that is emitted from liquid manure storages by calculating emissions from the degradable and non-degradable volatile solids fractions.

Parameters#

volatile_solidsfloat

Mass of volatile solids that are emitting methane (kg). Can be degradable or non-degradable.

manure_temperaturefloat

Temperature of the manure in storage (degrees C).

is_degradablebool

True if the volatile solids are degrdable, otherwise false.

Returns#

float

Methane emission from volatile solids (kg).

static _calculate_arrhenius_exponent(temperature: float) float#

Calculate the Arrhenius exponent.

Parameters#

temperaturefloat

Temperature in Celsius (degrees C).

Returns#

float

Arrhenius exponent (unitless).

Raises#

ValueError

If the temperature is not between -40 and 60 degrees Celsius.

static _calculate_cover_and_flare_methane(methane_loss: float) tuple[float, float]#

Adjust the methane burned and lost when using cover and flare cover type.

Parameters#

methane_loss: float

The amount of methane lost (kg).

Returns#

tuple[float, float]

The amount of storage methane burned and the adjusted methane loss (kg).

static _calculate_nitrous_oxide_emissions(nitrous_oxide_emissions_factor: float, nitrogen_added: float) float#

Calculates amount of nitrous oxide nitrogen emitted from a storage on a single day.

Parameters#

nitrous_oxide_emissions_factorfloat

The emission factor for nitrous oxide (kg nitrous oxide nitrogen / kg nitrogen).

nitrogen_added: float

Amount of nitrogen that was added to the storage on the current day (kg).

Returns#

float

Nitrous oxide nitrogen emissions (kg).