Пример #1
0
    public override void MakeSoluteDiffusionEffective()
    {
        SoluteChangedType SoluteChanges = new SoluteChangedType();

        SoluteChanges.Sender      = "SoluteDiffusion";
        SoluteChanges.SoluteName  = Name;
        SoluteChanges.SoluteUnits = "kg/ha";
        SoluteChanges.DeltaSolute = deltaSoluteDiffusion;
        SoluteChanged.Invoke(SoluteChanges);
    }
Пример #2
0
    /// <summary>
    /// Make the changes from solute degradation effective . Uses the SoluteChanged event
    /// </summary>
    public override void EffectivateSoluteDegradation()
    {
        SoluteChangedType SoluteChanges = new SoluteChangedType();

        // First reduce the amount of this solute
        SoluteChanges.Sender      = "SoluteDegradation";
        SoluteChanges.SoluteName  = Name;
        SoluteChanges.SoluteUnits = "kg/ha";
        SoluteChanges.DeltaSolute = deltaSoluteTransformed;
        SoluteChanged.Invoke(SoluteChanges);

        // Now increase the degradation product (assumed also solute)
        SoluteChanges.Sender      = "SoluteDegradation";
        SoluteChanges.SoluteName  = ProductName;
        SoluteChanges.SoluteUnits = "kg/ha";
        SoluteChanges.DeltaSolute = Array.ConvertAll(deltaSoluteTransformed, i => - i);
        SoluteChanged.Invoke(SoluteChanges);
    }
Пример #3
0
    /// <summary>
    /// Make the changes from solute degradation effective . Uses the SoluteChanged event
    /// </summary>
    public override void MakeSoluteDegradationEffective()
    {
        // First reduce the amount of this solute
        SoluteChangedType SoluteChanges = new SoluteChangedType();

        SoluteChanges.Sender      = "SoluteDegradation";
        SoluteChanges.SoluteName  = Name;
        SoluteChanges.SoluteUnits = "kg/ha";
        SoluteChanges.DeltaSolute = deltaSoluteTransformed;
        SoluteChanged.Invoke(SoluteChanges);

        // Now increase the degradation product (assumed also solute)
        NitrogenChangedType NitrogenChanges = new NitrogenChangedType();

        NitrogenChanges.Sender     = "SoluteDegradation";
        NitrogenChanges.SenderType = "Solute";
        NitrogenChanges.DeltaUrea  = Array.ConvertAll(deltaSoluteTransformed, i => - i);
        NitrogenChanged.Invoke(NitrogenChanges);
    }