public void StartCalc() { cH2[0] = CalcVoden(); cCO[0] = CalcSynthesGas(0, 0, 0, 0, 0); cCO2[0] = 0; cH2O[0] = 0; reactorPress[0] = CalcReactorPress(0, cH2[0], cCO[0], cCO2[0], cH2O[0]); for (var i = 1; i < component.EndTime; i++) { cH2[i] = CalcVoden(i, cH2[i - 1], cCO[i - 1], cCO2[i - 1], cH2O[i - 1]) < 0 ? 0 : CalcVoden(i, cH2[i - 1], cCO[i - 1], cCO2[i - 1], cH2O[i - 1]); cCO[i] = CalcSynthesGas(i, cH2[i - 1], cCO[i - 1], cCO2[i - 1], cH2O[i - 1]) < 0 ? 0 : CalcSynthesGas(i, cH2[i - 1], cCO[i - 1], cCO2[i - 1], cH2O[i - 1]); cCO2[i] = CalcVyglGas(i, cH2[i - 1], cCO[i - 1], cCO2[i - 1], cH2O[i - 1]) < 0 ? 0 : CalcVyglGas(i, cH2[i - 1], cCO[i - 1], cCO2[i - 1], cH2O[i - 1]); cH2O[i] = CalcWater(i, cH2[i - 1], cCO[i - 1], cCO2[i - 1], cH2O[i - 1]) < 0 ? 0 : CalcWater(i, cH2[i - 1], cCO[i - 1], cCO2[i - 1], cH2O[i - 1]); reactorPress[i] = CalcReactorPress(0, cH2[i], cCO[i], cCO2[i], cH2O[i]); } cLiquidComponent.AddArray(cH2, 0); cLiquidComponent.AddArray(cCO, 1); cLiquidComponent.AddArray(cCO2, 2); cLiquidComponent.AddArray(cH2O, 3); CalcComponentsLiquidPhase(); CalcComponentsGasPhase(); }