Upload
brian-rice
View
212
Download
0
Embed Size (px)
Citation preview
Interface Specifications www.colan.org Software Download
Thermodynamic and Physical Properties interface specification 1.1
Thermodynamic and Physical Properties interface specification 1.1
Michel PONSMichel PONS(TOTAL)(TOTAL)
Richard SZCZEPANSKIRichard SZCZEPANSKI(Infochem Computer Services Ltd)(Infochem Computer Services Ltd)
Chouaib BENQLILOUChouaib BENQLILOU(UPC)(UPC)
For Thermo SIGFor Thermo SIG
Interface Specifications www.colan.org Software Download
Outline
Why revising the Thermo specification?Why revising the Thermo specification?
Experience of implementing the new standard in the Experience of implementing the new standard in the Thermo 1.1 prototypesThermo 1.1 prototypes
Changes to the 1.1 specChanges to the 1.1 spec
SummarySummary
Interface Specifications www.colan.org Software Download
Thermo specification status
Version 0.9.3Version 0.9.3 Has been implemented commercially in Aspen Plus, Has been implemented commercially in Aspen Plus,
HYSYS.Process, gPROMS,….HYSYS.Process, gPROMS,…. Version 1.0Version 1.0
Does not involve any design changesDoes not involve any design changes Some clarifications brought up in documentationSome clarifications brought up in documentation Implemented in Aspen Plus, HYSYS.Process, Implemented in Aspen Plus, HYSYS.Process,
gPROMS, Multiflash, …gPROMS, Multiflash, …
Interface Specifications www.colan.org Software Download
Thermo 1.1 objectives
Enhance functionalityEnhance functionality PhasesPhases
• Any number of phasesAny number of phases• Any types of phases (previously liquid-vapour mostly)Any types of phases (previously liquid-vapour mostly)
PropertiesProperties• Constants (pure compounds)Constants (pure compounds)• T/P-dependent properties (pure compounds)T/P-dependent properties (pure compounds)• Single-phase mixture propertiesSingle-phase mixture properties• 2-phase mixture properties2-phase mixture properties
Generalise flash specificationsGeneralise flash specifications Enable/support efficient implementationsEnable/support efficient implementations
Interface Specifications www.colan.org Software Download
Thermo 1.1 objectives
Enhance design logicEnhance design logic Enquiry methods (eg. GetSinglePhasePropList)Enquiry methods (eg. GetSinglePhasePropList) Check methods (eg. Check methods (eg.
CheckSinglePhasePropSpec)CheckSinglePhasePropSpec) Calculate methods (eg. CalcSinglePhaseProp)Calculate methods (eg. CalcSinglePhaseProp)
Interface Specifications www.colan.org Software Download
Objectives of Thermo 1.1 prototyping
Check the overall design for deficienciesCheck the overall design for deficiencies Make the specification a useful working document Make the specification a useful working document
for developersfor developers ClarityClarity Explain the purpose of each methodExplain the purpose of each method Indicate how it is supposed to workIndicate how it is supposed to work Detailed description of argumentsDetailed description of arguments List of exceptionsList of exceptions
Interface Specifications www.colan.org Software Download
Implementing the 1.1 Standard Prototype componentsPrototype components
CO Tester (UPC)CO Tester (UPC) Property Package (Infochem)Property Package (Infochem) Property Calculator (Infochem)Property Calculator (Infochem)
StrategyStrategy VB code to implement the interfaces/methodsVB code to implement the interfaces/methods Calculation engine implemented as separate dllCalculation engine implemented as separate dll PP and PC do not contain any compound, phase or PP and PC do not contain any compound, phase or
model-specific codemodel-specific code Models in prototypesModels in prototypes
RKS eos, viscosity from mixing ruleRKS eos, viscosity from mixing rule Vapour, Liquid and AqueousLiquid phasesVapour, Liquid and AqueousLiquid phases 11 compounds11 compounds PT and PH flashesPT and PH flashes
Interface Specifications www.colan.org Software Download
Implementing the 1.1 Standard The good…The good…
Started with the Multiflash 1.0 CO Property Started with the Multiflash 1.0 CO Property PackagePackage
Relatively straightforward to adapt and extend Relatively straightforward to adapt and extend an existing 1.0 PP for 1.1an existing 1.0 PP for 1.1
Existing code for many methods, eg. CalcProp, Existing code for many methods, eg. CalcProp, can be reused and greatly simplifiedcan be reused and greatly simplified
The difficultiesThe difficulties Understanding how to create and use a COM Understanding how to create and use a COM
component with lots of interfacescomponent with lots of interfaces Implementing the CO Error interfacesImplementing the CO Error interfaces
• The CO Error document is largely a list of interfaces and The CO Error document is largely a list of interfaces and methods and does not help with how to implement themmethods and does not help with how to implement them
Obscure VB errors when type libraries changedObscure VB errors when type libraries changed
Interface Specifications www.colan.org Software Download
Implementing the 1.1 Standard
Issues raised by CO Tester development Issues raised by CO Tester development What are the mandatory interfaces for each What are the mandatory interfaces for each
component?component?• Property PackageProperty Package
– ICapeThermoContextICapeThermoContext
– ICapeThermoCompoundsICapeThermoCompounds
– ICapeThermoPhasesICapeThermoPhases
– ICapeThermoPropertyRoutineICapeThermoPropertyRoutine
– ICapeThermoEquilibriumRoutine ?ICapeThermoEquilibriumRoutine ?
– ICapeThermoUniversalConstant ?ICapeThermoUniversalConstant ?
– ECape … ?ECape … ?
This is now clarified in the textual specification.This is now clarified in the textual specification.
Interface Specifications www.colan.org Software Download
Issues raised by CO Tester development
Interpretation of argument typesInterpretation of argument types UNDEFINED: is an empty Variant (was initially treated as UNDEFINED: is an empty Variant (was initially treated as
a character string)a character string) CapeArrayCapeArrayTypeType
This is a Variant containing an array of variables of the specified This is a Variant containing an array of variables of the specified type type notnot an array of Variants containing variables of the type an array of Variants containing variables of the typeEg. CapeArrayString is a Variant containing an array of stringsEg. CapeArrayString is a Variant containing an array of strings
All identifiers are must be treated as case-insensitiveAll identifiers are must be treated as case-insensitive When is a phase ‘present’ ?When is a phase ‘present’ ?
How are the GetPresentPhases and SetPresentPhases How are the GetPresentPhases and SetPresentPhases methods used?methods used?
CATIDs (in Windows registry) for version 1.1 Thermo componentsCATIDs (in Windows registry) for version 1.1 Thermo components Do we need new CATIDs? No is the answer.Do we need new CATIDs? No is the answer.
Interface Specifications www.colan.org Software Download
Issues raised by CO Tester development
SetMaterial method (ICapeThermoContext)SetMaterial method (ICapeThermoContext) How is it intended to be used?How is it intended to be used? The effects of calling this method are persistentThe effects of calling this method are persistent Do we need a way to remove a material (interface) Do we need a way to remove a material (interface)
once it has been set? once it has been set? Which interfaces/methods need to have a valid MO Which interfaces/methods need to have a valid MO
defined before they can be used?defined before they can be used? ICapeThermoCompounds – does ICapeThermoCompounds – does notnot need MO need MO ICapeThermoPropertyRoutine/EquilibriumRoutine ICapeThermoPropertyRoutine/EquilibriumRoutine
do need a MOdo need a MO
Interface Specifications www.colan.org Software Download
Changes to the 1.1 Spec
Added to and clarified conditions for raising exceptionsAdded to and clarified conditions for raising exceptions Mainly to do with whether a MO has been defined Mainly to do with whether a MO has been defined
and is validand is valid Changed descriptions of ICapeThermoCompounds Changed descriptions of ICapeThermoCompounds
methods to remove references to MOmethods to remove references to MO GetCompoundConstant, GetPDependentProperty, GetCompoundConstant, GetPDependentProperty,
GetTDependentPropertyGetTDependentProperty New propertiesNew properties
diffusionCoefficient (mixture)diffusionCoefficient (mixture) idealGasEntropy (T-dependent part)idealGasEntropy (T-dependent part)
Interface Specifications www.colan.org Software Download
Changes to the 1.1 Spec
ClarificationsClarifications CalcEquilibriumCalcEquilibrium SetMaterialSetMaterial UNDEFINEDUNDEFINED CapeArrayCapeArray Set/GetPresentPhasesSet/GetPresentPhases Phase order for 2-phase propertiesPhase order for 2-phase properties Note on properties of non-existent phasesNote on properties of non-existent phases ……
Interface Specifications www.colan.org Software Download
Summary
No fundamental problems implementing Thermo 1.1 No fundamental problems implementing Thermo 1.1 prototypes.prototypes.
Relatively simple to implement.Relatively simple to implement.
Offers scope for efficient implementations.Offers scope for efficient implementations.
Clarifications of specification document done.Clarifications of specification document done.
Pending a small installation problem for prototypes, Pending a small installation problem for prototypes, will be made available on the web site (v2.4.6)will be made available on the web site (v2.4.6)