Can't use "GetProp" to get the "totalFlow" based on "mass"
Posted: 03 December 2012, 02:00
There is a "CAPEOPENMixerSplitterExamples.1.0.1" writed by AmsterCHEM, included "VB6 Source", "CPP Source", "CPP Source Documentation", "VB Binaries" and "CPP Binaries". You could get the "CPP Source" from CO-LAN or from the attachments below.
Recently I'm researching on the "CPP Source" example, but I encounter some questions. My simulation environment is Aspen Plus 2006.5, and I'm succeed to add the "CPP Mixer Splitter Example" into Aspen Plus User Interface, I used water as the component, and it runs very good. Then I edited it and changed the source code "material.GetOverallProperty(L"totalFlow",L"mole",value,error)" into "material.GetOverallProperty(L"totalFlow",L"mass",value,error)", the result of totalFlow was 0! I found that Aspen Plus 2006.5 support "Thermodynamics and Physical Properties Interface Specification 1.0", so I tried changed "mat->GetProp(CBSTR(L"totalFlow"),CBSTR(L"overall"),compIds,NULL,CBSTR(L"mole"),&v)" into ""mat->GetProp(CBSTR(L"totalFlow"),CBSTR(L"overall"),compIds,NULL,CBSTR(L"mass"),&v)"" in the file "MaterialObject10Wrapper.h",but the totalFlow based on mass is zero too, I don't know why.
Recently I'm researching on the "CPP Source" example, but I encounter some questions. My simulation environment is Aspen Plus 2006.5, and I'm succeed to add the "CPP Mixer Splitter Example" into Aspen Plus User Interface, I used water as the component, and it runs very good. Then I edited it and changed the source code "material.GetOverallProperty(L"totalFlow",L"mole",value,error)" into "material.GetOverallProperty(L"totalFlow",L"mass",value,error)", the result of totalFlow was 0! I found that Aspen Plus 2006.5 support "Thermodynamics and Physical Properties Interface Specification 1.0", so I tried changed "mat->GetProp(CBSTR(L"totalFlow"),CBSTR(L"overall"),compIds,NULL,CBSTR(L"mole"),&v)" into ""mat->GetProp(CBSTR(L"totalFlow"),CBSTR(L"overall"),compIds,NULL,CBSTR(L"mass"),&v)"" in the file "MaterialObject10Wrapper.h",but the totalFlow based on mass is zero too, I don't know why.