Search found 15 matches

by seb007
07 May 2016, 16:33
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Tea: different behavior when computing properties together
Replies: 10
Views: 46871

Re: Tea: different behavior when computing properties togeth

Thanks for you fast feedback and fix!

I tested, and it works with the updated version.
by seb007
04 May 2016, 15:20
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Tea: different behavior when computing properties together
Replies: 10
Views: 46871

Re: Tea: different behavior when computing properties togeth

From the following example, it seems that we have a difference when derivative regards to p is computed: HRESULT hr = CoInitialize(NULL); if (FAILED(hr)) messages::get().error("Cannot initialize COM: Error %i", hr); hr = ::CoCreateInstance(__uuidof(fpCapeOpenCOM), NULL, CLSCTX_INPROC_SERVE...
by seb007
04 May 2016, 15:04
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Tea: different behavior when computing properties together
Replies: 10
Views: 46871

Re: Tea: different behavior when computing properties togeth

In my case, the internal energy is clearly affected by this parameter, and only IF derivatives are computed (compare with the values in my first post). Here is what I obtain when I keep the default newton tolerance but change the rel. perturbation of t and p to 0.1: XXXXXXXXXXXXXXXXXXXXXXXX - test1 ...
by seb007
04 May 2016, 09:16
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Tea: different behavior when computing properties together
Replies: 10
Views: 46871

Re: Tea: different behavior when computing properties togeth

It looks like the error on TEST3 has been fixed after I made the changes you proposed. I played with TEA properties: it is not the Newton tolerance, but the value of the temperature and pressure perturbation, used to compute derivatives I suppose. The strange thing is that I can set them to 1e-14 an...
by seb007
04 May 2016, 07:42
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Tea: different behavior when computing properties together
Replies: 10
Views: 46871

Re: Tea: different behavior when computing properties togeth

Thanks for these very useful comments. I fixed the BSTR issues (by always using CComBSTR), and called Initialize and Terminate functions. I do not use smart pointers for COM objects, but normal pointers initialized to NULL in the class constructor and released in the destructor, because they are cla...
by seb007
03 May 2016, 13:37
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Tea: different behavior when computing properties together
Replies: 10
Views: 46871

Tea: different behavior when computing properties together

Hi, I encountered a strange behavior when calling Tea: It provides dirrerent values if I compute one or several properties simultaneously. Here is a "minimal" example (interesting part is the end after #ifdef): HRESULT hr = CoInitialize(NULL); if (FAILED(hr)) messages::get().error("Ca...
by seb007
25 April 2016, 09:27
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Using COCO Tea in a C++ code
Replies: 18
Views: 72576

Re: Using COCO Tea in a C++ code

OK. Iterating with TEA through COM calls is quite slow (compared to my own PR implementation), so I will use pre-computed tables and interpolate, which will be valid if the composition does not change.

Thanks a lot for your help in setting up the COM interaction with CAPE-OPEN components!
by seb007
21 April 2016, 13:11
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Using COCO Tea in a C++ code
Replies: 18
Views: 72576

Re: Using COCO Tea in a C++ code

Thanks! By implementing ICapeThermoCompounds (just calling the Property Packages's methods), I can now do property calculations and even call calcEquilibrium. I still cannot create a material object other than through the COCreateInstance, but I will let that for later... My idea for using a propert...
by seb007
20 April 2016, 10:11
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Using COCO Tea in a C++ code
Replies: 18
Views: 72576

Re: Using COCO Tea in a C++ code

Hi, I am progressing, but I still have an issue. I try to access directly to the material object, using DECLARE_NO_REGISTRY() in the ATL/COM class; then calling MyCapeOpenCOM::CreateObject() from the dll. However, MyCapeOpenCOM type has an incomplete type in may main C++ code. - Do I have to remove ...
by seb007
18 April 2016, 16:12
Forum: TEA Thermodynamic server (AmsterCHEM)
Topic: Using COCO Tea in a C++ code
Replies: 18
Views: 72576

Re: Using COCO Tea in a C++ code

You are right, that was the issue. I use now CComVariant and CComVarianArray which is simpler. I finally got something that works.The code is below, I think that it can be useful for someone who, as me, does not know COM. Immediately calling CoCreateInstance also works. GUID teaId; HRESULT hr = CLSI...

Go to advanced search