CalcFlashTPFlow

 

See also: CalcFlashTP

Top  Previous  Next

Function that perform a multiphase flash at fixed temperature and pressure and has the added feature compared to CalcFlashTP that is will reuse the last flash result in order to make the flash faster.

 

This function is provided to user that has a need to perform a large number of flash's where the step between each flash is small, either in temperature, pressure or feed.

A example can be a flow simulator or other kind of simulators.

 

In order to use the function simply call it. The function will then check if a result is available.

If a result is present it will skip the stability analysis and converge the given system.

If it fail's to converge or no result is present it will perform a full flash.

 

Since no extrapolation is currently used it is important that step size is small.

The users will have to try them self in order to find the optimal step size.

 

This function is defined in C++ as:

extern "C" __declspec(dllexport) int __stdcall CalcFlashTPFlow(double Temperature, double Pressure, int PhaseCount)        

 

Return

The function return -1 if no problem was found. If a different number is returned use the function ErrorGetMessage for more information.

 

Input

Argument

Type

Units

Description

Temperature

double

User defined

Default: [Kelvin]

Temperature to use in calculation

Pressure

double

User defined

Default: [Bar]

Pressure to use in the calculation

 

PhaseCount

 

int

 

[-]

Number of phases the flash will look for. Valid input are:

2: The flash will maximum look for 2 phases

3: The flash will maximum look for 3 phases

0: No limit on the number of phases to look for

 

Code examples

Example