コード例 #1
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'))
コード例 #2
0
output_file = open(os.path.join(output_folder, 'data_CO2.csv'), 'w')

# initialize parameters
params = SimulationParameters(working_fluid='co2', capacity_factor=0.9)

# generate the full system
full_system = FullSystemCPG.getDefaultCPGSystem(params)
full_system_solver = FullSystemSolver(full_system)

# iterate over all depths and permeabilities and solve the system
for depth in depths:
    for permeability in permeabilities:
        print('Depth: ', depth)
        print('Permeability: ', permeability)
        params.depth = depth
        params.permeability = permeability / 100.

        try:
            output = full_system_solver.solve()
            lcoe_b = output.capital_cost_model.LCOE_brownfield.LCOE * 1e6
            lcoe_g = output.capital_cost_model.LCOE_greefield.LCOE * 1e6
            power = output.energy_results.W_net / 1e6
            optMdot = output.optMdot

        except Exception as error:
            error_str = str(error).replace("\n", "").replace(",", " - ")
            lcoe_b = 0.
            lcoe_g = 0.
            power = 0.
            optMdot = 0.