/// <summary>Comunicate other components that C amount in the soil has changed</summary> /// <param name="dltC">C changes</param> private void SendExternalMassFlowC(double dltC) { ExternalMassFlowType massBalanceChange = new ExternalMassFlowType(); if (Math.Abs(dltC) <= EPSILON) { dltC = 0.0; } massBalanceChange.FlowType = dltC >= 0 ? "gain" : "loss"; massBalanceChange.PoolClass = "soil"; massBalanceChange.N = (float)Math.Abs(dltC); ExternalMassFlow.Invoke(massBalanceChange); }
/// <summary>Comunicate other components that N amount in the soil has changed</summary> /// <param name="dltN">N changes</param> private void SendExternalMassFlowN(double dltN) { ExternalMassFlowType massBalanceChange = new ExternalMassFlowType(); if (Math.Abs(dltN) <= EPSILON) dltN = 0.0; massBalanceChange.FlowType = dltN >= 0 ? "gain" : "loss"; massBalanceChange.PoolClass = "soil"; massBalanceChange.N = (float)Math.Abs(dltN); if (ExternalMassFlow != null) ExternalMassFlow.Invoke(massBalanceChange); }