Generic communication standards for CCS modelling Jozsef Gaspar, Kaj Thomsen, Philip Fosbøl 29 th May, 2013 Belgium, Antwerp 1
Generic communication standards for CCS modelling
Jozsef Gaspar, Kaj Thomsen, Philip Fosbøl
29th May, 2013 Belgium, Antwerp
1
Why standardize? • Plant wide optimization
– Difficult when running several/different software suppliers
• Securing results of simulation can be widely distributed and optimised – Decreasing manual transfer of results – Preventing iterative optimization – Maintaining accuracy
• The process simulation is out of focus
– The technology is in focus
2
DTU MODEL MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
Outline CAPE-OPEN background
Simulator architecture
Recipe of interoperability: • DTU CAPCO2 capture model • CAPE-OPEN interfaces
Simulation with Aspen Plus
Conclusions
3
MOTIVATION CAPE OPEN CO INTERFACE SIMULATION DTU MODEL
CAPE-OPEN background • Cape Open Standards formulated during 1997-1999
• Official partners involved:
₋ BASF, Bayer, BP, DuPont, Elf, ICI ₋ Aspen Tech, Hyprotech, SIMSCI ₋ Imp. College, RWTH-Aachen, INP-Toulouse, DTU etc.
• Technology
₋ Object oriented ₋ COM/COBRA ₋ .NET
4
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
Simulator architecture Process modeling
Environmnet
Process Modeling Component
Middleware
Physical Properties
Unit Operations
Numerical Solvers
Analyses Tools
Aspen Plus, Hysys, COFE, Matlab, gPROMS
Handle communication between objects Layer of software above OS
Output Material Object
CAPE OPENUnit Operation
Private Variables
Energy/Information Ports
Input Material Object
Public Variables
Global VariablesProcess Modeling Environment
5
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
Process modeling Environmnet
Process Modeling Component
Middleware
Physical Properties
Unit Operations
Numerical Solvers
Analyses Tools
Output Material Object
CAPE OPENUnit Operation
Private Variables
Energy/Information Ports
Input Material Object
Public Variables
Global VariablesProcess Modeling Environment
Simulator architecture - unit operation
6
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
Recipe of interoperability
1. Model description and validation 2. CAPE-OPEN interface implementation 3. Registration for COM interoperability 4. Simulation with the CAPE-OPEN module
7
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
DTU Model description
Qcondense
Qreboil
Vout
GAS LIQUID
z=h
z+∆z
z
z=0
G|z+∆z
G|z L|z
L|z+∆z
q
Ni
Rich/lean liquid
Lean/rich liquid
CO2 rich/lean gas
Lout
Gout Lin
Gin Flue gas
8
W: H2O C: CO2 G: Gas L: Liquid z: Distance N: Mass Flux q: Heat flux
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
Total ( )C w
dG N N aSdz
= − +
CO2 CC C
dy dGG y N aSdz dz
= − −
H2O ww w
dy dGG y N aSdz dz
= − −
Energy ( ) ( )( ), , , ,( ) ( )L L L LLp tot p tot L p W G vap W L W p C G diss L C
dT dLLC C T aS C T H T N C T H T N qaSdz dz
= − + ∆ + + ∆ −
Total wdL N aSdz
= −
CO2 CC C
dx dLL x N aSdz dz
= − −
H2O ww w
dx dLL x N aSdz dz
= − −
Energy ( ), ,G G G GGp tot p tot pW W pC C G
dT dGGC C aS C N C N T qaSdz dz
= − + + −
Model validation
1E 3A 3C 1A
L/G ratio
1A 1E 3C 3A
Reboiler temperature
1E 3A 3C 1A
L/G ratio
Absorber Temperature Desorber Temperature Absorber CO2 fraction
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
Reboiler heat duty
CAPE-OPEN interface
CUnitBase
Load() Save() Initialize() Validate() Calculate() Terminate()
10
public override void Initialize(){ // Define input ports
this.Ports.Add(new CapeOpen.CUnitPort("pGasIn", "Gas In",CapeOpen.CapePortDirection.CAPE_INLET, CapeOpen.CapePortType.CAPE_MATERIAL));
this.Ports.Add(new CapeOpen.CUnitPort("pLiquidIn", "Liquid In", CapeOpen.CapePortDirection.CAPE_INLET, CapeOpen.CapePortType.CAPE_MATERIAL));
this.Ports.Add(new CapeOpen.CUnitPort("pGasOut", "Outlet Stream", CapeOpen.CapePortDirection.CAPE_OUTLET, CapeOpen.CapePortType.CAPE_MATERIAL));
this.Ports.Add(new CapeOpen.CUnitPort("pLiquidOut", "Liquid Out", CapeOpen.CapePortDirection.CAPE_OUTLET, CapeOpen.CapePortType.CAPE_MATERIAL));
// Define double precision valued parameter this.Parameters.Add(new CapeOpen.CRealParameter("Column height", "Column height", 17.0, 17.0, 0.0,
100.0, CapeOpen.CapeParamMode.CAPE_INPUT, "m"));
// Define option type – string valued parameter this.Parameters.Add(new CapeOpen.COptionParameter("Packing type", "Define the packing type",
"Rocha,Bravo&Fair", PackingType, false, CapeOpen.CapeParamMode.CAPE_INPUT));
// Define boolean valued parameter this.Parameters.Add(new CapeOpen.CBoolParameter("Inlcude Condenser",true
CapeOpen.CapeParamMode.CAPE_OUTPUT));}
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
public override void Calculate(){// Get the material Object from an Input Port CapeOpen.ICapeThermoMaterialObject pLiquidIn = null;try { pLiquidIn = this.Ports[PortIndexArray].connectedObject as CapeOpen.ICapeThermoMaterialObject; }catch (System.Exception p_Ex) { ... }
// Get Component IDs and properties (temperature, flow rate)try { pLiquidInComps = pLiquidIn.ComponentIds as string[]; pLiquidInFlow = pLiquidIn.GetProp("flow", "Overall", pLiquidInComps, null, "mole") as double[]; pLiquidInT = pLiquidIn.GetProp("Temperature", "Overall", null, "Mixture", null) as double[] }catch (System.Exception p_Ex) { ... }
CAPE-OPEN interface CUnitBase
Load() Save() Initialize() Validate() Calculate() Terminate()
11
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
public override void Calculate(){...Continuation ...
WRAPPING FORTRAN CAPCO2 MODEL INTO VISUAL C#
// wrap a MO and set the stream propertiesCapeOpen.MaterialObjectWrapper pLiquidOut = new CapeOpen.MaterialObjectWrapper(this.Ports[PortIndexArray].connectedObject);try { pLiquidOut.SetProp("Pressure", "Overall", null, null, null, Pressure); pLiquidOut.SetProp("Temperature", "Overall", null, null, null, LiquidPhaseTemp); pLiquidOut.SetProp("flow", "Overall", pLiquidInComps, null, "mole", LiquidPhaseComp); ... }catch (System.Exception p_Ex) { … }
// Release the material object if it is a COM object. if (pLiquidIn.GetType().IsCOMObject) System.Runtime.InteropServices.Marshal.ReleaseComObject(pLiquidIn); }
Microsoft Visual C#
FORTRAN DLL
CAPE-OPEN interface
DTU CAPCO2 CORE
CUnitBase
Load() Save() Initialize() Validate() Calculate() Terminate()
12
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
Register for COM interoperability
13
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
regasm.exe
Aspen Plus, Hysys, COFE, Excel, Matlab, gPROMS
Simulation with Aspen Plus
14
MOTIVATION CAPE-OPEN CO INTERFACE SIMULATION DTU MODEL
Stream input specifications CAPE-OPEN Module menu
Conclusions
16
• Robust model for rate based calculations
• The DTU CapCO2 compared to experimental data. • Generalized and combined absorption and desorption unit
• CAPE-OPEN interface standards for a unit operation
• CAPE-OPEN module demonstrated in Aspen Plus
• Focus is key equipment's calculations, NOT simple modelling principles
Was it too complicated?
17
Jozsef Gaspar: [email protected] Kaj Thomsen: [email protected] Philip Fosbøl: [email protected]
For more information contact: