Exemplo n.º 1
0
        // -------------------------------------------------------------------------------------
        //                            !!! PROTECTED METHODS !!!
        // -------------------------------------------------------------------------------------

        /// <summary>
        /// Calculates the heat energy produced by bacteria inside the digester measured in kWh/d
        ///
        /// nicht type 0 und auch nicht type 1, da x ist vektor aus ADM1 beschreibend die reaktions
        /// raten p oder rho genannt
        /// </summary>
        /// <param name="p">ADM reaction rates vector</param>
        /// <param name="par">volume of the digester in m^3</param>
        /// <returns>measured energy in kWh/d</returns>
        override protected physValue[] doMeasurement(double[] p, params double[] par)
        {
            physValue[] values = new physValue[dimension];

            if (par.Length != 1)
            {
                throw new exception(String.Format(
                                        "Length of params is != 1: {0}!", par.Length));
            }

            double Vliq = par[0];

            values[0] = new physValue("Pprodmic",
                                      ADMstate.calcProdEnergyOfMicroOrganisms(p, Vliq), "kWh/d",
                                      "thermal energy prod. of microorganisms");

            return(values);
        }