@@ -2917,16 +2917,22 @@ def add_biomethanation_CO2(
29172917 # - Volumetric flow (product) is proportional to reactor volume
29182918 # - T, P conditions for product (biomethane) do not vary between the two cases
29192919 # - Investment cost scales by the CH4 output ratio between the two cases
2920- output_ratio = (1 - technology_dataframe .loc [(base_tech_name , "biogas-input" ), years ]
2921- / technology_dataframe .loc [(base_tech_name , "methane-output" ), years ])
2920+ output_ratio = (
2921+ 1
2922+ - technology_dataframe .loc [(base_tech_name , "biogas-input" ), years ]
2923+ / technology_dataframe .loc [(base_tech_name , "methane-output" ), years ]
2924+ )
29222925
29232926 # Copy all entries from base technology unchanged (source, descriptions, units, etc.)
29242927 for param in technology_dataframe .loc [base_tech_name ].index :
2925- new_technology_dataframe .loc [(tech_name , param ), :] = technology_dataframe .loc [(base_tech_name , param ), :]
2928+ new_technology_dataframe .loc [(tech_name , param ), :] = technology_dataframe .loc [
2929+ (base_tech_name , param ), :
2930+ ]
29262931
29272932 # Override only the two entries that differ (scaled by volumetric flow ratio)
29282933 new_technology_dataframe .loc [(tech_name , "methane-output" ), years ] = (
2929- technology_dataframe .loc [(base_tech_name , "methane-output" ), years ] * output_ratio
2934+ technology_dataframe .loc [(base_tech_name , "methane-output" ), years ]
2935+ * output_ratio
29302936 )
29312937 new_technology_dataframe .loc [(tech_name , "investment" ), years ] = (
29322938 technology_dataframe .loc [(base_tech_name , "investment" ), years ] * output_ratio
0 commit comments