Page 1 of 1

Migration from Thermo 1.0 to 1.1

PostPosted: 12 May 2022, 09:31
by JulieCouturier
Hello,

I have some problems for the migration from the usage of Thermo 1.0 to Thermo 1.1.

In our software , the architecture with Thermo 1.0 created some years ago, the Material Object has been developed in .NET C# 2.0. The Material Object is the link between our software and the Cape-Open Property Package/Thermo Systems. The MaterialObject developed by Belsim implements the interface “ICapeThermoMaterialObject”. All methods defined in this interface had been implemented.

With a small tool based on COM technology, the user can see which Thermo Systems and Property Packages are available on a given computer:
Screenshot 2022-05-11 115151.png
Screenshot 2022-05-11 115151.png (40.03 KiB) Viewed 2970 times



Currently, I am trying to modify this tool to use Thermo 1.1.

The part to see what is available on a given computer is working:
Screenshot 2022-05-11 120129.png
Screenshot 2022-05-11 120129.png (38.88 KiB) Viewed 2970 times


Through this tool, I am trying to test the other things I need to integrate Thermo 1.1 in our software. So I would like to do a test (compute the enthalpy in vapor phase, with fixed temperature, pressure and flow properties).

In the implementation with Thermo 1.0, we have a Material Object class that has a property PropertyPackage PP of type ICapeThermoPropertyPackage.
So, with thermo 1.0, the calculation is done through the instruction:
PP.CalcProp(materialObject, props, phases, calcType)

If I try to do similar thing with Thermo 1.1, I use a property PP of type ICapeThermoPropertyRoutine and use the instruction:
PP.CalcSinglePhaseProp(((string[]) props), phaseLabel.ToLower())
But I get an exception:
Screenshot 2022-05-12 100836.png
Screenshot 2022-05-12 100836.png (47.88 KiB) Viewed 2970 times



What could be wrong or missing?

Thanks in advance,

Julie Couturier

Re: Migration from Thermo 1.0 to 1.1

PostPosted: 13 May 2022, 09:01
by jasper
It is hard to tell without too much context - perhaps the context material was not set, perhaps the properties on the context material could not be obtained.

Exception 0x80040501 is ECapeUnknownHR, which implies that you can obtain the interface ECapeUnknown from the object that raised the error, in this case the object PP. This interface will provide an error description. What does it say?

Re: Migration from Thermo 1.0 to 1.1

PostPosted: 24 May 2022, 13:44
by JulieCouturier
Sorry I haven't see your answer before now.
I will check and I will inform you.
Thanks!