200 likes | 286 Views
C. A. P. E. C. Computer Aided Modeling Tool - ModDev. Rafiqul Gani CAPEC Department of Chemical Engineering, Technical University of Denmark, DK-2800 Lyngby, Denmark. Purpose of ModDev. Derive the model equations Analyze model equations
E N D
C A P E C Computer Aided Modeling Tool - ModDev Rafiqul Gani CAPEC Department of Chemical Engineering, Technical University of Denmark, DK-2800 Lyngby, Denmark.
Purpose of ModDev • Derive the model equations • Analyze model equations • Implement the model equations and integrate them to an existing simulator A computer aided system assists the user in performing the above tasks EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Modelling Steps * Balance Equations *Constraint Equations *Constitutive Equations Decomposition, creation, aggregation EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Process-Model Relation Each process building block is represented by a set of control shells (with defined boundaries) and connections Control Shell Stream In Accumulation Out EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Model Generation Each control shell & connection is associated to a set of model (fundamental) building blocks Each model building block is either represented by a Reference Model or a generic (Created Model) building block Model equations available in the knowledge base Model equations not available in the knowledge base EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Control shells To model the various type of processes, the control shell must be defined such that the partial gradients (with respect to T, P and fI ) within the boundaries are either: • Negligible • Incorporated in an interface or overall flux model • Dependent on some product specification (design) EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Integrated Computer Aided System - ICAS • ICAS is a collection of tools which have been integrated to solve various CAPE problems in an integrated manner • ModDev is a toolbox within ICAS EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
TOOL BOXES ICAS PROBLEM DEFINITION Flowsheet Components / Reactions Units of Measure Constitutive Models What to Solve Method of Solution Set/Initialize Variables Output (Detail/Form) Design / Synthesis Analysis ADD TO THE SYSTEM Solvent/Fluid Energy New Components (Property Prediction) Equipment Environmental Flowsheet Control New Reactions Control Thermodynamic New Models (Model Generation) Property Parameter Estimation Thermo-model Phase Diagrams INFORMATION STORAGE DATABANKS Kinetic Model Expert System SIMULATOR MANAGER Analysis Model Equations Adaptation Solvers Balance Equations Linearization Degrees of Freedom AE / ODE / DAE Constraint Equations Reduction Index / Sparse Pattern PDE Constitutive relations Identification Partitioning / Ordering LP / NLP MILP / MINLP EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999 RHS RHS for the units that are solved together X
Model Generation with ModDev • Draw Objects • Describe Objects • Screen equations • Analyze/Modify model equations • Translate model equations into a language that is integrated to the numerical routines EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Tools & options in ModDev (ModGen) EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Tools & options in ModDev (ModGen) EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Example - Steady state flash - I STREAM CONNECTION OBJECT Name: 3 Models for quantities: Energy (enthalpy): H3=@FUNC_E(2,f3[],T3,P3) Models for the “from”-connection: (equilibrium) Energy connection: T3=Tflash Momentum connection: P3=Pflash SHELL OBJECT Name: flash Assumed phase condition: Calculate (VL) Equilibrium model: 0= f2i/ ft2- Kflash * f3i/ft3i, @KEQ(Tflash, Pflash, f2[], f3[], #Kflash) SHELL CONNECTION OBJECT Name: heater Connection models: Energy connection: Qheater=Qflash
Example - Steady state flash - II EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Example - Steady state flash - III EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999
Tutorial Exercises • Part-I: Model generation (steady state tank mixer, dynamic tank mixer, CSTR with different kinetics) • Part-II: Model analysis & translation (for each generated model check degrees of freedom, incidence matrix, generate code, …..) EURECHA Workshop on Computer Aided Modeling, Vezsprem, Hungary, June 3-4, 1999