E-Code

Two-phase flow pressure drop — a TI-84 Plus CE program

By E-Code · updated

TWOPHASE is a TI-BASIC program for the TI-84 Plus CE. Frictional pressure gradient of a gas-liquid flow in a pipe by the homogeneous model and by Lockhart-Martinelli with Chisholm's C (chosen from the phases' laminar/turbulent regimes), plus the homogeneous void fraction.

What it asks for and what it shows

It asks for 7 values at its prompts. In the example below it shows RHO H, DP HOM, VOID, X LM, C, PHI L², DP LM.

Example run

One of its oracle test cases: “steam-water 7 MPa, x .2, both turbulent”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 11000
Input 20.2
Input 30.02
Input 4740
Input 536.5
Input 60.092
Input 70.019
The screen shows
RHO H=152.4266366
DP HOM=2081.417796
VOID=0.835214447
X LM=0.909834379
C=20
PHI L²=24.19004604
DP LM=8093.362664

How it's checked

4 test cases, each checked against the textbook formula it uses. Replayed key by key on a virtual TI-84 Plus CE, they make 30 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE engineering programs · All TI-84 Plus CE programs