@@ -1345,6 +1345,40 @@ def _row(row_name: str) -> list[float]:
13451345
13461346 self .assertEqual (lcoe_row [0 ], round (pv_annual_costs_row [0 ] * 100 / pv_annual_energy_row [0 ], 2 ))
13471347
1348+ def test_example14_chp_output (self ):
1349+ r : GeophiresXResult = GeophiresXResult (self ._get_test_file_path ('../examples/example14_data-center.out' ))
1350+
1351+ capex_vus = r .result ['CAPITAL COSTS (M$)' ]
1352+
1353+ surface_power_plant_costs_vu = capex_vus ['Surface power plant costs' ]
1354+
1355+ self .assertEqual ('MUSD' , surface_power_plant_costs_vu ['unit' ])
1356+
1357+ self .assertAlmostEqual (4225 , surface_power_plant_costs_vu ['value' ], places = 0 )
1358+
1359+ self .assertEqual (
1360+ surface_power_plant_costs_vu ['value' ],
1361+ sum (capex_vus [it ]['value' ] for it in ['of which Electrical Plant Cost' , 'of which Heat Plant Cost' ]),
1362+ )
1363+
1364+ self .assertAlmostEqual (
1365+ capex_vus ['Total surface equipment costs' ]['value' ],
1366+ sum (
1367+ capex_vus [it ]['value' ]
1368+ for it in ['Surface power plant costs' , 'Transmission pipeline cost' , 'Field gathering system costs' ]
1369+ ),
1370+ places = 1 ,
1371+ )
1372+
1373+ opex_vus = r .result ['OPERATING AND MAINTENANCE COSTS (M$/yr)' ]
1374+ total_opex_field_name = 'Total operating and maintenance costs'
1375+
1376+ self .assertAlmostEqual (
1377+ opex_vus [total_opex_field_name ]['value' ],
1378+ sum (v ['value' ] if v is not None and k != total_opex_field_name else 0 for k , v in opex_vus .items ()),
1379+ places = 1 ,
1380+ )
1381+
13481382 @staticmethod
13491383 def _new_model (
13501384 input_file : Path ,
0 commit comments