[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
CAPE-OPEN • View topic - Can't use "GetProp" to get the "totalFlow" based on "mass"

Can't use "GetProp" to get the "totalFlow" based on "mass"

Can't use "GetProp" to get the "totalFlow" based on "mass"

Postby bcbooo » 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.
Attachments
CPP Mixer Splitter example.zip
(78.95 KiB) Downloaded 1196 times
bcbooo
 
Posts: 66
Joined: 22 November 2012, 06:41
Location: China

Re: Can't use "GetProp" to get the "totalFlow" based on "mas

Postby jasper » 03 December 2012, 10:14

This appears to be a problem with AspenPlus. I would stick to mole based properties, and do the mass/mole conversion yourself. You can obtain the compound molecular weights by using GetComponentConstant, and passing MolecularWeight as compound identifier. Calculate the mixture molar weight and apply the conversion (note the 1e-3 kg/g to go from g/mol to kg/mol).
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Can't use "GetProp" to get the "totalFlow" based on "mas

Postby bcbooo » 04 December 2012, 01:14

bcbooo
 
Posts: 66
Joined: 22 November 2012, 06:41
Location: China

Re: Can't use "GetProp" to get the "totalFlow" based on "mas

Postby jasper » 04 December 2012, 07:39

Good to hear that it has been fixed.
User avatar
jasper
 
Posts: 1128
Joined: 24 October 2012, 15:33
Location: Spain

Re: Can't use "GetProp" to get the "totalFlow" based on "mas

Postby colancto » 04 December 2012, 13:02

As with most pieces of software I recommend using the latest version available after checking that no regression has taken place. This is true for the CAPE-OPEN interfaces as well with all other pieces making up a code.
User avatar
colancto
Administrateur
 
Posts: 92
Joined: 23 October 2012, 11:46


Return to Thermodynamic components

Who is online

Users browsing this forum: No registered users and 1 guest

cron