Page 1 of 1

Automated way to add compounds to a TEA property package?

PostPosted: 13 January 2015, 10:16
by Mergenthal
I'm using Matlab Thermo Import for my property calculations. Therefore I created some special oils in TEA with the PCD-Manager. Now we want to "automate" the creation of new components in TEA with Informations we've got in XML-Files with the help of Matlab.. Unfortunately, I can't see a way how to organize that. Is it possible to create new TEA-Components with Matlab and Cape-Open?

Exactly what kind of data we would like to supply to TEA?
All kind of data which are necessary to setup a new component. Such as number of species and structure of molecules, groupdata etc.. As I understood, the PCD-Manager estimates other necessary properties by Joback etc. itself. The estimated IdealGasHeatCapacityCp(T) - parameters would be supplied from us.
I also saw, that there is an option to import new components into the pcd-manager via xml-files.. so we could write all information we know into an xml-file and import that one. But then still we need to click by hand in the pcd-manager with which method we want to estimate missing properties.

Re: Automated way to add compounds to a TEA property package

PostPosted: 13 January 2015, 10:55
by jasper
Indeed, you would still have to run it through the PCD file, if only because TEA does not read xml files (only PCD files). And then still you would need to configure a new TEA package that uses that data.

I suppose I could provide TEA with an automation interface that allows for
- creation of a new package
- importing compounds from PCD files
- setting compound constants
- setting correlation data
- selecting compound specific models
- selecting phases
- selecting mixture models
- entering binary interaction parameters

but this does not readily translate to being accessible from Matlab; Matlab just creates any CAPE-OPEN thermodynamic package and is not aware it is talking to TEA specifically.

So you would have to either use COM directly from Matlab, or call another scripted (e.g. VB script) component to do the job of creation of the package, and then reload the package.

Is this along the lines of what you have in mind?

Re: Automated way to add compounds to a TEA property package

PostPosted: 13 January 2015, 15:29
by Mergenthal
Dear Jasper,

first of all I'd like to thank you for your quick answer.

What I was initially looking for is a fast way to create new compounds in a PCD-File without clicking through the PCD-Manager. But your suggestion sounds good as well.

Via COM directly from Matlab would be manageable if an example how to call or creat the COM-Server is provided. I guess I'll still be able to use that individually changed data via capeOpenGetPackage('TEA (CAPE-OPEN 1.1)','...') in Matlab and the same data in COFE, right? The only negative effect would be, that the information changed in TEA cannot be saved into the PCD-File and thus could not be seen in the PCD-Manager..

Re: Automated way to add compounds to a TEA property package

PostPosted: 13 January 2015, 16:05
by jasper
Of course the conversion from xml to PCD is much less programming effort. But this requires a small change in the PCD manager, if not already there. Which is part of ChemSep, so the ChemSep authors may comment on this.

Would that suffice your needs? What will you do with the PCD? You would still need to click to get that into a property package I reckon? Or is the end target the PCD file?