Question on GetPhaseCompounds of ICapeReactionChemistry

Questions related to the Thermodynamic and Physical Properties interface specification for version 1.0
Post Reply
bcbooo
Posts: 66
Joined: 22 November 2012, 06:41
Location: China

Question on GetPhaseCompounds of ICapeReactionChemistry

Post by bcbooo »

I am trying to develop a simple reaction module, but when do it I encountered a little question. CAPE-OPEN manual defines a method of ICapeReactionChemistry as the following:

***************************************
Interface Name: ICapeReactionChemistry
Method Name: GetPhaseCompounds
Returns: CapeString

Arguments
Name Type Description
[in] phase CapeString Label of the required phase
[out] compNo CapeLong
[out] compIds CapeArrayString The ids of the compounds present in the specified phase
***************************

But when I import the interfaces from CAPE-OPENv1-1-0.tlb, the interface method looks like the following:

STDMETHOD(GetPhaseCompounds)(BSTR reacID, long * compNo, VARIANT * compIds);

The first argument is paradox.

And even though the first arguments are same, it's not rational by my opinion. Is the right method should looks like as the following:

STDMETHOD(GetPhaseCompounds)(BSTR reacID,BSTR phase, long * compNo, VARIANT * compIds);

Any response will be appreciated.
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: Question on GetPhaseCompounds of ICapeReactionChemistry

Post by jasper »

There are only very few implementations of this standard (COCO implements it - of the top of my head I cannot think of other implementations). There are other items about this standard that are not convenient, such as the units of measure (COCO ignores the specification on this and uses SI units) and the double specification of ICapeThermoMaterialContext.

While implementing this interface I could also not make sense of the signature of the GetPhaseCompounds routine - I left it unimplemented; it returns an error if called.

Please note that a much improved and much more elaborate standard for chemical reactions is in the making - unfortunately the document is not published, nor finished at this point. But the thermo SIG is working hard on its completion.

If you would like to preview this new interface specification, which works in conjunction with thermo 1.1, please contact the thermo SIG leader (Sergej Blagov).
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: Question on GetPhaseCompounds of ICapeReactionChemistry

Post by jasper »

Re units of measure: see the warning in the CORN help here: http://cocosimulator.org/index_help.php ... ctions.htm
bcbooo
Posts: 66
Joined: 22 November 2012, 06:41
Location: China

Re: Question on GetPhaseCompounds of ICapeReactionChemistry

Post by bcbooo »

OK, Thank you Jasper for your response.

Could you send me the email address of Sergej Blagov? Thank you.
User avatar
jasper
Posts: 1129
Joined: 24 October 2012, 15:33
Location: Spain
Contact:

Re: Question on GetPhaseCompounds of ICapeReactionChemistry

Post by jasper »

Yes - please send me a mail and I will reply.
bcbooo
Posts: 66
Joined: 22 November 2012, 06:41
Location: China

Re: Question on GetPhaseCompounds of ICapeReactionChemistry

Post by bcbooo »

Have sent.
Post Reply

Return to “Thermodynamic v1.0”