示例#1
0
        //---------------------------------------------------------------------------

        public void CalcIncidentRadiation(double hour)
        {
            TotalIncidentRadiation = Ios.Value(hour);

            DirectRadiation  = Idirs.Value(hour);
            DiffuseRadiation = Idiffs.Value(hour);

            TotalRadiationPAR   = Ios_PAR.Value(hour);
            DiffuseRadiationPAR = Idiffs_PAR.Value(hour);
            DirectRadiationPAR  = Idirs_PAR.Value(hour);

            //double S0 = calcExtraTerestrialRadiation2(hour);

            //totalIncidentRadiation = S0 * ratio / conversionFactor * 1E12;
            ////totalIncidentRadiation = calcTotalIncidentRadiation(hour, dayLength, sunrise);
            ////diffuseRadiation = calcDiffuseRadiation(sunAngle.rad) / conversionFactor * 10E12;
            //diffuseRadiation = fracDiffuseATM * solarConstant * Math.Sin(sunAngle.rad) / 1000000 / conversionFactor * 1E12;

            //if (diffuseRadiation > totalIncidentRadiation)
            //{
            //    diffuseRadiation = totalIncidentRadiation;
            //}

            ////totalIncidentRadiation = totalIncidentRadiation / conversionFactor * 10E12;
            //directRadiation = (totalIncidentRadiation - diffuseRadiation);
        }
示例#2
0
        //---------------------------------------------------------------------------
        void CalcDirectRadns()
        {
            List <double> dirs = new List <double>();
            List <double> time = new List <double>();

            for (int i = 0; i < 24; i++)
            {
                time.Add(i);
                dirs.Add(Ios.Value(i) - Idiffs.Value(i));
            }
            Idirs = new TableFunction(time.ToArray(), dirs.ToArray(), false);
        }
示例#3
0
        //---------------------------------------------------------------------------
        private void ConvertRadiationsToPAR()
        {
            List <double> io_par    = new List <double>();
            List <double> idiff_par = new List <double>();
            List <double> idir_par  = new List <double>();
            List <double> time      = new List <double>();

            for (int i = 0; i < 24; i++)
            {
                time.Add(i);

                idiff_par.Add(Idiffs.Value(i) * RPAR * 4.25 * 1E6);
                idir_par.Add(Idirs.Value(i) * (1 - RPAR) * 4.56 * 1E6);

                io_par.Add(idiff_par[i] + idir_par[i]);
            }
            Ios_PAR    = new TableFunction(time.ToArray(), io_par.ToArray(), false);
            Idiffs_PAR = new TableFunction(time.ToArray(), idiff_par.ToArray(), false);
            Idirs_PAR  = new TableFunction(time.ToArray(), idir_par.ToArray(), false);
        }