Логотип Idaes

Idaes

Сообщество
jkitchin
idaes

Comprehensive guidance for using IDAES (Institute for the Design of Advanced Energy Systems) for process systems engineering. Covers flowsheet modeling, property packages, unit models, optimization, scaling, initialization, and diagnostics. Use when working with chemical process simulations, energy systems modeling, power plant design, material and energy balances, or process optimization. Triggers include 'IDAES', 'flowsheet', 'process model', 'unit operation', 'process optimization', 'property package', 'energy systems', or process engineering tasks.

Обзор

Издательjkitchin
Репозиторийknowhow
Название навыкаidaes
Звёзды
45
Форки
9
Файлы в комплекте
7
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 7

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — jkitchin. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Idaes в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/jkitchin/knowhow/tree/main/skills/programming/idaes
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jkitchin/knowhow.git /tmp/knowhow
mkdir -p .claude/skills
cp -r /tmp/knowhow/skills/programming/idaes .claude/skills/idaes
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Idaes в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Idaes, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Idaes не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

IDAES Process Systems Engineering

Systematic guidance for using IDAES to model, simulate, and optimize chemical processes and energy systems.

IDAES Workflow

1. Identify Task Type

What do you want to do?

Getting Started:

  • Install and setup → references/installation.md
  • Understand core concepts → references/core-concepts.md
  • First flowsheet → examples/simple_flowsheet.py

Flowsheet Development:

  • Build basic flowsheet → references/flowsheets.md
  • Add unit models → references/unit-models.md
  • Connect streams → references/flowsheets.md
  • Set up material/energy balances → references/flowsheets.md
  • Add time-dependent behavior → references/dynamic-modeling.md

Property Modeling:

  • Select property package → references/property-packages.md
  • Configure components and phases → references/property-packages.md
  • Define thermodynamic methods → references/property-packages.md
  • Add reaction packages → references/property-packages.md
  • Create custom properties → references/custom-models.md

Unit Operations:

  • Use generic models (mixers, splitters, heaters) → references/generic-models.md
  • Model power generation equipment → references/power-generation.md
  • Set up gas-solid contactors → references/gas-solid-models.md
  • Configure separations → references/generic-models.md
  • Add reactors → references/generic-models.md

Solving and Optimization:

  • Initialize models → references/initialization.md
  • Solve flowsheets → references/solving.md
  • Run optimization → references/optimization.md
  • Perform parameter estimation → references/parameter-estimation.md
  • Data reconciliation → references/parameter-estimation.md

Diagnostics and Scaling:

  • Diagnose model issues → references/diagnostics.md
  • Apply scaling → references/scaling.md
  • Identify structural problems → references/diagnostics.md
  • Fix convergence issues → references/solving.md

Analysis:

  • Calculate process economics → references/costing.md
  • Perform sensitivity analysis → references/optimization.md
  • Analyze results → examples/analysis.py
  • Generate reports → examples/reporting.py

2. Core IDAES Workflow

Basic pattern:

python
# 1. Import IDAES modules
from pyomo.environ import ConcreteModel
from idaes.core import FlowsheetBlock
from idaes.models.properties import iapws95
from idaes.models.unit_models import Heater

# 2. Create model and flowsheet
m = ConcreteModel()
m.fs = FlowsheetBlock(dynamic=False)

# 3. Add property package
m.fs.properties = iapws95.Iapws95ParameterBlock()

# 4. Add unit models
m.fs.heater = Heater(property_package=m.fs.properties)

# 5. Set inputs
m.fs.heater.inlet.flow_mol.fix(100)  # mol/s
m.fs.heater.inlet.pressure.fix(101325)  # Pa
m.fs.heater.inlet.enth_mol.fix(5000)  # J/mol
m.fs.heater.heat_duty.fix(10000)  # W

# 6. Initialize
m.fs.heater.initialize()

# 7. Solve
from idaes.core.solvers import get_solver
solver = get_solver()
results = solver.solve(m)

