def testFluidSystemWaterSolverMdot40(self):
        params = SimulationParameters(working_fluid = 'water', orc_fluid = 'R245fa', capacity_factor = 0.9)
        params.m_dot_IP = 40

        output = FullSystemORC.getDefaultWaterSystem(params).solve()

        self.assertTrue(*testAssert(output.fluid_system_solver.pump.well.state.P_Pa, 7.9610e6, 'test_subsurface_solver2_pressure'))
        self.assertTrue(*testAssert(output.fluid_system_solver.pump.well.state.T_C, 100.3125, 'test_subsurface_solver2_temp'))
        self.assertTrue(*testAssert(output.energy_results.W_net, 1.4286e+05, 'test_subsurface_solver2_w_net'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_brownfield, 2.3287e7, 'test_solver2_C_brownfield_N'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_greenfield, 3.6399062e7, 'test_solver2_C_greenfield_N'))
        self.assertTrue(*testAssert(output.capital_cost_model.LCOE_brownfield.LCOE, 7.8465e-4, 'test_solver2_LCOE_brownfield'))
    def testFluidSystemWaterSolverMdot1(self):
        params = SimulationParameters(working_fluid = 'water', orc_fluid = 'R245fa', capacity_factor = 0.9)
        params.m_dot_IP = 1

        output = FullSystemORC.getDefaultWaterSystem(params).solve()

        self.assertTrue(*testAssert(output.fluid_system_solver.pump.well.state.P_Pa, 7.84791e5, 'test_subsurface_solver1_pressure'))
        self.assertTrue(*testAssert(output.fluid_system_solver.pump.well.state.T_C, 81.2595, 'test_subsurface_solver1_temp'))
        self.assertTrue(*testAssert(output.energy_results.W_net, 5.2775e3, 'test_subsurface_solver1_w_net'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_brownfield, 9.1965e6, 'test_solver1_C_brownfield_N'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_greenfield, 2.2308e7, 'test_solver1_C_greenfield_N'))
        self.assertTrue(*testAssert(output.capital_cost_model.LCOE_brownfield.LCOE, 0.0083879, 'test_solver1_LCOE_brownfield'))
Пример #3
0
    def testFluidSystemCO2Mdot200(self):
        params = SimulationParameters(working_fluid='co2', capacity_factor=0.9)
        params.m_dot_IP = 200
        output = FullSystemCPG.getDefaultCPGSystem(params).solve()

        self.assertTrue(*testAssert(output.fluid_system_solver.pp.dP_surface,
                                    3.468765e+06, 'test_dP_surface'))
        self.assertTrue(
            *testAssert(output.fluid_system_solver.production_well.state.T_C,
                        47.6070, 'test_T_prod_surface_C'))
        self.assertTrue(
            *testAssert(output.energy_results.W_net, -1.3875e6, 'test_W_net'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_brownfield,
                                    5.0443e7, 'test_C_brownfield_N'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_greenfield,
                                    7.3073e7, 'test_C_greenfield_N'))
        self.assertTrue(
            np.isnan(output.capital_cost_model.LCOE_brownfield.LCOE),
            'test_LCOE_brownfield')
Пример #4
0
    def testFluidSystemCO2Mdot80(self):
        params = SimulationParameters(working_fluid='co2', capacity_factor=0.9)
        params.m_dot_IP = 80
        output = FullSystemCPG.getDefaultCPGSystem(params).solve()

        self.assertTrue(*testAssert(output.fluid_system_solver.pp.dP_surface,
                                    5.6501e6, 'test_dP_surface'))
        self.assertTrue(
            *testAssert(output.fluid_system_solver.production_well.state.T_C,
                        59.0540, 'test_T_prod_surface_C'))
        self.assertTrue(
            *testAssert(output.energy_results.W_net, 4.9940e+05, 'test_W_net'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_brownfield,
                                    2.7650e7, 'test_C_brownfield_N'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_greenfield,
                                    5.0280e7, 'test_C_greenfield_N'))
        self.assertTrue(
            *testAssert(output.capital_cost_model.LCOE_brownfield.LCOE,
                        2.6650e-4, 'test_LCOE_brownfield'))
Пример #5
0
    def testFluidSystemCO2Mdot10(self):
        params = SimulationParameters(working_fluid='co2', capacity_factor=0.9)
        params.m_dot_IP = 10
        output = FullSystemCPG.getDefaultCPGSystem(params).solve()

        self.assertTrue(*testAssert(output.fluid_system_solver.pp.dP_surface,
                                    5.9421e6, 'test_dP_surface'))
        self.assertTrue(
            *testAssert(output.fluid_system_solver.production_well.state.T_C,
                        59.2802, 'test_T_prod_surface_C'))
        self.assertTrue(
            *testAssert(output.energy_results.W_net, 9.7662e4, 'test_W_net'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_brownfield,
                                    1.3271e7, 'test_C_brownfield_N'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_greenfield,
                                    3.5901e7, 'test_C_greenfield_N'))
        self.assertTrue(
            *testAssert(output.capital_cost_model.LCOE_brownfield.LCOE,
                        6.5410e-4, 'test_LCOE_brownfield'))
