Conversion methods#
Shared generation#
Constant-efficiency conversion, capacity limitation and heat/electricity accounting.
- x2power.methods.generation.generate_power(fuel_energy_kwh, generator, *, duration_h=1.0, availability=1.0, process_heat_kwh=0.0, auxiliaries=None)[source]#
Convert uniformly supplied fuel; do not shift fuel between online/offline hours.
Available recovered heat serves process demand first. The remaining heat demand uses an electric resistance heater; its input is deducted from net electricity. Negative net output means required external electrical supply. Unused fuel is reported explicitly; no fuel store or flaring destination is assumed.
- Parameters:
fuel_energy_kwh (float)
generator (Generator)
duration_h (float)
availability (float)
process_heat_kwh (float)
auxiliaries (AuxiliaryLoads | None)
- Return type:
Thermal conversion#
Lumped conversion models; no reaction equilibrium or product-composition prediction.
- class x2power.methods.thermochemical.ThermalProcess(route, fuel_energy_recovery, evaporation_heat_kwh_per_kg_water, process_heat_kwh_per_kg_dry=0.0)[source]#
Recovery is fraction of dry LHV reaching the downstream power block.
Combustion: boiler-to-power-block energy fraction. Gasification: selected fuel-gas energy fraction. Pyrolysis: combined energy of selected fuel products. Fractions are gross before explicitly declared process heat and must not already include it. All feed moisture is evaporated. Drying duty must include sensible and latent heat.
- Parameters:
route (Literal['combustion', 'gasification', 'pyrolysis'])
fuel_energy_recovery (float)
evaporation_heat_kwh_per_kg_water (float)
process_heat_kwh_per_kg_dry (float)
- route: Literal['combustion', 'gasification', 'pyrolysis']#
- fuel_energy_recovery: float#
- evaporation_heat_kwh_per_kg_water: float#
- process_heat_kwh_per_kg_dry: float = 0.0#
- x2power.methods.thermochemical.simulate_thermal(feedstock, process, generator, *, duration_h=1.0, availability=1.0, auxiliaries=None)[source]#
- Parameters:
feedstock (SolidFeedstock)
process (ThermalProcess)
generator (Generator)
duration_h (float)
availability (float)
auxiliaries (AuxiliaryLoads | None)
- Return type:
Biogas#
Methane-fraction model for an already available, dry biogas stream.
- class x2power.methods.biogas.BiogasStream(volume_nm3, methane_fraction, methane_lhv_kwh_per_nm3=9.94, capture_fraction=1.0)[source]#
Nm³ means dry gas at 0 °C and 101325 Pa; all volumes must share this basis.
- Parameters:
volume_nm3 (float)
methane_fraction (float)
methane_lhv_kwh_per_nm3 (float)
capture_fraction (float)
- volume_nm3: float#
- methane_fraction: float#
- methane_lhv_kwh_per_nm3: float = 9.94#
- capture_fraction: float = 1.0#
- x2power.methods.biogas.simulate_biogas(stream, generator, *, duration_h=1.0, availability=1.0, process_heat_kwh=0.0, auxiliaries=None)[source]#
- Parameters:
stream (BiogasStream)
generator (Generator)
duration_h (float)
availability (float)
process_heat_kwh (float)
auxiliaries (AuxiliaryLoads | None)
- Return type:
Digestion and organic wastewater#
Steady-state methane yields from volatile solids and removed COD.
- class x2power.methods.digestion.DigestionProcess(volatile_solids_fraction_dry, vs_destruction_fraction, methane_yield_nm3_per_kg_vs_destroyed, methane_fraction=0.6, capture_fraction=0.98, methane_lhv_kwh_per_nm3=9.94, process_heat_kwh_per_kg_wet=0.0)[source]#
Methane yield is per kg VS destroyed, NOT per kg VS fed.
- Parameters:
volatile_solids_fraction_dry (float)
vs_destruction_fraction (float)
methane_yield_nm3_per_kg_vs_destroyed (float)
methane_fraction (float)
capture_fraction (float)
methane_lhv_kwh_per_nm3 (float)
process_heat_kwh_per_kg_wet (float)
- volatile_solids_fraction_dry: float#
- vs_destruction_fraction: float#
- methane_yield_nm3_per_kg_vs_destroyed: float#
- methane_fraction: float = 0.6#
- capture_fraction: float = 0.98#
- methane_lhv_kwh_per_nm3: float = 9.94#
- process_heat_kwh_per_kg_wet: float = 0.0#
- x2power.methods.digestion.simulate_digestion(feedstock, process, generator, *, duration_h=1.0, availability=1.0, auxiliaries=None)[source]#
- Parameters:
feedstock (SolidFeedstock)
process (DigestionProcess)
generator (Generator)
duration_h (float)
availability (float)
auxiliaries (AuxiliaryLoads | None)
- Return type:
- class x2power.methods.digestion.WastewaterStream(volume_m3: float, cod_kg_per_m3: float)[source]#
- Parameters:
volume_m3 (float)
cod_kg_per_m3 (float)
- volume_m3: float#
- cod_kg_per_m3: float#
- class x2power.methods.digestion.CODProcess(cod_removal_fraction, methane_yield_nm3_per_kg_cod_removed, methane_fraction=0.6, capture_fraction=0.98, methane_lhv_kwh_per_nm3=9.94, process_heat_kwh_per_m3=0.0)[source]#
Empirical methane yield per kg COD removed; no biological kinetics implied.
- Parameters:
cod_removal_fraction (float)
methane_yield_nm3_per_kg_cod_removed (float)
methane_fraction (float)
capture_fraction (float)
methane_lhv_kwh_per_nm3 (float)
process_heat_kwh_per_m3 (float)
- cod_removal_fraction: float#
- methane_yield_nm3_per_kg_cod_removed: float#
- methane_fraction: float = 0.6#
- capture_fraction: float = 0.98#
- methane_lhv_kwh_per_nm3: float = 9.94#
- process_heat_kwh_per_m3: float = 0.0#
- x2power.methods.digestion.simulate_wastewater(stream, process, generator, *, duration_h=1.0, availability=1.0, auxiliaries=None)[source]#
- Parameters:
stream (WastewaterStream)
process (CODProcess)
generator (Generator)
duration_h (float)
availability (float)
auxiliaries (AuxiliaryLoads | None)
- Return type: