reskit.dac#
Submodules#
Classes#
The WorkflowManager class assists with the construction of more specialized WorkflowManagers, |
|
The WorkflowManager class assists with the construction of more specialized WorkflowManagers, |
Functions#
|
Function to calculate the relative humidity from dewpoint temperature and air temperature using the Sonntag formula. |
|
Simulate LT-DAC plants using ERA5 weather data. |
|
Simulate HT-DAC plants using ERA5 weather data. |
Package Contents#
- class reskit.dac.DACWorkflowManager(placements)#
Bases:
reskit.workflow_manager.WorkflowManagerThe WorkflowManager class assists with the construction of more specialized WorkflowManagers, such as the WindWorkflowManager or the SolarWorkflowManager. In addition to providing the general structure for simulation workflow management, the WorkflowManager also defines functionalities which should be common across all WorkflowManagers.
- This includes:
Basic initialization
Time domain management
Reading weather data
Adjusting variables by a long-run-average value
Applying simple loss factors
Saving the state of WorkflowManagers to XArray datasets, either in memory or on disc
Initialization:#
WorkflowManager( placements )
__init_(self, placements)
Initialization of an instance of the generic DACWorkflowManager class.
- param placements:
The locations that the simulation should be run for. Columns must include “lon”, “lat” (CRS: 4326) and “capacity” -The capacity is the nominal capacity of the DAC plant in tCO2/h
- type placements:
pandas Dataframe
- rtype:
DACWorkflowManager
- units#
- load_lt_dac_model_data(model)#
Function to load the DAC model data of a given model. The model data maps temperature and relative humidity to energy demand, relative productivity and water desorption. Description: The DAC model data needs columns “T” and “RH” where the temperature (°C) and relative humidity are included. Its a csv file. Additionally, the data needs columns:
-“totalElectricity” where the needed electricity input in MWh/tCO2 is stated at the specified ambient conditions -“totalThermal” where the needed heat input in MWh/tCO2 is stated at the specified ambient conditions -“relProd” where the relative productivity (i.e. the cpaacity factor) is stated at the specified ambient conditions -“waterDesorption” where the produced water is stated in tH2O/tCO2. It might also be possible that this is negative (if water is consumed rather than produced)
- The currently available models:
-LT_jajjawi: Data from the developed low temperature (solid sorbent) DAC model by Jajjawi et al. [1]. Here, the heat is needed at 90 °C. -LT_sendi: Data from the developed low temperature (solid sorbent) DAC model by Sendi et al. [2]. Here, the heat is needed at 110 °C (for steam generation). The original Sendi data has been adapted as described in Wenzel 2025 [3].
- Parameters:
model (str) – type of DAC model to use. Valid inputs are: “LT_sendi”, “LT_jajjawi” or a path to a csv with DAC model data in the same format as in ./data/
References
[1] http://dx.doi.org/10.2139/ssrn.5230783 [2] 10.1016/j.oneear.2022.09.003 [3] 10.1016/j.adapen.2025.100229
- simulate_lt_dac_model(fillMethod='nearest')#
Simulate the LT DAC (Direct Air Capture) model for the specified plant locations.
This function interpolates DAC model data to the simulation grid and calculates electricity, heat, and water requirements as well as CO2 output for the plants. It also handles points outside the convex hull of the DAC data using a specified fill method.
- Parameters:
fillMethod (str, optional) – Method to fill values for weather conditions outside the convex hull of the DAC model data. Options are: - “nearest” : use the nearest available datapoint (default) - “offTmin” : cut off for temperatures below the DAC data range, use nearest for relative humidity
- Raises:
NotImplementedError – If a filling method other than “nearest” or “offTmin” is requested.
- simulate_ht_dac_model(model='HT_okosun')#
Simulate the high-temperature (HT), liquid-solvent DAC (Direct Air Capture) model for a given model type.
This function maps ambient temperature and relative humidity to energy demand, relative productivity, and water desorption for the specified DAC model. Currently, only the electrified HT DAC model “HT_okosun” is available.
- Parameters:
model (str, optional) – Type of DAC model to use. Currently, only “HT_okosun” is implemented. Default is “HT_okosun”.
- Raises:
NotImplementedError – If a DAC model type other than “HT_okosun” is requested.
Notes
The “HT_okosun” model is based on a natural gas-fired HT-DAC system [1], adapted to an electrified version as described in [2,3]. The electrified DAC model only consumes electricity.
References
[1] 10.1016/j.apenergy.2022.119895 [2] 10.3389/fclim.2020.618644 [3] 10.1016/j.adapen.2025.100229
- reskit.dac.calculate_relative_humidity(dewpoint_temperature, air_temperature)#
Function to calculate the relative humidity from dewpoint temperature and air temperature using the Sonntag formula.
- Parameters:
dewpoint_temperature (float | int) – dewpoint temperature in °C
air_temperature (float | int) – air temperature in °C
References
[1] https://www.npl.co.uk/resources/q-a/dew-point-and-relative-humidity
- class reskit.dac.DACWorkflowManager(placements)#
Bases:
reskit.workflow_manager.WorkflowManagerThe WorkflowManager class assists with the construction of more specialized WorkflowManagers, such as the WindWorkflowManager or the SolarWorkflowManager. In addition to providing the general structure for simulation workflow management, the WorkflowManager also defines functionalities which should be common across all WorkflowManagers.
- This includes:
Basic initialization
Time domain management
Reading weather data
Adjusting variables by a long-run-average value
Applying simple loss factors
Saving the state of WorkflowManagers to XArray datasets, either in memory or on disc
Initialization:#
WorkflowManager( placements )
__init_(self, placements)
Initialization of an instance of the generic DACWorkflowManager class.
- param placements:
The locations that the simulation should be run for. Columns must include “lon”, “lat” (CRS: 4326) and “capacity” -The capacity is the nominal capacity of the DAC plant in tCO2/h
- type placements:
pandas Dataframe
- rtype:
DACWorkflowManager
- units#
- load_lt_dac_model_data(model)#
Function to load the DAC model data of a given model. The model data maps temperature and relative humidity to energy demand, relative productivity and water desorption. Description: The DAC model data needs columns “T” and “RH” where the temperature (°C) and relative humidity are included. Its a csv file. Additionally, the data needs columns:
-“totalElectricity” where the needed electricity input in MWh/tCO2 is stated at the specified ambient conditions -“totalThermal” where the needed heat input in MWh/tCO2 is stated at the specified ambient conditions -“relProd” where the relative productivity (i.e. the cpaacity factor) is stated at the specified ambient conditions -“waterDesorption” where the produced water is stated in tH2O/tCO2. It might also be possible that this is negative (if water is consumed rather than produced)
- The currently available models:
-LT_jajjawi: Data from the developed low temperature (solid sorbent) DAC model by Jajjawi et al. [1]. Here, the heat is needed at 90 °C. -LT_sendi: Data from the developed low temperature (solid sorbent) DAC model by Sendi et al. [2]. Here, the heat is needed at 110 °C (for steam generation). The original Sendi data has been adapted as described in Wenzel 2025 [3].
- Parameters:
model (str) – type of DAC model to use. Valid inputs are: “LT_sendi”, “LT_jajjawi” or a path to a csv with DAC model data in the same format as in ./data/
References
[1] http://dx.doi.org/10.2139/ssrn.5230783 [2] 10.1016/j.oneear.2022.09.003 [3] 10.1016/j.adapen.2025.100229
- simulate_lt_dac_model(fillMethod='nearest')#
Simulate the LT DAC (Direct Air Capture) model for the specified plant locations.
This function interpolates DAC model data to the simulation grid and calculates electricity, heat, and water requirements as well as CO2 output for the plants. It also handles points outside the convex hull of the DAC data using a specified fill method.
- Parameters:
fillMethod (str, optional) – Method to fill values for weather conditions outside the convex hull of the DAC model data. Options are: - “nearest” : use the nearest available datapoint (default) - “offTmin” : cut off for temperatures below the DAC data range, use nearest for relative humidity
- Raises:
NotImplementedError – If a filling method other than “nearest” or “offTmin” is requested.
- simulate_ht_dac_model(model='HT_okosun')#
Simulate the high-temperature (HT), liquid-solvent DAC (Direct Air Capture) model for a given model type.
This function maps ambient temperature and relative humidity to energy demand, relative productivity, and water desorption for the specified DAC model. Currently, only the electrified HT DAC model “HT_okosun” is available.
- Parameters:
model (str, optional) – Type of DAC model to use. Currently, only “HT_okosun” is implemented. Default is “HT_okosun”.
- Raises:
NotImplementedError – If a DAC model type other than “HT_okosun” is requested.
Notes
The “HT_okosun” model is based on a natural gas-fired HT-DAC system [1], adapted to an electrified version as described in [2,3]. The electrified DAC model only consumes electricity.
References
[1] 10.1016/j.apenergy.2022.119895 [2] 10.3389/fclim.2020.618644 [3] 10.1016/j.adapen.2025.100229
- reskit.dac.lt_dac_era5_wenzel2025(placements, era5_path, output_netcdf_path=None, output_variables=None, model='LT_jajjawi', fillMethod='nearest')#
Simulate LT-DAC plants using ERA5 weather data.
This function runs a full simulation workflow for low-temperature direct air capture (LT-DAC) plants. It reads ERA5 weather data, calculates relative humidity, loads the specified LT-DAC model data, performs the simulation, and optionally saves results to a NetCDF file.
- Parameters:
placements (pd.DataFrame) – DataFrame specifying the plant locations and capacities.
era5_path (str) – Path to the ERA5 weather data source.
output_netcdf_path (str, optional) – Path to save the output NetCDF file. If None, no file is saved. Default is None.
output_variables (list of str, optional) – List of variables from the simulation to include in the output NetCDF file. If None, all available variables are included. Default is None.
model (str, optional) – DAC model data to utilize. Default is “LT_jajjawi”.
fillMethod (str, optional) – Method for filling weather conditions outside the DAC model data hull: - “nearest” : use the nearest available datapoint (default) - “offTmin” : cut off for temperatures outside the model range, nearest for relative humidity
- Returns:
Simulation results, optionally limited to output_variables and including all plant locations.
- Return type:
xarray.Dataset
Notes
The simulation includes calculation of: - relative humidity - DAC capacity factor - electricity, heat, and water conversion factors - CO2, water, electricity, and heat outputs per plant
- reskit.dac.ht_dac_era5_wenzel2025(placements, era5_path, output_netcdf_path=None, output_variables=None, model='HT_okosun')#
Simulate HT-DAC plants using ERA5 weather data.
This function runs a full simulation workflow for high-temperature direct air capture (HT-DAC) plants. It reads ERA5 weather data, calculates relative humidity, runs the specified HT-DAC model simulation, and optionally saves results to a NetCDF file.
- Parameters:
placements (pd.DataFrame) – DataFrame specifying the plant locations and capacities.
era5_path (str) – Path to the ERA5 weather data source.
output_netcdf_path (str, optional) – Path to save the output NetCDF file. If None, no file is saved. Default is None.
output_variables (list of str, optional) – List of variables from the simulation to include in the output NetCDF file. If None, all available variables are included. Default is None.
model (str, optional) – DAC model to use. Currently, only “HT_okosun” is implemented. Default is “HT_okosun”.
- Returns:
Simulation results, optionally limited to output_variables and including all plant locations.
- Return type:
xarray.Dataset
- Raises:
AssertionError – If model is not “HT_okosun”.
Notes
The simulation includes calculation of: - relative humidity - DAC capacity factor - electricity conversion factor - CO2 output per plant
The simulation relies on the DACWorkflowManager and the specified HT-DAC model.