RUFAS.biophysical.animal.digestive_system.digestive_system module#

class RUFAS.biophysical.animal.digestive_system.digestive_system.DigestiveSystem#

Bases: object

An entry point for the animal digestive systems.

Attributes#

manure_excretionAnimalManureExcretions

A collection of the animal’s manure excretion data.

phosphorous_excretedfloat

The phosphorous excreted by the animal.

enteric_methane_emissionfloat

The CH₄ used for GHG reporting and downstream emissions calculations. Represents mitigated enteric methane for cows.

enteric_methane_for_energyfloat

The unmitigated CH₄ used in NASEM ME and ration optimization for cows. Remains at 0.0 for other animals.

__init__() None#
manure_excretion: AnimalManureExcretions#
phosphorus_excreted: float#
enteric_methane_emission: float#
enteric_methane_for_energy: float#
process_digestion(digestive_system_inputs: DigestiveSystemInputs) None#

Processes the digestion for different types of animals by calculating methane emission and manure excretion based on the provided digestive system inputs.

Parameters#

digestive_system_inputsDigestiveSystemInputs

Contains inputs related to the digestive system of the animal, including animal type, body weight, nutrient details, fecal phosphorus, and urine phosphorus requirements.

Raises#

TypeError

If the animal type in digestive_system_inputs is not supported, a TypeError is raised with information about supported animal types.

_calculate_base_manure(body_weight: float, phosphorus_intake: float, phosphorus_requirement: float, phosphorus_reserves: float, phosphorus_endogenous_loss: float) tuple[float, float]#

Calculates the base manure production in terms of phosphorus for an animal.

The function determines the amount of phosphorus excreted via urine and feces based on the animal’s body weight, phosphorus intake, requirements, reserves, and endogenous loss.

Parameters#

body_weightfloat

The body weight of the animal (kg).

phosphorus_intakefloat

The amount of phosphorus consumed by the animal (g).

phosphorus_requirementfloat

The required phosphorus intake for the animal’s physiological needs (g).

phosphorus_reservesfloat

The phosphorus reserves in the animal’s body (g). Can be negative indicating a deficit.

phosphorus_endogenous_lossfloat

The endogenous loss of phosphorus (g).

Returns#

tuple[float, float]

A tuple containing two values: - The amount of phosphorus excreted in urine (g). - The amount of phosphorus excreted in feces (g).