Calsep SDKs

Software Development Kits for C# and Python.
Calsep has developed Software Development Kits (SDKs) for the Cloud Flash API for both Python and C#. The SDK contains everything you need to call the Flash API in a Public or a Private Cloud.

Software Development Kits

Calsep has developed Software Development Kits (SDKs) for the Cloud Flash API for both Python and C#. The SDK contains everything you need to call the Flash API in a Public or a Private Cloud. The SDK uses a characterized fluid, exported from PVTsim Nova, to perform flash calculations in the cloud and comes with sample programs and a written documentation.

The main sample program coming with the SDK illustrates the simplest way of calling the Cloud Flash API (synchronous call). This sample program can be customized through modification of the following optional settings:

Calsep Flash SDK Options

  • Flash Specification (mode)
    • Pressure-Temperature (PT)
    • Pressure-Enthalpy (PH)
    • Pressure-Entropy (PS)
  • Viscosity Model
    • Corresponding States (CSP)
    • Lohrenz-Bray-Clark (LBC)
  • Water Properties Model
    • Equation of State
    • Water Package 
  • Flash Output Modes
    • Standard (Full Flash Result as in PVTsim Nova)
    • Standard and Derivatives
    • Standard without phase compositions and derivatives
    • Reduced 1 & 2  
  • Extraction of results and output customization.

The SDKs contain a sample program that shows how to call the flash and extract results from the answer of the Flash API. In addition, the documentation gives examples on how to make changes in e.g. viscosity model, fluid composition, and water properties model.

Calsep Flash SDK Performance Options

Calsep’s Cloud Flash API has an advanced (asynchronous) calling mode available for high performance applications, requiring many flash calculations performed in short time. The main difference between the simple synchronous and the advanced asynchronous modes is that the synchronous mode treats results, one by one, when they come back from the Cloud API. The asynchronous mode runs a batch of calculations and treats the results, once all results have come back from the Cloud API.

The SDK contains an additional sample illustrating the use of the asynchronous mode. The performance of this mode is compared to the simpler, synchronous mode. This sample performs more than 300 flash calculations using different Flash API calling modes:

  1. 1. Synchronous calls with full EoS model sent to cloud API with each calculation request.
  2. 2. Asynchronous calls with full EoS model sent to cloud API with each calculation request.
  3. 3. Asynchronous calls with EoS model stored in the cloud and only ID number sent to cloud API.

The asynchronous mode (2) gives a significantly faster performance compared to the synchronous mode (1) when numerous flash calculations are performed. Both the synchronous and the asynchronous calling modes can be further speed optimized in cases where the same EoS model is used in all calculations. This is done by saving the EoS model in Calsep’s Cloud Flash API, and then only sending ID number, composition and flash specification (e.g. pressure and temperature) with each calculation request (3). The EoS model can easily be deleted from Calsep’s Cloud Flash API once all calculations are completed. The relative performances of the three examples, illustrated by the calculation request rate vs. time seen from the Cloud Flash API, can be seen from the figure below.  

Fluid Properties and Property Derivatives

A full list of properties and property derivatives are available in the answer from the Cloud Flash API, both for the input mixture composition and the calculated equilibrium phases. Available properties and derivatives are listed below.

Mixture and Phase PropertiesProperty Derivatives
Cp, Heat CapacitydDensity/dEnthalpy
Cv, Heat CapacitydDensity/dEntropy
Molar EnthalpydDensity/dTemperature
Molar EntropydEnthalpy/dEnthalpy
Joule Thomson CoefficientdEnthalpy/dEntropy
Cp/Cv KappadEnthalpy/dPressure
Molar VolumedEnthalpy/dTemperature
Mole PercentdEntropy/dEnthalpy
Molecular WeightdEntropy/dEntrophy
Volume PercentdEntropy/dPressure
Weight PercentdEntropy/dTemperature
Phase TypedMolarvolume/dEnthalpy
Thermal ConductivitydMolarvolume/dTemperature
Velocity of SounddMolarFraction/dEnthalpy
Z factordMolarFraction/dPressure

PVTsim Open Structure Users

Calsep’s Cloud Flash API and Python/C# SDKs are designed in a way similar to Calsep’s PVTsim Open Structure Flash solution. PVTsim Open Structure users will therefore find it easy to copy existing applications from PVTsim Open Structure programs and use the new Calsep Cloud Flash API as calculation engine.

For more information about Calsep’s Flash SDKs please contact Calsep.


Need a Flash Engine?

Calsep’s Flash API is designed to be the engine of software applications that require multiple flash calculations every second. This could be in connection with dynamic flow simulations, monitoring of process equipment or allocation of streams from multiple sources.