Jump to content

Calculating Boiling/Distillation Percentage of a Stream for a given Temperature based on Lab Samples using the Splice Operator


Patrick

Recommended Posts

  • Seeq Team
Posted (edited)

In some processes our users want to calculate how much of a product stream will boil based on a stream temperature and laboratory distillation tests, such as ASTM D86, which quantify at what temperature a certain percentage of a fluid will boil.

This can be achieved in Seeq using the splice operator.  We will calculate the percentage of range between the lab samples for any given stream temperature, and splice in that value based on where the stream temperature falls in the respective range. 

Following is a simplified example for 5 lab signals at 0%, 25%, 50%, 75%, and 100% boiling points – it can be expanded for more percentages by adjusting the range offsets.  

In the below formula, we take the five lab signals and calculate where the stream temperature falls within each range, expressed as a percentage:

image.png

Formula text for copy/pasting:

//Splice in the value for each range
//Adjust the range offsets (0, .25, .50, etc) to reflect the number of lab signals
0.splice(0+($temp-$_0p)/($_25p-$_0p)*.25,$temp>$_0p)
.splice(.25+($temp-$_25p)/($_50p-$_25p)*.25,$temp>$_25p)
.splice(.50+($temp-$_50p)/($_75p-$_50p)*.25,$temp>$_50p)
.splice(.75+($temp-$_75p)/($_100p-$_75p)*.25,$temp>$_75p)
.splice(1,$temp>$_100p)
 
//Optionally show as integer %
.convertUnits('%')

The resulting signal will be a representation of the boil % of the stream for a given stream temperature:

image.png

Edited by Patrick
Link to comment
Share on other sites

  • Patrick changed the title to Calculating Boiling/Distillation Percentage of a Stream for a given Temperature based on Lab Samples using the Splice Operator

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...