net.simplace.sim.components.experimental.slim.SlimPhosphorusFunctions




public class SlimPhosphorusFunctions {
// Public Constructors
public SlimPhosphorusFunctions();


// Class Methods
public static HashMap Leaching(Double[] dissolved, Double[] waterContent,
Double[] waterFlow, Double fertilizer, Double lowerBoundaryConcentration);

Calculates phosphorus leaching in (layered) soil Moves dissolved P with the water flow between soil layers. If the the water flow of a specific layer l is positive, then P is moved from the layer to the layer below. Else P is moved from the layer below to the layer. The amount is calculated by the water flow times the P concentration of the layer where the water comes from (i.e. l when flow is positive, l+1 when negative).
returns Updated Dissolved P per layer [g/m^2] and DissolvedFlow per layer [g/(m^2 day)]
public static HashMap PoolsInterchange(Double[] dissolved, Double[] adsorbed,
Double[] fixed, Double[] adsorptionCoefficients, Double[]
fixationCoefficients);

Moves phoshporus between the three inorganic pools: dissolved, adsorbed and fixed Change rates depend on the difference between the pools and the coefficients. There is an interchange between dissolved and adsorbed and between adsorbed and fixed. Flows can go in both direction, but reverse rates fixed->adsorbed->dissolved are only 1/10 of the rates dissolved->adsorbed->fixed. See Formulas (238) and (243) in Williams, Izaurralde: The Apex Model, 2005
returns Updated pools in g/m^2 and change rates between pools in g/(m^2 day)
public static HashMap Uptake(Double[] dissolved, Double[] rootlength, Double
maxUptakeRate, Double demand);

Performs the P uptake by plant Plant available P per layer is limited by dissolved p and the maximum root uptake capacity (which is maxUptakeRate times rootlength). Plant P uptake is limited by demand and availability. If demand exceeds availability, all dissolved P is taken up. Else the uptake amount per layer is proportional to the ratio demand/avail.
returns updated Dissolved P per layer [g/m^2], TotalUptake and Uptake per layer [g/(m^2 day)], TotalAvail and Avail per layer [g/(m^2 day)]
public static HashMap CalculateFlowCoefficients(int soiltype, Double[]
dissolvedconcentration, Double[] clay, Double[] caco3, Double[] ph,
Double[] bsa);

Calculates adsorption and fixation coefficients based on soil properties for different soil types See formulas (239)-(242) and (244)-(245) from Williams, Izaurralde: The Apex Model, 2005
returns adsorption coefficients per layer [-] and fixation coefficients per layer [-]
public static HashMap CalculateFlowCoefficientsCalcareous(Double[] caco3);

Calculates adsorption and fixation coefficients for calcareous soils See formulas (239) and (244) from Williams, Izaurralde: The Apex Model, 2005
returns adsorption coefficients per layer [-] and fixation coefficients per layer [-]
public static HashMap CalculateFlowCoefficientsSlightlyWeathered(Double[]
dissolvedconcentration);

Calculates adsorption and fixation coefficients for slightly weathered, non-calcareous soils See formulas (240) and (245) from Williams, Izaurralde: The Apex Model, 2005
returns adsorption coefficients per layer [-] and fixation coefficients per layer [-]
public static HashMap CalculateFlowCoefficientsModeratelyWeathered(Double[]
ph, Double[] bsa);

Calculates adsorption and fixation coefficients for moderately weathered, non-calcareous soils See formulas (241) and (245) from Williams, Izaurralde: The Apex Model, 2005
returns adsorption coefficients per layer [-] and fixation coefficients per layer [-]
public static HashMap CalculateFlowCoefficientsHighlyWeathered(Double[] clay);

Calculates adsorption and fixation coefficients for highly weathered, non-calcareous soils See formulas (242) and (245) from Williams, Izaurralde: The Apex Model, 2005
returns adsorption coefficients per layer [-] and fixation coefficients per layer [-]
public static Double AmountFromConcentration(Double concentration, Double
thickness, Double bulkdensity);

Calculates amount of P from P-concentration in one layer
returns P-amount [g/m^2]
public static Double[] AmountFromConcentration(Double[] concentration,
Double[] depth, Double[] bulkdensity);

Calculates amout of P from P-concentration in all layers
returns P-amount in each layers [g/m^2]
public static Double ConcentrationFromAmount(Double amount, Double thickness,
Double bulkdensity);

Calculates P-concentration from P-amount for one layer
returns P-concentration [ppm]
public static Double[] ConcentrationFromAmount(Double[] amount, Double[]
depth, Double[] bulkdensity);

Calculates P-concentration from P-amount in all layers
returns P-concentration in each layer [ppm]


}