RUFAS.biophysical.feed_storage.silage module#

RUFAS.biophysical.feed_storage.silage.DRY_MATTER_FRACTION_OF_EFFLUENT = 0.1035#

Number of days that loss of effluent occurs over after a crop is ensiled.

class RUFAS.biophysical.feed_storage.silage.Silage(config: dict[str, str | float])#

Bases: Storage

Class representing the Silage storage type, inheriting from Storage.

Parameters#

configdict[str, str | float]

Configuration dictionary for the silage storage.

Attributes#

omOutputManager

OutputManager instance for logging variables.

Methods#

calculate_days_of_effluent_loss_to_process(crop: HarvestedCrop, time: RufasTime)

Calculates the number of days to effluent loss needs to be processed for in the given crop.

calculate_dry_matter_loss_to_effluent(estimated_maximum_effluent: float, days_of_loss: int)

Calculates the total dry matter lost to effluent that occurred over the given number of days.

calculate_moisture_loss_to_effluent(estimated_maximum_effluent: float, days_of_loss: int)

Calculates the total moisture lost to effluent that occurred over the given number of days.

__init__(config: dict[str, str | float]) None#
process_degradations(weather: Weather, time: RufasTime) None#

Processes the losses of nutrients and mass to effluent in the ensiled crops, calls the parent implementation of of process_degradations to handle the fermentative loss.

Parameters#

weatherWeather

Weather instance containing all weather information for the simulation.

timeRufasTime

RufasTime instance tracking the current time of the simulation.

project_degradations(crops: list[HarvestedCrop], weather: Weather, time: RufasTime) list[HarvestedCrop]#

Projects the state of crops currently stored at a given future date.

Parameters#

cropslist[HarvestedCrop]

List of HarvestedCrops to project degradations for.

weatherWeather

Weather instance containing all weather information for the simulation.

timeRufasTime

RufasTime instance containing the date at which the state of the stored crops should be projected.

Returns#

list[HarvestedCrop]

Crops in the state they are projected to be in at the given date.

_calculate_effluent_loss(crop: HarvestedCrop, time: RufasTime) dict[str, float]#

Calculates the attributes of a crop after effluent loss.

Parameters#

cropHarvestedCrop

HarvestedCrop to calculate effluent losses from.

timeRufasTime

RufasTime instance tracking the current time of the simulation.

Returns#

dict[str, float]

Mapping of crop’s attributes to their values after effluent loss.

calculate_days_of_effluent_loss_to_process(crop: HarvestedCrop, time: RufasTime) int#

Calculates the number of days of effluent loss to process for an ensiled crop.

Parameters#

cropHarvestedCrop

Ensiled crop that is being degraded.

timeRufasTime

RufasTime instance containing the current time of the simulation.

Returns#

int

Number of days to calculate effluent loss for.

Notes#

  • Effluent loss is fixed at 10 days if the crop is still within the first 10 days of storage.

  • After that period, it is calculated as the number of days since the last degradation.

calculate_dry_matter_loss_to_effluent(estimated_maximum_effluent: float, days_of_loss: int) float#

Calculates the dry matter loss to effluent.

Parameters#

estimated_maximum_effluentfloat

The estimated maximum effluent.

days_of_effluent_lossint

The number of days effluent loss will be calculated for.

Returns#

float

The amount of dry matter lost to effluent, in kg.

References#

calculate_moisture_loss_to_effluent(estimated_maximum_effluent: float, days_of_loss: int) float#

Calculates the moisture loss to effluent.

Parameters#

estimated_maximum_effluentfloat

The estimated maximum effluent.

days_of_effluent_lossint

The number of days effluent loss will be calculated for.

Returns#

float

The amount of moisture lost to effluent, in kg.

References#

calculate_non_protein_nitrogen_after_effluent_loss(initial_non_protein_nitrogen: float, initial_crude_protein: float, loss_fraction: float) float#

Calculates the percentage of non-protein nitrogen in a stored crop after losing dry matter to effluent.

Parameters#

initial_non_protein_nitrogenfloat

Percentage of non-protein nitrogen in the crop before dry matter loss occurred.

initial_crude_proteinfloat

Percentage of crude protein in the crop before dry matter loss occurred.

loss_fractionfloat

Fraction of dry matter that was lost to effluent.

Returns#

float

Percentage of non-protein nitrogen remaining in the stored crop.

References#

calculate_crude_protein_after_effluent_loss(initial_crude_protein: float, loss_fraction: float) float#

Calculates the percentage of crude protein in a stored crop after losing dry matter to effluent.

Parameters#

initial_crude_proteinfloat

Percentage of crude protein in the crop before dry matter loss occurred.

loss_fractionfloat

Fraction of dry matter that was lost to effluent.

Returns#

float

Percentage of crude protein remaining in the stored crop.

References#

class RUFAS.biophysical.feed_storage.silage.Bunker(config: dict[str, str | float])#

Bases: Silage

Class representing the Bunker type of Silage storage.

__init__(config: dict[str, str | float])#

Initializes a Bunker instance.

class RUFAS.biophysical.feed_storage.silage.Pile(config: dict[str, str | float])#

Bases: Silage

Class representing the Pile type of Silage storage.

__init__(config: dict[str, str | float]) None#

Initializes a Pile instance.

class RUFAS.biophysical.feed_storage.silage.Bag(config: dict[str, str | float])#

Bases: Silage

Class representing the Bag type of Silage storage.

__init__(config: dict[str, str | float]) None#

Initializes a Bag instance.