Skip to content

Documentation for Flow

Flow class to imitate the fluxes between boxes in a carbon box model.

__init__(source, destination, flux_rate)

Init method to initialise object.

Parameters:

Name Type Description Default
source Box

source of the flow.

required
destination Box

destination the flow.

required
flux_rate float

flux rate between the source and the destination. Flux must be a non-negative value.

required

get_source()

Getter method for the source node of the Flow Class.

Returns:

Type Description
Box

source of flow.

get_destination()

Getter method for the destination node of the Flow Class.

Returns:

Type Description
Box

destination of the flow.

get_flux()

Getter method for the flux rate of the Flow Class.

Returns:

Type Description
float

flux of the flow object.

__str__()

Overrides the default string behaviour to display a user-friendly output.

Returns:

Type Description
str

string representation of the Flow Object returned in the following form - str(source)-->str(destination):flux_value