Example #1
0
        static void Main(string[] args)
        {
            InputParms input = new InputParms(60, 360, 15, 0.96, 0.99, 0.91);

            Console.WriteLine(input.report);

            Excel excel = new Excel(input);
        }
Example #2
0
        public void ParamsInput(InputParms input, XLWorkbook wb)
        {
            var ws = wb.Worksheets.Add("Parâmetros de Entrada");

            ws.Range("A1:G2").Merge();
            ws.Cell("A1").Value = "Parâmetros de entrada";
            ws.Cell("A1").Style.Alignment.Horizontal     = XLAlignmentHorizontalValues.Center;
            ws.Cell("A1").Style.Alignment.Vertical       = XLAlignmentVerticalValues.Center;
            ws.Cell("A1").Style.Font.Bold                = true;
            ws.Cell("A1").Style.Font.FontSize            = 18;
            ws.Range("A1:G2").Style.Border.OutsideBorder = XLBorderStyleValues.Thick;

            ws.Cell("B4").Value = "Altura h [m]";
            ws.Cell("C4").Value = input.altura;

            ws.Cell("B5").Value = "Vazão q [m³/s]";
            ws.Cell("C5").Value = input.vazao;

            ws.Cell("B6").Value = "Rotação do rotor n [rpm]";
            ws.Cell("C6").Value = input.rotacaoRPM;

            ws.Cell("B7").Value = "Rotação do rotor [rps]";
            ws.Cell("C7").Value = input.rotacaoRPS;

            ws.Cell("B8").Value = "Salto Energético Y [J/kg]";
            ws.Cell("C8").Value = input.saltoEnergetico;

            ws.Cell("B9").Value = "Rendimento Volumétrico nv";
            ws.Cell("C9").Value = input.rendimentoV;

            ws.Cell("B10").Value = "Vazão do rotor Rendimento Q_1/1 [m³/s]";
            ws.Cell("C10").Value = input.vazaoR;

            ws.Cell("B11").Value = "Rotação específica da máquina nqar";
            ws.Cell("C11").Value = input.nqar;

            ws.Cell("B12").Value = "Potência máxima no eixo [kW]";
            ws.Cell("C12").Value = input.potMaxEixo;

            ws.Cell("B13").Value = "Rendimento mecânico";
            ws.Cell("C13").Value = input.rendMeca;

            ws.Cell("B14").Value = "Rendimento interno";
            ws.Cell("C14").Value = input.rendInterno;

            ws.Range("B4:C14").Style.Border.TopBorder    = XLBorderStyleValues.Thin;
            ws.Range("B4:C14").Style.Border.BottomBorder = XLBorderStyleValues.Thin;
            ws.Range("B4:C14").Style.Border.LeftBorder   = XLBorderStyleValues.Thin;
            ws.Range("B4:C14").Style.Border.RightBorder  = XLBorderStyleValues.Thin;
            ws.Columns(2, 20).AdjustToContents();
        }
Example #3
0
        public Excel(InputParms input)
        {
            var wb = new XLWorkbook();
            var ws = wb.Worksheets.Add("Turbina");


            this.ParamsInput(input, wb);
            OutputParmsGeometry output = new OutputParmsGeometry(input.nqar, input.altura, input.rotacaoRPM, input.vazaoRegular, input.rendimentoV);

            this.Output(output, wb);


            wb.SaveAs("TurbinaCalc.xlsx");
        }