Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples,...

24
June 25 th 2007 Paolo Greppi – UNIGE 1 of 24 Object-oriented modelling applied to hybrid unit operations Paolo Greppi, Barbara Bosio, Elisabetta Arato Department of Civil Environmental Architectural Engineering Università degli Studi di Genova ICheaP-8 - The eight International Conference on Chemical & Process Engineering ISCHIA Island Gulf of Naples, Italy - June 24-27 th 2007

Transcript of Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples,...

Page 1: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 1 of 24

Object-oriented modelling applied to hybrid unit

operationsPaolo Greppi, Barbara Bosio, Elisabetta Arato

Department of Civil Environmental Architectural EngineeringUniversità degli Studi di Genova

ICheaP-8 - The eight International Conference on Chemical & Process Engineering

ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007

Page 2: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 2 of 24

Contents

� Introduction

� Streams, flashes, connectivity, multistage

arrangements

� Applications

� Conclusions

Page 3: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 3 of 24

Introduction: model workflow

LIBPF model

LIBRARY executable

library developer

model developer

model user

Page 4: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 4 of 24

mod

el

deve

lope

rlib

rary

de

velo

per

Model development

� pick up concrete classes from LIBPF� write a C++ program representing the

system model� compile it to a standalone executable

� map process simulation entities to � abstract C++ class types� mixins: reusable partial classes� concrete classes

LIBrary for Process Flowsheeting

Page 5: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 5 of 24

Model deploymentm

odel

us

er� receives system model as an executable� access via user interface� can change inputs or switch configuration� each model configuration has a fixed

structure

Page 6: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 6 of 24

Contents

��� IntroductionIntroductionIntroduction

� Streams, flashes, connectivity, multistage

arrangements

� Applications

� Conclusions

Page 7: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 7 of 24

The simplest object: stream

� abstract stream type

� specialized mixin classes are derived from abstract stream type

Page 8: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 8 of 24

Concrete stream types

� every concrete stream type contains at least one total phase

� multi-phase streams can have explicit representations of the phases

�stream_VLe...

�stream_VLLSSSe...

Page 9: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 9 of 24

Enter reactions

� Take a generic flash (genflash) mixin class

instance

� add reactions ...

� ... get reactive flashes

Page 10: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 10 of 24

Enter connectivitySpecial mixin types represent the capability of units to connect to streams

Page 11: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 11 of 24

Compose mixins ...connectivity

mixinprocess

mixin

Page 12: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 12 of 24

.. get a concrete class

Page 13: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 13 of 24

Variations of genflash with connectivity

Page 14: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 14 of 24

Combinations of generic flashes

� flexible mulstream concentrated parameters model: multihx

� N reactive streams exchanging heat or mass:� (reactive) multi-stream heat

exchanger

� (reactive) membrane unit

� fuel cell

Page 15: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 15 of 24

Multistage arrangements

� Concentrated parameter objects are combined to yield distributed parameter models:

� 1-D arrangements: �� columns columns

�� pipespipes

� 2-D arrangements:�� fuel cellsfuel cells

�� reactive heat exchangersreactive heat exchangers

Page 16: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 16 of 24

Contents

��� IntroductionIntroductionIntroduction

��� Streams, flashes, connectivity, multistage Streams, flashes, connectivity, multistage Streams, flashes, connectivity, multistage

arrangementsarrangementsarrangements

� Applications

� Conclusions

Page 17: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 17 of 24

Application 1: Simple distillation column

The column was broken down into 8 subunits:

2 multistage1D<genflashNX<stream_VL>>

3 genflashNX<stream_VL>

2 mixer

1 splitter

Page 18: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 18 of 24

Application 2: Distributed parameter planar Fuel Cell

� 5 x 10 multihx objects

� flowsheet for cross-flow arrangement

Page 19: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 19 of 24

Application 2: Distributed parameter planar Fuel Cell

� Results match proven tools

� Example: solid temperature plot for MCFC (Molten Carbonate Fuel Cell)

Page 20: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 20 of 24

Applications: simulation run duration

LIBPF slower than special-purpose tools

Benchmark LIBPFTiming, s Timing, s

Simple distillation column

Commercial process simulator X

1 10

Planar Fuel Cell

Special purpose 2-D finite differences code

2 60

Test caseReference tool (benchmark)

Page 21: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 21 of 24

Applications: modelling project durationmodelling of hybrid / complex unit operations

� conventional approach:

3 man-months

� new approach with model reuse:

1 man-month

(estimates)

Page 22: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 22 of 24

Contents

��� IntroductionIntroductionIntroduction

��� Streams, flashes, connectivity, multistage Streams, flashes, connectivity, multistage Streams, flashes, connectivity, multistage

arrangementsarrangementsarrangements

��� ApplicationsApplicationsApplications

� Conclusions

Page 23: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 23 of 24

Conclusions

� C++ can be used for process simulation using LIBPF library

� Run-time is slower than with conventional approaches ...

� ... but project duration is shorter for hybrid unit operations modelling

Page 24: Object-oriented modelling applied to hybrid unit operations€¦ · ISCHIA Island Gulf of Naples, Italy - June 24-27th 2007. June 25 th 2007 Paolo Greppi – UNIGE 2 of 24 Contents

June 25th 2007 Paolo Greppi – UNIGE 24 of 24

Visit libpf.com

� Get C++ header files with the classes hierarchy

� Get and run demos

� Request the LIBPF library by mail