Пример #6
0
    def testInjectionWellCO2SmallWellR(self):
        ###
        #  Testing SemiAnalyticalWell for horizontal injection well settings
        ###
        # load global physical properties
        gpp = SimulationParameters(working_fluid = 'co2')
        gpp.time_years = 10.
        gpp.dT_dz = 0.06
        gpp.well_radius = 0.02
        gpp.m_dot_IP = 0.1

        vertical_well = SemiAnalyticalWell(params = gpp,
                                            dz_total = -3500.,
                                            T_e_initial = 15.)

        # initial state
        initial_state = FluidState.getStateFromPT(1.e6, 25., gpp.working_fluid)
        vertical_well_results = vertical_well.solve(initial_state)

        self.assertMessages(gpp.working_fluid,
                        (vertical_well_results.state.P_Pa, 1.1431e6),
                        (vertical_well_results.state.T_C, 222.2246),
                        (vertical_well_results.state.h_Jkg, 6.8717e5))
Пример #7
0
    def testFluidSystemCO2Mdot100(self):
        params = SimulationParameters(working_fluid='co2', capacity_factor=0.9)
        params.m_dot_IP = 100
        params.depth = 2400.
        params.permeability = 1e-8 / 100.
        output = FullSystemCPG.getDefaultCPGSystem(params).solve()

        self.assertTrue(*testAssert(output.fluid_system_solver.pp.dP_surface,
                                    5.0019e6, 'test_dP_surface'))
        self.assertTrue(
            *testAssert(output.fluid_system_solver.production_well.state.T_C,
                        55.3144, 'test_T_prod_surface_C'))
        self.assertTrue(*testAssert(output.fluid_system_solver.pp.dP_pump,
                                    -1.0756e6, 'test_dP_pump'))
        self.assertTrue(
            *testAssert(output.energy_results.W_net, 8.2656e5, 'test_W_net'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_brownfield,
                                    2.6182e7, 'test_C_brownfield_N'))
        self.assertTrue(*testAssert(output.capital_cost_model.C_greenfield,
                                    4.8021e7, 'test_C_greenfield_N'))
        self.assertTrue(
            *testAssert(output.capital_cost_model.LCOE_brownfield.LCOE,
                        1.5247e-4, 'test_LCOE_brownfield'))
Пример #8
0
    def testInjectionWellCO2(self):
        ###
        #  Testing SemiAnalyticalWell for horizontal injection well settings
        ###
        # load global physical properties
        gpp = SimulationParameters(working_fluid = 'co2')
        gpp.time_years = 10.
        gpp.dT_dz = 0.06
        gpp.well_radius = 0.279
        gpp.m_dot_IP = 5.

        vertical_well = SemiAnalyticalWell(params = gpp,
                                            dz_total = -3500.,
                                            T_e_initial = 15.)

        # initial state
        initial_state = FluidState.getStateFromPT(1.e6, 25., gpp.working_fluid)
        vertical_well_results = vertical_well.solve(initial_state)

        self.assertMessages(gpp.working_fluid,
                        (vertical_well_results.state.P_Pa, 1.7245e6),
                        (vertical_well_results.state.T_C, 156.08),
                        (vertical_well_results.state.h_Jkg, 6.1802e5))

        horizontal_well = SemiAnalyticalWell(params = gpp,
                                            dr_total = 3000.,
                                            T_e_initial = vertical_well.T_e_initial + gpp.dT_dz * abs(vertical_well.dz_total))

        # initial state
        initial_state = FluidState.getStateFromPT(vertical_well_results.state.P_Pa, vertical_well_results.state.T_C, gpp.working_fluid)
        horizontal_well_results = horizontal_well.solve(initial_state)

        self.assertMessages(gpp.working_fluid,
                        (horizontal_well_results.state.P_Pa, 1.7235e6),
                        (horizontal_well_results.state.T_C, 212.746),
                        (horizontal_well_results.state.h_Jkg, 6.755e5))
Пример #9
0
    def testInjectionWellWater(self):
        ###
        #  Testing SemiAnalyticalWell for vertical and horizontal injection well settings
        ###
        # load parameters
        gpp = SimulationParameters(working_fluid = 'water')
        gpp.time_years = 10.
        gpp.dT_dz = 0.06
        gpp.well_radius = 0.279
        gpp.m_dot_IP = 5.

        vertical_well = SemiAnalyticalWell(params = gpp,
                                        dz_total = -3500.,
                                        T_e_initial = 15.)

        # initial state
        initial_state = FluidState.getStateFromPT(1.e6, 25., gpp.working_fluid)
        vertical_well_results = vertical_well.solve(initial_state)

        self.assertMessages(gpp.working_fluid,
                        (vertical_well_results.state.P_Pa, 3.533e7),
                        (vertical_well_results.state.T_C, 67.03),
                        (vertical_well_results.state.h_Jkg, 3.0963e5))

        horizontal_well = SemiAnalyticalWell(params = gpp,
                                        dr_total = 3000.,
                                        T_e_initial = vertical_well.T_e_initial + gpp.dT_dz * abs(vertical_well.dz_total))

        # initial state
        initial_state = FluidState.getStateFromPT(vertical_well_results.state.P_Pa, vertical_well_results.state.T_C, gpp.working_fluid)
        horizontal_well_results = horizontal_well.solve(initial_state)

        self.assertMessages(gpp.working_fluid,
                        (horizontal_well_results.state.P_Pa, 3.533e7),
                        (horizontal_well_results.state.T_C, 121.99),
                        (horizontal_well_results.state.h_Jkg, 5.3712e5))