# 8. Display results
m.fs.heater.outlet.display()

Quick Reference - Common Tasks

Create flowsheet: FlowsheetBlock(dynamic=False) - Main container for process model Add unit model: m.fs.unit = UnitModel(property_package=m.fs.props) Fix variables: m.fs.unit.inlet.flow_mol.fix(100) - Specify known values Initialize model: m.fs.unit.initialize() - Set up for solving Solve flowsheet: solver.solve(m) - Get solution Run diagnostics: DiagnosticsToolbox(m).report_structural_issues() Apply scaling: iscale.calculate_scaling_factors(m) Optimize: Set up objective and use solver or optimization tools

Detailed examples for all tasks in reference files.

Task Routing

Core Concepts and Architecture

Route to: references/core-concepts.md

When:

  • Understanding IDAES architecture
  • Learning about flowsheet structure
  • Understanding control volumes
  • Working with state blocks
  • Understanding the modeling framework

Key concepts:

  • FlowsheetBlock
  • Property packages and state blocks
  • Unit models and control volumes
  • Ports and Arcs for connectivity
  • Time domains for dynamic models

Flowsheet Construction

Route to: references/flowsheets.md

When:

  • Building process flowsheets
  • Connecting unit operations
  • Setting up material/energy streams
  • Creating process flow diagrams
  • Organizing hierarchical flowsheets

Key components:

  • FlowsheetBlock creation
  • Arc connections between units
  • Port specification
  • Degrees of freedom analysis
  • Flowsheet visualization

Property Packages

Route to: references/property-packages.md

When:

  • Selecting thermodynamic methods
  • Configuring component properties
  • Setting up phase equilibrium
  • Defining mixture properties
  • Working with specialized systems (water/steam, combustion gases, etc.)

Available packages:

  • IAPWS95 (water/steam)
  • Ideal gas mixtures
  • Modular property framework
  • Cubic equations of state
  • Electrolyte solutions (eNRTL)

Unit Models

Route to: references/unit-models.md

When:

  • Adding equipment to flowsheet
  • Configuring unit operations
  • Setting operating specifications
  • Understanding model equations
  • Customizing unit behavior

Categories:

  • Generic models (heater, pump, compressor, etc.)
  • Separations (flash, distillation, membranes)
  • Reactors (stoichiometric, equilibrium, kinetic)
  • Heat transfer (heat exchangers)
  • Power generation specific equipment

Generic Model Library

Route to: references/generic-models.md

When:

  • Using standard unit operations
  • Building general chemical processes
  • Need mixers, splitters, heat exchangers
  • Setting up separation equipment
  • Working with reactors and pumps

Common models:

  • Mixer, Splitter, Separator
  • Heater, HeatExchanger
  • Pump, Compressor, Turbine
  • Flash, Distillation
  • CSTR, PFR, Equilibrium Reactor

Power Generation Models

Route to: references/power-generation.md

When:

  • Modeling power plants
  • Simulating combustion systems
  • Working with steam cycles
  • Analyzing turbine performance
  • Boiler and heat recovery steam generator (HRSG) modeling

Key models:

  • Boiler/Fireside models
  • Steam turbines
  • Heat recovery steam generators
  • Feed water heaters
  • Power plant flowsheets

Gas-Solid Contactors

Route to: references/gas-solid-models.md

When:

  • Modeling fluidized beds
  • Simulating moving beds
  • Working with solid particle flows
  • Gas-solid reactions
  • Adsorption processes

Applications:

  • Chemical looping combustion
  • Fixed bed reactors
  • Fluidized bed reactors
  • Moving bed systems

Initialization

Route to: references/initialization.md

When:

  • Preparing models for solving
  • Dealing with initialization failures
  • Setting up sequential initialization
  • Using initialization strategies
  • Troubleshooting convergence

Strategies:

  • BlockTriangularizationInitializer
  • Sequential initialization
  • Custom initialization routines
  • Using previous solutions
  • Hierarchical initialization

