Esempio n. 1
0
        public static string FormatSunRayOnVertical(TotalSunHeat data)
        {
            var sb = new StringBuilder();

            var listData = data.CalculateSunRayOnVerticalScreen();


            sb.AppendLine(">>Overzicht zonnestraling op verticaal vlak: ");
            foreach (var dat in listData)
            {
                var sbAwaplhaComb = new StringBuilder();
                var aplh          = dat.Item1;
                var Aw            = dat.Item2;
                sbAwaplhaComb.AppendLine(">>aplha: " + TotalSunHeat.CalculateRadianToDegree(aplh));
                sbAwaplhaComb.AppendLine(">>Aw: " + Aw);

                var list = dat.Item3;

                var sbHour = new StringBuilder();
                var sbVal  = new StringBuilder();
                var sbVal2 = new StringBuilder();
                var sbVal3 = new StringBuilder();

                sbHour.AppendFormat("|{0,13}|", "uur");
                sbVal.AppendFormat("|{0,13}|", "QdirV");
                sbVal2.AppendFormat("|{0,13}|", "QhemV");
                sbVal3.AppendFormat("|{0,13}|", "Qgrv");
                foreach (var tuple in list)
                {
                    sbHour.AppendFormat("|{0,8}|", +tuple.Item1);
                    sbVal.AppendFormat("|{0,8:N2}|", tuple.Item2);
                    sbVal2.AppendFormat("|{0,8:N2}|", tuple.Item3);
                    sbVal3.AppendFormat("|{0,8:N2}|", tuple.Item4);
                }

                sbAwaplhaComb.AppendLine(sbHour.ToString());
                sbAwaplhaComb.AppendLine(sbVal.ToString());
                sbAwaplhaComb.AppendLine(sbVal2.ToString());
                sbAwaplhaComb.AppendLine(sbVal3.ToString());
                sbAwaplhaComb.AppendLine();


                sb.Append(sbAwaplhaComb.ToString());
            }

            sb.Append("\n");
            return(sb.ToString());
        }
Esempio n. 2
0
        private int GenerateHellVertical(int rowIndex, ISheet sheet)
        {
            rowIndex++;
            rowIndex++;
            var row13 = sheet.CreateRow(rowIndex);

            row13.CreateCell(0).SetCellValue("overzicht Verticaal");
            rowIndex++;
            rowIndex++;

            var list = _calc.CalculateSunRayOnVerticalScreen();


            foreach (var data in list)
            {
                var alpha = sheet.CreateRow(rowIndex);
                alpha.CreateCell(0).SetCellValue("Alpha");
                alpha.CreateCell(1).SetCellValue(TotalSunHeat.CalculateRadianToDegree(data.Item1));

                rowIndex++;

                var wandAzimuth = sheet.CreateRow(rowIndex);
                wandAzimuth.CreateCell(0).SetCellValue("wand azimuth");
                wandAzimuth.CreateCell(1).SetCellValue(data.Item2);

                rowIndex++;
                int col_hoogte_zon = 2;
                var uur            = sheet.CreateRow(rowIndex);
                uur.CreateCell(0).SetCellValue("uur");
                uur.CreateCell(1).SetCellValue("uur");

                rowIndex++;
                var Qdirv = sheet.CreateRow(rowIndex);
                Qdirv.CreateCell(0).SetCellValue("Qdirv");
                Qdirv.CreateCell(1).SetCellValue("graden");


                rowIndex++;
                var QhemV = sheet.CreateRow(rowIndex);
                QhemV.CreateCell(0).SetCellValue("QhemV");
                QhemV.CreateCell(1).SetCellValue("eenheid");

                rowIndex++;
                var Qgrv = sheet.CreateRow(rowIndex);
                Qgrv.CreateCell(0).SetCellValue("Qgrv");
                Qgrv.CreateCell(1).SetCellValue("eenheid");


                foreach (var yeet in data.Item3)
                {
                    uur.CreateCell(col_hoogte_zon).SetCellValue(yeet.Item1);
                    Qdirv.CreateCell(col_hoogte_zon).SetCellValue(yeet.Item2);
                    QhemV.CreateCell(col_hoogte_zon).SetCellValue(yeet.Item3);
                    Qgrv.CreateCell(col_hoogte_zon).SetCellValue(yeet.Item4);

                    col_hoogte_zon++;
                }

                rowIndex++;
                rowIndex++;
            }


            return(rowIndex);
        }