Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

download Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

of 12

Transcript of Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    1/12

     Hide Contents

    Lingua italiana

    HOME

    Products & services

    Process design tools

    Prode Properties

    Prode OPC interface

    Applications

    Fluid properties

    Multiphase flash

    PHASE ENVELOPE

    Dew, Bubble point

    Distillation

    Hydrate formation

    Prode HEDProde Valves

    Consulting

    Documents

    Downloads

    Contact Prode

    Prode PropertiesProperties of pure fluids and mixtures, multi phase equilibria,process simulation, software

    Title : phase envelope, diagram, curve, curves, natural gas dew point, hydrateformation, Excel Matlab Mathcad software

    Download the free student edition, includes both 32 and 64 bitversions for Microsoft Windows

    Documentation, includes software installation and detaileddescription with application examples

    Do you need assistance or wish to discuss applications ?Contact Prode

    Application example : vapor-liquid-liquid phase envelope

    Prode Properties can calculate different types of phase diagrams

    vapor-liquid phase envelope / phase diagram.

    vapor-liquid-liquid phase envelope / phase diagram.

    vapor-liquid-solid phase envelope / phase diagram.

    http://www.prode.com/en/contact.htmhttp://www.prode.com/en/contact.htmhttp://www.prode.com/en/contact.htmhttp://www.prode.com/en/contact.htmhttp://www.prode.com/docs/pppman.pdfhttp://www.prode.com/docs/pppman.pdfhttp://www.prode.com/en/download.htmhttp://www.prode.com/en/download.htmhttp://www.prode.com/en/download.htmhttp://www.prode.com/en/download.htmhttp://www.prode.com/en/download.htmhttp://www.prode.com/en/contact.htmhttp://www.prode.com/en/download.htmhttp://www.prode.com/en/hed.htmhttp://www.prode.com/en/hydrate.htmhttp://www.prode.com/en/dewpointnaturalgashydrocarbons.htmhttp://www.prode.com/en/ppp.htmhttp://www.prode.com/en/contact.htmhttp://www.prode.com/en/contact.htmhttp://www.prode.com/docs/pppman.pdfhttp://www.prode.com/en/download.htmhttp://www.prode.com/en/contact.htmhttp://www.prode.com/en/download.htmhttp://www.prode.com/en/valves.htmhttp://www.prode.com/en/hed.htmhttp://www.prode.com/en/hydrate.htmhttp://www.prode.com/en/distillationcolumn.htmhttp://www.prode.com/en/dewpointnaturalgashydrocarbons.htmhttp://www.prode.com/en/phaseenvelope.htmhttp://www.prode.com/en/multiphase.htmhttp://www.prode.com/en/properties.htmhttp://www.prode.com/en/opcgashydrocarbon.htmhttp://www.prode.com/en/ppp.htmhttp://www.prode.com/http://www.prode.com/it/default.htm

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    2/12

    Prode Properties allows to create the diagrams directly in Excel, Matlab, Mathcad, Prime

    or any compatible application including custom software.

    Definitions

    Dew Point, given a equilibrium pressure the Dew Point Temperature is the

    maximum temperature in VLE area

    Bubble Point, given a equilibrium pressure the Bubble Point Temperature is the

    minimum temperature in VLE areaCrcondenBar, CricondenBar Pressure is the maximum pressure in VLE area

    Crcondentherm, Cricondentherm temperature is the maximum temperature in

    VLE area

    Step by Step instruction to create a phase diagram with Excel /Matlab / Mathcad

    First step: define the stream (components, compositions etc.)

    Properties includes a Stream editor which permits to access all informations (as

    compositions, operating conditions, models, options) for all streams which you need todefine, to access the Stream editor from Excel Properties menu select Edit Properties

    The Stream editor includes several pages, from the first page you can select a stream

    (Properties can store all the streams required to define a medium size plant) solve aseries of flash operations and see the resulting compositions in the different phases, in

    this page select the stream you wish to define, for example the first.

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    3/12

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    4/12

    Finally we must save the new data, in the first page click on "Save" button, note that

    you can redefine the name of the stream as you wish (editing the cell near the button

    "Save"), you can define / modify many streams following the procedure described.Once defined the stream you may wish to define the units which we wish to utilize in our

    problem, in stream editor go then to the "Units" dialog

    here you can select the units which you need for a specific problem, in this example forthe pressure (first row) select Bar.a , notice that unit for temperature is K (but you can

    set the units which you prefer) then click on Ok button to accept new values and leave

    the Properties editor.

    Now you are ready to use Properties for calculating all the properties which you need,however there is still a last thing to do if you do not wish to lose all data when leaving a

    Excel page, precisely to save data to a file, to save data to a file from Excel Properties

    menu select "Save a Archive"

    then select the file "def.ppp" if you wish that Properties utilizes this data as default (thisis the normal , recommended option), differently set a different name (you can for

    example define different names for different projects) but you will need to load that

    specific Archive before to make calc's for that project and since Excel reloads Properties

    with any new page this may result tedious...

    Properties saves on the file also the units of measurement so you can define different

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    5/12

    streams and different units in different projects.

    Now you can calculate all the properties which you need with the units which you preferfor all the streams defined in that project.

    Second step: generate a vapor-liquid-liquid phase envelope inExcel.

    For generating the phase envelope we?ll use a predefined Excel page distributed with

    Prode Properties, from Excel menu File->open , in Excel folder (Prode Properties

    installation) select the file phasenv.xls

    This page contains a little VBA code to tranfer the calculated equilibrium values (for the

    different vapor-liquid, liquid-liquid-vapor, vapor-liquid-liquid lines) from Prode Properties

    to Excel, if required you can easily modify the code for printing a series of lines withspecified liquid or vapor fraction. To print a phase envelope you must define the stream

    (we select the first stream, which we defined with composition C1 0.7 CO2 0.15 H2S

    0.15 , SRK as model and multiphase vapor+liquid option, the multiphase option instructs

    the procedure to generate a vapor-liquid-liquid phase envelope) we specify 0.3 value forliquid fraction, finally click on the button "calculate phase diagram".

    Properties does all the work and the calculated equilibrium points including critical

    points, cricondentherm and cricondenbar are printed in Excel page for your analysis.

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    6/12

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    7/12

    The Vapor-Liquid-Liquid phase envelope constitutes the ideal tool to investigate thephase equilibria for mixtures of hydrocarbons + water

    The example shows the phase envelope for a 12 components (hydrocarbons + water)

    mixture, notice the large three phase area where liquid water is present.

    Note that even simple compositions can show a complex behaviour, herebelow is the

    example of the mixture with composition Methane 0.9 H2S 0.1 model API Soave Redlick

    Kwong.The bubble line is a three phase (liquid-liquid-vapor) line, a vapor-liquid line connects

    the end of the liquid-liquid-vapor line with critical point, the dew line doesn't stop at

    critical point but continues, the blue line shows a liquid fraction of 0.05

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    8/12

     

    Note that Prode Properties includes methods for calculating critical points, CricondenBarand CricondenTherm in Excel cells, see the paragraph "Methods for thermodynamic calc?

    s" in operating manual for the details.

    methods StrPc() and StrTc() returns the critical pressure (or temperature) of the

    nth (from 1 to 5) critical point found.methods StrCBp() and StrCBt() returns the pressure (or temperature) of the

    CricondenBar (the equilibrium point with maximum pressure).

    methods StrCTp() and StrCTt() returns the pressure (or temperature) of the

    CricondenTherm (the equilibrium point with maximum temperature).

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    9/12

    To get the value of critical pressure enter the macro =StrPc(1,1) where (1,1) refers tothe stream 1 and first critical point detected, we enter this macro in B1, in B2 we enter

    the macro =StrTc(1,1) to calculate the critical temperature in the same way, in cells B3

    and B4 we enter the macros = StrCBp(1) for CricodenBar pressure and = StrCTt(1) for

    CricodenTherm temperature.

    The phase envelope for this mixture (Methane 0.999 n-Butane 0.001) shows up to foursaturation point pressures at the same temperature

    Observe the dew line, the red line below the critical point, there are up to three different

    equilibrium points at the same temperature (the area around 190 K), if you add the

    saturation point on the bubble line (black line) we have a total of four saturation point

    pressures at a given temperature, to calculate the points on the dew line we use the

    method:

    double p = PfTF(integer stream, double t, double pf, int state, int n)

    In cell B1 we define a value for the equilibrium temperature (190.208 K) , then in cells

    B2, B3, B4 we enter the macros

    =PfTF(2,B1,0,1,1)

    =PfTF(2,B1,0,1,2)

    =PfTF(2,B1,0,1,3)

    where the first value (2) is the stream which we defined, the second (cell B1) represents

    the temperature, the third (0) is the phase fraction (with 0 we specify 0% liquid or a

    point on dew line, the same would be by setting the state as gas and phase fraction as

    1.0) the fourth (1) is the state (in Properties 0 = gas, 1 = liquid, 2 = solid) and the lastis the required position (we require the points 1-3 along the dew line)

    For additional infrmation about how to calculate equilibrium points go to the page Dew

    Points Natural Gas Hydrocarbons

    Print a phase envelope in Matlab.

    http://www.prode.com/en/dewpointnaturalgashydrocarbons.htm

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    10/12

    For calculating and printing the phase envelope we?ll use a predefined script distributed

    with Prode Properties, in Matlab command line type>>phaseenvelope(1)

    where (1) is the number of stream.

    Prode Properties will calculate the phase envelope and print the result on Matlab, if youwish to obtain additional properties as cricondentherm, cricondenbar or critical points

     just enter the name of Properties method in Matlab, for example

    >>StrPc(1)

    will return the true critical pressure of stream 1.

    Prode Properties, technical features overview (Windowsversion)

    Entirely written in C++ (since first edition, 1993)Up to 100 different streams with up to 50 components per stream (user can

    redefine)

    Several compilations of chemical data and BIPs are available, the user can add

    new components and BIPsProprietary compilation with data for more than 1600 chemicals and

    30000 BIPs

    flexible database format (support for up to 30 different correlations)

    works with all majour standards including DIPPR.

    Comprehensive set of thermodynamic models, base version includesRegular

    Wilson

    NRTL

    UNIQUAC

    UNIFACSoave-Redlich-Kwong (standard and extended version with parameters

    calculated for best fitting of vapor pressure, density and enthalpy)

    Peng-Robinson (standard and extended version with parameters

    calculated for best fitting of vapor pressure, density and enthalpy)Benedict Webb Rubin (Starling) BWRS

    Steam Tables IAPWS 95

    ISO 18453 (GERG 2004)

    ISO 20765 (AGA 8 model)

    Lee-Kesler (Plocker) LKPCPA Cubic Plus Association (SRK and PR variants)

    Hydrates (Cubic Plus Association, Van Der Waals-Platteeuw)

    additional models as Pitzer, NRTL for electrolyte solutions, PC SAFT (with

    association), GERG (2008) etc.

    van der Waals and complex mixing rules to combine equations of state withactivity models

    Huron Vidal

    Wong Sandler ( WS )

    Michelsen ( MHV2 )

    Tassios et al. ( LCVM )Base and Extended EOS versions with parameters calculated to fit experimental

    data from DIPPR and DDB

    Selectable units of measurement

    Procedure for solving fluid flow including multi phase equilibria and heat transferProcedure for solving staged columns

    Rigorous solution of distillation columns, fractionations, absorbers,

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    11/12

    strippers...Procedure for calculating hydrate formation temperature and hydrate formationpressure

    hydrate phase equilibria based on different Van Der Waals-Platteeuw

    models

    Procedure for solving polytropic compression with phase equilibria

    Huntington method for gas phaseProprietary method for solving a polytropic process with phase equilibria

    Procedure for solving isentropic nozzle (safety, relief valve with single and two

    phase flow)

    HEM, Homogeneous Equilibrium

    HNE-DS, Homogeneous Non-equilibriumNHNE, Non-homogeneous Non-equilibrium

    Procedure for simulating fluid flow in piping (pipelines) with heat transfer

    Beggs and Brill and proprietary methods for single phase and multiphase

    fluid flow with heat transferProcedure for fitting BIP to measured VLE / LLE / SLE data points (data

    regression)

    Procedure for fitting BIP to VLE values calculated with UNIFAC

    Functions for simulating operating blocks (mixer, gas separator, liquid separator)

    **Functions for accessing component data in database (the user can define mixing

    rules)

    gas / vapor-liquid-solid fugacity plus derivatives vs. temperature pressure

    composition

    gas / vapor-liquid-solid enthalpy plus derivatives vs. temperature pressurecomposition

    gas / vapor-liquid-solid entropy plus derivatives vs. temperature pressure

    composition

    gas / vapor-liquid-solid molar volume plus derivatives vs. temperature pressurecomposition

    Flash at Bubble and Dew point specifications and P (or T)

    Flash at given temperature (T) and pressure (P) multiphase vapor-liquid-solid,

    isothermal flash

    Flash at given phase fraction and P (or T), solves up to 5 different pointsFlash at given enthalpy (H) and P multiphase vapor-liquid-solid, includes

    adiabatic flash

    Flash at given enthalpy (H) and T multiphase vapor-liquid-solid, includes

    adiabatic flash

    Flash at given entropy (S) and P multiphase vapor-liquid-solid, includesisentropic flash

    Flash at given entropy (S) and T multiphase vapor-liquid-solid, includes

    isentropic flash

    Flash at given volume (V) and P multiphase vapor-liquid-solid, includes isochoricflash

    Flash at given volume (V) and T multiphase vapor-liquid-solid, includes isochoric

    flash

    Flash at given volume (V) and enthalpy (H) multiphase vapor-liquid-solid

    Flash at given volume (V) and entropy (S) multiphase vapor-liquid-solidFlash at given enthalpy (H) and entropy (S) multiphase vapor-liquid-solid

    Rigorous (True) critical point plus Cricondentherm and Cricondenbar

    Complete set of properties for different states

    gas density

    vapor density

    liquid densitysolid density

    gas Isobaric specific heat (Cp)

    vapor Isobaric specific heat (Cp)liquid Isobaric specific heat (Cp)

    gas Isochoric specific heat (Cv)

    vapor Isochoric specific heat (Cv)

    liquid Isochoric specific heat (Cv)

    gas cp/cvliquid cp/cv

    Gas heating value

    Gas Wobbe index

    Gas Specific gravity

    gas Joule Thomson coefficients

    vapor Joule Thomson coefficientsliquid Joule Thomson coefficients

    gas Isothermal compressibility

    vapor Isothermal compressibilityliquid Isothermal compressibility

    gas Volumetric expansivity

    vapor Volumetric expansivity

  • 8/17/2019 Phase Envelope, Diagram, Curve, Curves, Excel Matlab Software

    12/12

    liquid Volumetric expansivity

    gas Speed of soundvapor Speed of sound

    liquid Speed of sound

    vapor + liquid (HEM) Speed of sound

    gas Viscosity

    vapor Viscosityliquid Viscosity

    gas Thermal conductivity

    vapor Thermal conductivity

    liquid Thermal conductivity

    gas compressibility factorvapor compressibility factor

    liquid Surface tension

    Typical applications

    Fluid properties in Excel, Matlab, Mathcad and other Windows and UNIX (**)

    applicationsThermodynamics, physical, thermophysical properties

    Process simulation

    Heat / Material Balance

    Process Control

    Process OptimizationEquipments Design

    Separations

    Instruments Design

    Realtime applicationspetroleum refining, natural gas, hydrocarbon, chemical, petrochemical,

    pharmaceutical, air conditioning, energy, mechanical industry