DefaultAbsorptionCalculator

floodsim.model.cell.physics.DefaultAbsorptionCalculator

Default implementation of the absorption calculation strategy. Absorbs water based on the current absorption capacity and reduces the absorption rate over time as more water is absorbed.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def calculate(incomingWater: Double, currentAbsorption: AbsorptionRate): (Double, AbsorptionRate)

Calculates the amount of water absorbed and the updated absorption rate.

Calculates the amount of water absorbed and the updated absorption rate.

Value parameters

currentAbsorption

the current absorption rate of the cell

incomingWater

the volume of water entering the cell

Attributes

Returns

a tuple containing the amount of water absorbed and the new absorption rate