Solving and Convergence

Route to: references/solving.md

When:

  • Solving flowsheet models
  • Dealing with solver failures
  • Improving convergence
  • Understanding solver options
  • Troubleshooting numerical issues

Tools:

  • IPOPT solver configuration
  • Solver selection
  • Convergence diagnostics
  • Solver output interpretation
  • Handling solver failures

Scaling

Route to: references/scaling.md

When:

  • Improving numerical conditioning
  • Addressing scaling issues
  • Applying variable scaling
  • Equation scaling
  • Diagnosing ill-conditioned problems

Key tools:

  • iscale module
  • Automatic scaling factor calculation
  • Manual scaling specification
  • Scaling diagnostics
  • Best practices for scaling

Model Diagnostics

Route to: references/diagnostics.md

When:

  • Debugging model issues
  • Identifying structural problems
  • Finding numerical issues
  • Analyzing degrees of freedom
  • Detecting equation singularities

Diagnostic tools:

  • DiagnosticsToolbox
  • Structural singularity detection
  • Numerical singularity detection
  • Degrees of freedom analysis
  • SVD analysis for rank deficiency

Optimization

Route to: references/optimization.md

When:

  • Optimizing process design
  • Minimizing operating costs
  • Maximizing efficiency or production
  • Multi-objective optimization
  • Parameter studies and sensitivity analysis

Capabilities:

  • Objective function definition
  • Constraint specification
  • Optimization solver configuration
  • Parametric studies
  • Design optimization

Parameter Estimation and Data Reconciliation

Route to: references/parameter-estimation.md

When:

  • Fitting model parameters to data
  • Calibrating models
  • Reconciling measured data
  • Estimating kinetic parameters
  • Model validation

Tools:

  • parmest module
  • Data reconciliation workflows
  • Parameter estimation strategies
  • Uncertainty quantification
  • Model-data comparison

Process Costing

Route to: references/costing.md

When:

  • Calculating capital costs
  • Estimating operating costs
  • Economic analysis
  • Optimization with cost objectives
  • Techno-economic assessment

Features:

  • Capital cost correlations
  • Operating cost calculations
  • Costing libraries for power generation
  • Custom costing models

Dynamic Modeling

Route to: references/dynamic-modeling.md

When:

  • Time-dependent simulations
  • Startup/shutdown analysis
  • Control system design
  • Dynamic optimization
  • Process dynamics analysis

Capabilities:

  • Dynamic flowsheets
  • DAE systems
  • Time discretization
  • Dynamic solvers
  • Control implementation

Custom Model Development

Route to: references/custom-models.md

When:

  • Creating new unit models
  • Developing custom property packages
  • Implementing specialized equations
  • Extending existing models
  • Research and development

Topics:

  • Unit model templates
  • Property package framework
  • Custom constraints and expressions
  • Model documentation
  • Testing custom models

Common Patterns

Pattern 1: Simple Steady-State Flowsheet

  • Create flowsheet → Add property package → Add units → Connect with Arcs → Fix inputs → Initialize → Solve
  • See examples/simple_flowsheet.py for complete workflow

Pattern 2: Optimization Study

  • Build flowsheet → Initialize → Define objective → Set bounds → Optimize → Analyze results
  • See examples/optimization_example.py

Pattern 3: Parameter Estimation

  • Build model → Load experimental data → Define parameters → Run parmest → Analyze fit
  • See examples/parameter_estimation.py

Pattern 4: Sequential Modular Approach

  • Initialize units sequentially → Propagate information → Solve individual units → Solve full flowsheet
  • See examples/sequential_initialization.py

All patterns detailed in examples/ directory with complete code.

Installation and Setup

Install IDAES

bash
# Create conda environment (recommended)
conda create -n idaes python=3.11
conda activate idaes

# Install IDAES
pip install idaes-pse

# Get solver binaries (IPOPT, etc.)
idaes get-extensions

