IDAES / idaes-pse

The IDAES Process Systems Engineering Framework
https://idaes-pse.readthedocs.io/
Other
216 stars 234 forks source link

Error "Helmholtz EoS external functions not available" #1321

Closed iPoberezhets closed 9 months ago

iPoberezhets commented 9 months ago

Hi everyone. I installed the framework and decided to check if it worked correctly. To do this I ran the example "subcritical_boiler_src" (code below):

import os

# Import Pyomo libraries
import pyomo.environ as pyo
from pyomo.network import Arc

# Import IDAES core
from idaes.core import FlowsheetBlock
from idaes.core.util.model_statistics import degrees_of_freedom
from idaes.core.util import model_serializer as ms
import idaes.core.util.scaling as iscale

# Import Unit Model Modules
from idaes.models.properties import iapws95

# Import IDAES standard unit model
import idaes.logger as idaeslog
from idaes.models_extra.power_generation.unit_models.drum import Drum
from idaes.models_extra.power_generation.unit_models.downcomer import Downcomer
from idaes.models_extra.power_generation.unit_models.waterwall_section import (
    WaterwallSection,
)
from idaes.models_extra.power_generation.properties.flue_gas_ideal import (
    FlueGasParameterBlock,
)

# import subcritical functions
import idaes.models_extra.power_generation.flowsheets.subcritical_power_plant.subcritical_boiler as sub

# Create a Concrete Model as the top level object
m = pyo.ConcreteModel()
# Add a flowsheet object to the model
m.fs = FlowsheetBlock(dynamic=False)
# Add property packages to flowsheet library
m.fs.prop_water = iapws95.Iapws95ParameterBlock()
m.fs.prop_gas = FlueGasParameterBlock()

# create drum, downcomer, waterwall section models and connections
sub.create_model(m)
# set inputs (equipment dimensions and inlet conditions)
sub.set_inputs(m)
# initialize each model at the time
sub.initialize(m, outlvl=0)

when I ran the code I got an error:

2024-01-24 17:22:48 [ERROR] idaes.core.base.process_block: Failure in build: fs.prop_water
Traceback (most recent call last):
  File "C:\Users\IPoberejec\Anaconda3\lib\site-packages\idaes\core\base\process_block.py", line 41, in _rule_default
    b.build()
  File "C:\Users\IPoberejec\Anaconda3\lib\site-packages\idaes\models\properties\general_helmholtz\helmholtz_functions.py", line 1437, in build
    raise RuntimeError("Helmholtz EoS external functions not available")
RuntimeError: Helmholtz EoS external functions not available
ERROR: Constructing component 'fs.prop_water' from data=None failed:
RuntimeError: Helmholtz EoS external functions not available"

I thought it was due to poor performance between versions pyomo and IDAES but attempts to install an older version led to the same result. Does anyone know how to solve this problem with functions Helmholtz.

lbianchi-lbl commented 9 months ago

For future reference:

@iPoberezhets feel free to chime in if the above didn't apply in your case and the error was caused and/or solved by something else.