RUFAS.routines.manure.manure_treatments.anaerobic_digestion module#

class RUFAS.routines.manure.manure_treatments.anaerobic_digestion.AnaerobicDigestion(weather: Weather, time: RufasTime, manure_treatment_config: ManureTreatmentConfig | Tuple[ManureTreatmentConfig, ManureTreatmentConfig])#

Bases: BaseManureTreatment

A class that calculates the output of an anaerobic digester.

Attributes:

Same as BaseManureTreatment.

__init__(weather: Weather, time: RufasTime, manure_treatment_config: ManureTreatmentConfig | Tuple[ManureTreatmentConfig, ManureTreatmentConfig]) None#

Initializes the BaseManureTreatment class.

Args:

weather: A Weather object. time: A RufasTime object. manure_treatment_config: A ManureTreatmentConfig object containing the

configuration for the manure treatment.

Private attributes:

_sim_day: The current simulation day. _current_pen: The current pen object. _manure_handler_daily_output: The daily output of the manure handler. _current_manure_treatment_daily_input: The current input data assigned based on the

input data passed into the daily_update() method.

_manure_separator: Present in the separator - digester - separator - lagoon scenario. _manure_separator_daily_output: Only present in the digester - separator - lagoon scenario. _accumulated_output: Summation of all daily outputs.

_daily_update_helper() ManureTreatmentDailyOutput#

Updates the daily output from anaerobic digestion.

Returns:

The daily output from anaerobic digestion.

_calc_anaerobic_digestion_daily_output(manure_treatment_daily_output: ManureTreatmentDailyOutput) ManureTreatmentDailyOutput#

Returns the daily output from anaerobic digestion.

Args:

Returns:

The daily output from anaerobic digestion.

classmethod _calc_moisture_content(total_daily_mass: float, liquid_manure_total_solids: float) float#

Returns moisture_content of influent as decimal (0-1).

Args:

total_daily_mass: Total daily mass of influent, kg. liquid_manure_total_solids: Total solids of influent, kg.

Returns:

Moisture content of influent as decimal (0-1).

_calc_specific_input_energy(average_temperature_celsius, moisture_content) float#

Returns the energy required to maintain anaerobic digestion temperature at set point.

Args:

average_temperature_celsius: Average daily temperature, C. moisture_content: A 0-1 decimal representing water content of manure.

Returns:

Energy required to maintain anaerobic digestion temperature at set point, MJ/m^3.

_recalculate_solids_after_destruction(volatile_solids_destruction: float, manure_output: ManureTreatmentDailyOutput) ManureTreatmentDailyOutput#

Adjusts the pools of solids in the manure after volatile solids are destroyed.

Parameters#

volatile_solids_destructionfloat

Amount of volatile solids removed from the manure (kg).

manure_outputManureTreatmentDailyOutput

ManureTreatmentDailyOutput which will have the solids pools after accounting for volatile solids destruction.

Returns#

ManureTreatmentDailyOutput

The manure_output after the destroyed volatile solids have been removed from the volatile solids pools.

classmethod _bound_influent_temperature(average_temperature_celsius: float) float#

Returns the max between the given average temperature and temperature bound.

Args:

average_temperature_celsius: Average daily temperature, C.

classmethod _calc_manure_heat_capacity(average_temperature_celsius: float, moisture_content: float) float#

Returns heat capacity of manure.

Args:

average_temperature_celsius: Average daily temperature, C. moisture_content: A 0-1 decimal representing water content of manure.

Returns:

Heat capacity of manure, kJ /kg /C.

_adjust_accumulated_output(manure_treatment_daily_output: ManureTreatmentDailyOutput) None#

Override method of BaseManureTreatment class _adjust_accumulated_output() to accommodate for wanting to never empty the manure pit for AnaerobicDigestion

_abc_impl = <_abc._abc_data object>#