I have a question regarding the correct implementation of the CopyFromMaterial function. In order to get the Dymola Simulator working with CAPE-OPEN fluid property models, we are implementing our own Material object. As per the CO Thermo 1.1 specification, our own Material class inherits from the ICapeThermoMaterial interface (among others) and we are implementing the functions for that interface. As a template for all the functions, we have used the output of the Visual Studio CO class wizard. For the
CopyFromMaterial function, we have the following declaration
Code: Select all
void CopyFromMaterial(/*in*/ CAPEOPEN_1_2::CapeThermoMaterial source);
If we use this input type, and pass our own Material object to this function, I understand that within the function, we only have available the functions of ICapeThermoMaterial to retrieve and copy the properties of the source object - i.e. in this case
GetOverallProp,
GetSinglePhaseProp and
GetTwoPhaseProp.
If the above assumption is correct - which I am not sure of - then how can the CopyFromMaterial function know for example what the basis of the properties stored in the source object are, since these are inputs to the getter functions?
Should the CopyFromMaterial function parameter type be changed to our own Material class in our implementation? Then we would be able to access all the data we need.