# Verify installation
idaes --version

Optional Components

bash
# Install optional UI components
pip install idaes-pse[ui]

# Install OMLT for machine learning surrogates
pip install idaes-pse[omlt]

# Install for advanced grid optimization
pip install idaes-pse[grid]

# Install CoolProp for additional properties
pip install idaes-pse[coolprop]

Testing Installation

python
# Test IDAES import
import idaes
print(idaes.__version__)

# Test solver availability
from idaes.core.solvers import get_solver
solver = get_solver()
print(f"Solver: {solver}")

Common Issues and Solutions

Issue: Solver not found

Problem: ApplicationError: No executable found for solver 'ipopt'

Solution:

bash
idaes get-extensions
# Or install solvers manually
conda install -c conda-forge ipopt

Issue: Initialization fails

Problem: Unit model initialization does not converge

Solution:

  1. Check degrees of freedom: m.fs.unit.report_degrees_of_freedom()
  2. Use diagnostics: DiagnosticsToolbox(m).report_structural_issues()
  3. Check input specifications are reasonable
  4. Try sequential initialization
  5. Review scaling factors

Issue: Model doesn't solve

Problem: Solver returns non-optimal status

Solution:

python
# Run diagnostics first
from idaes.core.util.model_diagnostics import DiagnosticsToolbox
dt = DiagnosticsToolbox(m)
dt.report_structural_issues()
dt.report_numerical_issues()

# Check and apply scaling
from idaes.core.util import scaling as iscale
iscale.calculate_scaling_factors(m)

# Try different solver options
solver = get_solver('ipopt', options={'tol': 1e-6, 'max_iter': 500})

Issue: Poor numerical conditioning

Problem: Solver reports numerical difficulties or Jacobian issues

Solution:

  1. Apply proper scaling using iscale
  2. Check variable bounds are reasonable
  3. Review units of measurement consistency
  4. Use diagnostics to identify badly scaled variables
  5. Consider variable transformations (e.g., log scaling for large range variables)

Issue: Property package errors

Problem: Property calculations fail or return invalid values

Solution:

python
# Check state variable specifications
m.fs.state.display()

# Ensure values are within valid ranges
# For IAPWS: T > 273.15 K, P > 611 Pa

# Check phase equilibrium assumptions are valid
# Use appropriate property package for your system

Best Practices

Model Development

  • Start simple: build and test units individually before connecting
  • Use degrees of freedom analysis regularly
  • Always check model structure before solving
  • Implement scaling from the start
  • Document assumptions and specifications

Initialization Strategy

  • Initialize units in logical process order (upstream to downstream)
  • Use results from simpler models to initialize complex ones
  • Leverage IDAES initialization tools (BlockTriangularizationInitializer)
  • Save successful initializations for reuse
  • Consider hierarchical initialization for large flowsheets

Numerical Robustness

  • Apply consistent scaling across all variables
  • Use appropriate property packages for your conditions
  • Set reasonable variable bounds
  • Monitor solver output and diagnostics
  • Test with different initial guesses if convergence fails

