RUFAS.biophysical.manure.storage.solids_storage_calculator module#

class RUFAS.biophysical.manure.storage.solids_storage_calculator.SolidsStorageCalculator#

Bases: object

This class contains methods to calculate the carbon decomposition, methane emission, nitrogen loss to leaching, and dry matter loss on the current day. The methods are static and can be called without creating an instance of the class.

static calculate_nitrogen_loss_to_leaching(fraction_nitrogen_lost_to_leaching: float, received_manure_nitrogen: float) float#

This function calculates the amount of nitrogen leached out of the manure-bedding mix on the current day.

Parameters#

fraction_nitrogen_lost_to_leachingfloat

The fraction of nitrogen lost to leaching, unitless.

received_manure_nitrogenfloat

The nitrogen content of the received manure, kg.

Returns#

float

The total nitrogen loss to leaching on the current day, kg.

static calculate_dry_matter_loss(methane_emission: float, carbon_decomposition: float) float#

This function calculates the total dry matter loss on the current day.

Parameters#

methane_emissionfloat

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

carbon_decompositionfloat

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

Returns#

float

The total dry matter loss on the current day, kg/day.

static calculate_carbon_decomposition(manure_temperature: float, non_degradable_volatile_solids: float, degradable_volatile_solids: float) float#

This function calculates the total carbon decomposition on the current day.

Parameters#

manure_temperaturefloat

The manure temperature on the current day, Celsius. In Composting, this value is equal to ambient temperature on the current day. In Open Lot and Compost Bedded Pack Barn, this value is set to a default/constant value (30 C).

non_degradable_volatile_solidsfloat

The non-degradable volatile solids on the current day, kg.

degradable_volatile_solidsfloat

The degradable volatile solids on the current day, kg.

Returns#

float

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

static calculate_carbon_decomposition_rate(manure_temperature: float) float#

This function calculates the carbon decomposition rate on the current day.

Parameters#

manure_temperaturefloat

The manure temperature on the current day, Celsius. In Composting, this value is equal to ambient temperature on the current day. In Open Lot and Compost Bedded Pack Barn, this value is set to a default/constant value (30 C).

Returns#

float

The carbon decomposition rate on the current day, per day.

static calculate_max_microbial_decomposition_rate() float#

This function calculates the max microbial decomposition rate. This parameter is set to 0.04195 but the equation and set values are shown below for reference.

Returns#

float

The max microbial decomposition rate on the current day, per day.

static calculate_slow_fraction_decomposition_rate(manure_temperature: float) float#

This function calculates the microbial decomposition rate of the slowly-degrading fraction in decomposing material on the current day.

Parameters#

manure_temperaturefloat

The manure temperature on the current day, Celsius. In Composting, this value is equal to ambient temperature on the current day. In Open Lot and Compost Bedded Pack Barn, this value is set to a default/constant value (30 C).

Returns#

float

The microbial decomposition rate of the slowly-degrading fraction on the current day.

static calculate_anaerobic_coefficient() float#

This function calculates the anaerobic coefficient. The value of this parameter is equal to 0.96639, but the equation and set values are included below for reference.

Returns#

float

The anaerobic coefficient, unitless.

static calculate_ifsm_methane_emission(manure_volatile_solids: float, manure_temperature: float) float#

Calculates emission of methane on the current day using an adaptation of the tier 2 approach of the IPCC (2006), based on manure volatile solids addition to the open lot and a temperature-dependent methane conversion factor.

Parameters#

manure_volatile_solidsfloat

The volatile solids (kg).

manure_temperaturefloat

The manure temperature (Celsius).

Returns#

float

The calculated methane emissions (in kg) for the given ambient barn temperature.

static calculate_methane_conversion_factor(manure_temperature: float) float#

Calculate the Methane Conversion Factor (MCF) for the open lots treatment using the following function:

Parameters#

manure_temperaturefloat

The ambient barn temperature (in Celsius).

Returns#

float

The calculated Methane Conversion Factor (MCF) for the given ambient barn temperature.

static calculate_degradable_volatile_solids_fraction(degradable_volatile_solids: float, total_volatile_solids: float) float#

Calculates the fraction of degradable volatile solids.

Parameters#

degradable_volatile_solidsfloat

Mass of degradable volatile solids in the manure stream (kg).

total_volatile_solidsfloat

Mass of total volatile solids in the manure stream (kg).

Returns#

float

The fraction of degradable volatile solids (unitless).