Performance Optimization

  • Use appropriate solver tolerances (don't over-solve)
  • Consider model simplifications where justified
  • Use warm starts from previous solutions
  • Profile code to identify bottlenecks
  • Consider surrogate models for expensive property calculations

Code Organization

  • Use clear naming conventions for units and streams
  • Organize complex flowsheets hierarchically
  • Document specifications and assumptions
  • Create reusable functions for common operations
  • Use version control for model development

Debugging Workflow

Step 1: Check Model Structure

python
# Degrees of freedom
m.fs.report_degrees_of_freedom()

# Structural diagnostics
from idaes.core.util.model_diagnostics import DiagnosticsToolbox
dt = DiagnosticsToolbox(m)
dt.report_structural_issues()

Step 2: Verify Specifications

python
# Display fixed variables
for v in m.component_data_objects(ctype=pyo.Var, descend_into=True):
    if v.fixed:
        print(f"{v}: {v.value}")

# Check for over/under specification
assert degrees_of_freedom(m) == 0

Step 3: Check Scaling

python
# Check scaling factors
from idaes.core.util import scaling as iscale
badly_scaled = iscale.badly_scaled_var_generator(m)
for var, scale in badly_scaled:
    print(f"{var}: scaling factor = {scale}")

Step 4: Initialize Carefully

python
# Try sequential initialization
try:
    m.fs.unit.initialize()
except:
    # If fails, check inputs and try with relaxed tolerances
    m.fs.unit.initialize(optarg={'tol': 1e-3})

Step 5: Solve with Diagnostics

python
solver = get_solver()
results = solver.solve(m, tee=True)  # tee=True shows solver output

# Check results
from pyomo.opt import TerminationCondition
if results.solver.termination_condition != TerminationCondition.optimal:
    print("Solve failed!")
    dt.report_numerical_issues()

Examples Directory

See examples/ for complete workflows:

  • simple_flowsheet.py - Basic steady-state flowsheet
  • heater_example.py - Simple heater with steam properties
  • flash_separation.py - Flash separator example
  • heat_exchanger_network.py - Multiple heat exchangers
  • distillation_column.py - Separation process
  • power_plant_cycle.py - Steam power cycle
  • optimization_example.py - Process optimization
  • parameter_estimation.py - Fitting parameters to data
  • dynamic_simulation.py - Time-dependent model
  • custom_unit_model.py - Creating custom models

Reference Documentation

  • references/core-concepts.md - Architecture and fundamental concepts
  • references/flowsheets.md - Flowsheet construction and connectivity
  • references/property-packages.md - Thermodynamic property modeling
  • references/unit-models.md - Unit operation models overview
  • references/generic-models.md - Generic model library details
  • references/power-generation.md - Power generation specific models
  • references/gas-solid-models.md - Gas-solid contactor models
  • references/initialization.md - Initialization strategies and tools
  • references/solving.md - Solving flowsheets and troubleshooting
  • references/scaling.md - Scaling theory and application
  • references/diagnostics.md - Model diagnostics and debugging
  • references/optimization.md - Optimization workflows
  • references/parameter-estimation.md - Parameter estimation and data reconciliation
  • references/costing.md - Process economics and costing
  • references/dynamic-modeling.md - Dynamic simulation
  • references/custom-models.md - Developing custom models

External Resources

Key Differences from Other Process Simulators

vs. Aspen Plus/HYSYS:

  • Open source and Python-based
  • Full access to equations and customization
  • Integration with optimization and machine learning
  • Programmatic workflow automation

vs. DWSIM:

  • More advanced optimization capabilities
  • Better scaling and numerical tools
  • Specialized for energy systems research
  • Extensive diagnostics framework

Strengths:

  • Equation-oriented solving
  • Advanced optimization integration
  • Custom model development
  • Integration with Python ecosystem
  • Diagnostic and scaling tools

Considerations:

  • Requires Python programming knowledge
  • Smaller library of pre-built unit models than commercial tools
  • Less GUI support (primarily code-based)
  • Learning curve for Pyomo framework

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Idaes?

Comprehensive guidance for using IDAES (Institute for the Design of Advanced Energy Systems) for process systems engineering. Covers flowsheet modeling, property packages, unit models, optimization, scaling, initialization, and diagnostics. Use when working with chemical process simulations, energy systems modeling, power plant design, material and energy balances, or process optimization. Triggers include 'IDAES', 'flowsheet', 'process model', 'unit operation', 'process optimization', 'property package', 'energy systems', or process engineering tasks.

Зачем использовать Idaes в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Idaes — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Idaes в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/jkitchin/knowhow/tree/main/skills/programming/idaes. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Idaes?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Idaes?

С любым количеством. В TypingMind вы можете использовать Idaes с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Idaes?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — jkitchin. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