xseos manual

38
XSEOS Thermodynamic Properties using Excess Gibbs Free Energy Models and Equations of State Marcelo Castier Department of Chemical and Petroleum Engineering United Arab Emirates University P.O. Box 17555 - Al Ain - United Arab Emirates [email protected] [email protected] February 21, 2010

Upload: natanael-zangerolamo

Post on 07-Apr-2015

330 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Xseos Manual

XSEOSThermodynamic Properties using Excess Gibbs

Free Energy Models and Equations of State

Marcelo Castier

Department of Chemical and Petroleum EngineeringUnited Arab Emirates University

P.O. Box 17555 - Al Ain - United Arab [email protected]@gmail.com

February 21, 2010

Page 2: Xseos Manual

Abstract

XSEOS is an Excel R© add-in to calculate physical properties using excess Gibbs free energymodels and equations of state. This manual describes the add-in installation and use, lists themodels and properties implemented in the package, and presents the function name conventionadopted.

Page 3: Xseos Manual

IntroductionXSEOS - Excess Gibbs Free Energy Models and Equations of State - is a freely available Excel R©

add-in to compute thermodynamic properties using many traditional and modern thermodynamicmodels. XSEOS also includes correlations to characterize oil fractions. These properties areprogrammed as functions in Visual Basic for Applications (VBA), totaling more than 22000lines of code. Users can call these functions from their Excel R© spreadsheets.

XSEOS is primarily intended for use in undergraduate courses, but may also be useful ingraduate courses and research. The underlying concept in XSEOS is that students should haveeasy access to calculations using modern thermodynamic models, to become aware of their exis-tence and learn how to use them. The calculation experience, however, should not be limited togetting results from ready-to-use programs. Instead, students should engage in developing cal-culation procedures but not in long program development. For example, students can implementa bubble point algorithm at Excel R© spreadsheet level but use the functions available in XSEOSto compute the activity or fugacity coefficients required by their calculations. Therefore, theXSEOS add-in does not contain ready-to-use VBA procedures for chemical equilibrium, flash,dew, and bubble point calculations —XSEOS provides the physical properties required by thesecalculations. Furthermore, the XSEOS add-in does not contain VBA functions for ideal gas andideal solution properties, as they are simple enough to be quickly programmed at spreadsheetlevel, and their implementation is a good exercise for students.

XSEOS has open source code and is distributed under the GNU General Public License,version 3 (available in Appendix B). Therefore, it is an expandable platform and will hopefullycontribute to the exchange of experiences in the teaching of Chemical Engineering Thermody-namics. XSEOS runs in Excel R©, which is part of the Microsoft R© Office suite, available fromMicrosoft R© resellers.

DistributionThe XSEOS distribution contains:

1. this manual in PDF format;

2. file XSEOS-installer.xls;

3. file XSEOS-Add-in.xla with the models implemented in Visual Basic for Applications;

4. file XSEOS-spreadsheet.xls, which is an Excel R© spreadsheet with examples.

InstallationThe installation procedures are different for Excel 2003 and 2007. Please refer to the section thatcorresponds to the version you have.

1

Page 4: Xseos Manual

Excel R© 2003 installationInstallation requires two parts. The first part sets Excel R© security levels and installs the Solverpackage.

1. start Excel R©;

2. click on Tools, then on Macro, and then on Security. Set the security level to Medium.Navigate back to the main Excel R© window;

3. click on Tools and then on Add-ins;

4. check the Solver Add-in box;

5. click on OK to close the Add-ins box;

6. close Excel R©;

The second part installs the add-in files. The details differ depending on whether the usercopies the add-in files to a directory called C:\XSEOS (simpler installation) or elsewhere.

Installation in the C:\XSEOS directory - Recommended

1. copy all files to a directory called C:\XSEOS;

2. open Excel R©;

3. open the file XSEOS-installer.xls;

4. at the Security Warning, choose Enable Macros;

5. click on Tools, then on Macro, then on Macros..., and press the Run button to execute themacro Add_an_addin. This may take a few seconds;

6. close Excel R©.

After installation, the functions of the XSEOS add-in will be automatically available everytime you open Excel R©.

Installation in a user-defined directory

Let us refer to the user-defined directory as D:\ userdir.

1. copy all files to directory D:\userdir;

2. open Excel R©;

3. open the file XSEOS-installer.xls;

2

Page 5: Xseos Manual

4. at the Security Warning, choose Enable Macros;

5. click on Tools, then on Macro, then on Macros..., and press the Edit button;

6. in the Visual Basic code, replace C:\XSEOS\XSEOS-Add-in.xla with D:\userdir\XSEOS-Add-in.xla and save the Visual Basic code.

7. click on Tools, then on Macro, then on Macros..., and press the Run button to execute themacro Add_an_addin. This may take a few seconds;

8. close Excel R©.

After installation, the functions of the XSEOS add-in will be automatically available everytime you open Excel R©.

Excel R© 2007 installationInstallation requires two parts. The first part sets Excel R© security levels and installs the Solverpackage.

1. start Excel R©;

2. click on button located at the upper left corner of the screen and then on the button ExcelOptions;

3. click on Add-ins and on the Manage pull-down menu, select Excel Add-ins and click onthe Go... button;

4. click on the Solver Add-in box and then on OK. Excel may ask for permission to installthe Solver Add-in: answer Yes to grant permission. The installation procedure may take afew minutes;

5. click again on button located at the upper left corner of the screen and then on the buttonExcel Options;

6. click on Trust Center, then on Trust Center Settings and then on Add-ins. Make sure allboxes are unchecked;

The second part installs the add-in files.

1. copy all the files in the XSEOS distribution to a directory of your choice;

2. click on button located at the upper right corner of the screen and then on the button ExcelOptions;

3. click on Add-ins and on the Manage pull-down menu, select Excel Add-ins and click onthe Go... button;

3

Page 6: Xseos Manual

4. click on the Browse button, navigate to the directory that contains the XSEOS files, selectthe XSEOS-Add-in.xla file, and click OK to return to Excel’s main window;

5. close Excel R©.

After installation, the functions of the XSEOS add-in will be automatically available everytime you open Excel R©.

Use

General issuesTo use XSEOS, some basic familiarity with Excel R© is required. The tutorial:

http://getit.rutgers.edu/tutorials/excel/media/excel.pdf

describes the most important Excel R© features needed to use XSEOS. Use of the Excel R© Solveris described at:

http://www.vertex42.com/ExcelArticles/excel-solver-examples.html.

Microsoft R© provides several more detailed tutorials:

http://office.microsoft.com/en-us/training/CR061831141033.aspx

It is important to emphasize two useful features of Excel R© operation:

1. absolute and relative cell addresses: it is simple to pull rows or columns in Excel R© tobuild tables in which the entries refer to similar calculations. In these pulling operations,Excel R© will utilize relative addresses by guessing which cells will be used in the newcalculation. Some of the arguments of the XSEOS functions, however, such as the modelparameters and the universal gas constant, will have the same values for any temperature,pressure, and/or composition. Therefore, it is more convenient to use absolute addresses(i.e., addresses that Excel R© will not change) to the cells that contain these values. Thequickest way to impose that Excel R© will refer to a cell by its absolute address is to selectthe cell reference in a formula and then press F4 only once. By pressing F4 more thanonce, other effects can be obtained as explained in the site:

http://office.microsoft.com/en-us/excel/HP101023451033.aspx

2. array functions: some of the XSEOS functions return arrays and not only a single value,such as the functions that compute activity coefficients and the fugacity coefficients ofthe components of a mixture. In the case of these two functions, the number of valuesreturned is equal to number of components in the mixture under evaluation. To use an

4

Page 7: Xseos Manual

array function, the first step is to use the mouse to select the necessary number of cells (forexample, three cells in a ternary mixture). Making sure these cells remain selected, thefunction call should be typed. Typing is completed by pressing CTRL+SHIFT+ENTERsimultaneously. A detailed explanation about array formulas in Excel R© is available in thesite:

http://office.microsoft.com/en-us/excel/HA010872901033.aspx

Before implementing new calculations, it is strongly suggested that you:

1. watch the movies available at http://www.engg.uaeu.ac.ae/mcastier/downloads.htm andpractice with the templates available there;

2. try some of the examples in the file XSEOS-spreadsheet.xls. This file presents applicationsof the models available in XSEOS to different situations, such as vapor-liquid equilibrium,liquid-liquid equilibrium, flashes, chemical equilibrium, parameter fitting, and speed ofsound calculations. The file contains documentation about each example.

Each XSEOS function for excess Gibbs free energy models has a name and a list of inputparameters, which typically include the universal gas constant, temperature, mole fractions, andthe set of parameters used by each thermodynamic model to characterize fluid behavior (suchas critical properties, binary interaction parameters, etc...). Functions for equations of state alsoinclude the pressure (or the molar volume) in their list of input parameters. The function nameconvention used in XSEOS is described in the next subsection.

Models and properties availableTable 1 shows the excess Gibbs free energy models and properties currently available in XSEOS,along with their name convention. In the lower part of Table 1, mname stands for the name con-vention, as defined in the upper part of the Table. For example, the functions to compute thelogarithms of activity coefficients using the regular solution theory and the modified UNIFAC(Dortmund) are called regsol and modunifac, respectively. The values of gE

RT , hE

RT , sE

R , and cEPR are

not returned by individual functions. Instead, all four values are returned by an array function.Again using the regular solution theory and the modified UNIFAC (Dortmund) models as exam-ples, the names of the corresponding functions are regsolxs and modunifacxs, respectively. Thesubscript values 1 to 4 in Table 1, as in mnamexs1 and mnamexs4, are included for illustrativepurposes, only to indicate the array position in which each property is returned. Two of the prop-erties listed in Table 1 are tagged as internal functions to indicate that the corresponding formulasare programmed in the XSEOS add-in but a user-friendly function has not been developed yet.

Table 2 shows the equations of state and properties currently available in XSEOS, along withtheir name convention. mname in the lower part of Table 2 stands for the model name convention,as defined in the upper part of the Table. For example, the functions to compute the logarithmsof fugacity coefficients of the components of a mixture in the liquid and vapor phases, using thePeng-Robinson equation of state, are called prlnphil and prlnphiv, respectively. A third type of

5

Page 8: Xseos Manual

Table 1: Excess Gibbs free energy models and properties available in XSEOS

Excess Gibbs free energy Name conventionMargules 2-,3-,4-suffix margulesRegular solution theory regsol

Flory-Huggins fhWilson wilson

Models TK-Wilson tkwilsonNRTL nrtl

UNIQUAC uniquacUNIFAC unifac

Modified UNIFAC (Dortmund) modunifacgE

RT mnamexs1hE

RT mnamexs2sE

R mnamexs3

Properties cEPR mnamexs4

lnγi mname(∂ lnγi

∂T

)x

internal function

n(

∂ lnγi∂n j

)T,nk 6= j

internal function

6

Page 9: Xseos Manual

function is available to compute the logarithms of fugacity coefficients of the components of amixture when the user wishes to specify molar volume instead of pressure. For example, such afunction for the Peng-Robinson equation of state is called prlnphi.

The values of lnφ , hR

RT , sR

R , and cRP

R are not returned by individual functions. Instead, all fourvalues are returned by an array function. Again using the Peng-Robinson equation of state asexample, the names of the corresponding functions are prresl and prresv, depending on whetherliquid or vapor phase properties should be calculated. Similarly, the values of ρ ,

(∂P∂ρ

)T,x

, cRP

R ,

and(

∂P∂T

)v,x

are calculated by array functions, whose names for the Peng-Robinson equation of

state are prsoundspeedl and prsoundspeedv.The subscript values 1 to 4 in Table 2 that appear in array functions are included for illus-

trative purposes, only to indicate the array position in which each property is returned. In Table2, the properties tagged as internal functions are programmed in the XSEOS add-in but a user-friendly function has not been developed yet.

Literature references about the implemented models and their parameters are provided in fileXSEOS-spreadsheet.xls.

Modeling petroleum fractionsSeveral correlations to predict the properties of petroleum fractions are available in XSEOS. Theyallow the computation of properties such as critical temperature, critical pressure, acentric factor,molar mass, etc. More information about these models should be included in future versions ofthe manual. Please refer to the Oil Examples sheet of the XSEOS-spreadsheet.xls for the currentdocumentation.

An example of correlation is the the Whitson interpolation tables to estimate the values ofcritical temperature, critical pressure, acentric factor, and molar mass of oil fractions are availablethrough the functions whitsontc, whitsonpc, whitsonomega, and whitsonmw. These functionshave a single argument, which is the number of carbon atoms in the hydrocarbon molecule.This must be a number between 6 and 45. The functions accept non-integer values because thismethod is normally used to model pseudocomponents in phase equilibrium calculations that maybe represented by a fractional number of Carbon atoms.

Surface tensionXSEOS includes the parachor, Miqueu, and Danesh methods to predict surface tension. Moreinformation about these methods should be included in future versions of the manual. Pleaserefer to the Surface tension sheet of the XSEOS-spreadsheet.xls for the current documentation.

7

Page 10: Xseos Manual

Table 2: Equations of state and properties available in XSEOS

Equations of state Name conventionvan der Waals vdw

Redlich-Kwong rkSoave-Redlich-Kwong (SRK) srk

Models Peng-Robinson (PR) prPR, quadratic mixing rule for b prb2

Stryjek-Vera svPredictive SRK (PSRK) psrk

Mattedi-Tavares-Castier (MTC) mtcP mnamePρ mnamesoundspeedl1, mnamesoundspeedv1(

∂P∂ρ

)T,x

mnamesoundspeedl2, mnamesoundspeedv2(∂ 2P∂ρ2

)T,x

internal function(∂ 3P∂ρ3

)T,x

internal function

lnφ mnameresl1, mnameresv1mnameresidual1

lnφi mnamelnphi, mnamelnphil, mnamelnphiv(∂ lnφi

∂P

)T,x

internal function

Properties n(

∂ lnφi∂n j

)T,P,nk 6= j

internal function

n(

∂V∂n j

)T,P,nk 6= j

internal function(∂ lnφi

∂T

)P,x

internal function(∂v∂T

)P,x

internal functionhR

RT mnameresl2, mnameresv2mnameresidual2

sR

R mnameresl3, mnameresv3mnameresidual3

cRP

R mnameresl4, mnameresv4,mnamesoundspeedl3, mnamesoundspeedv3

mnameresidual4(∂P∂T

)v,x

mnamesoundspeedl4, mnamesoundspeedv4

8

Page 11: Xseos Manual

FeedbackSuggestions of corrections and improvements to the add-in, its supporting spreadsheet, and man-ual or proposals of new examples are welcome. The author’s e-mail addresses are available atthe front page of this manual.

AcknowledgmentsThe author acknowledges Dr. Silvana Mattedi (Federal University of Bahia, Brazil) and the stu-dents of the Chemical Engineering Thermodynamics and Fluid Phase Equilibria courses of theUnited Arab Emirates University, 2007-9, for testing the program and suggesting many improve-ments.

List of Symbols

Roman LetterscE

P : molar excess heat capacity at constant pressurecR

P : molar residual heat capacity at constant pressurehE : molar excess enthalpyhR : molar residual enthalpygE : molar excess Gibbs free energyn : number of molesP : pressureR : universal gas constantsE : molar excess entropysR : molar residual entropyT : temperaturev : molar volumeV : volumex : mole fraction

Greek Lettersγi : activity coefficient of component i in a mixtureφ : fugacity coefficient of a pure component or of a mixtureφi : fugacity coefficient of component i in a mixtureρ : molar density

9

Page 12: Xseos Manual

Appendix A

Thermodynamic models

This appendix presents the formulas of the thermodynamic models as implemented in XSEOS.To keep the lists of symbols as short as possible, intermediate variables used in the model defi-nition are omitted.

A.1 Excess Gibbs free energy models

A.1.1 Margules modelThe four-suffix Margules formula is implemented. It is possible to make calculations with the2- or 3-suffix formulas by setting proper values for the model parameters, as explained below, inthe list of symbols.

(A.1)ge

RT=

x1

(A + B (x1 − x2) +C (x1 − x2)

2)

x2

RTList of symbols:A: model parameterB: model parameter (should be set to zero when using the Margules 2-suffix formula)C: model parameter (should be set to zero when using the Margules 2- or 3-suffix formula)ge: molar excess Gibbs free energyR: universal gas constantT : temperaturex1: mole fraction of component 1x2: mole fraction of component 2

A.1.2 Regular solution theory

(A.2)ge

RT=

(−(δm (∑nc

i=1 (δ (i) φ (i)))) + ∑nci=1

(δ (i)2

φ (i)))

(∑nck=1 (v(k) x(k)))

RT

10

Page 13: Xseos Manual

with:(A.3)δm =

nc

∑j=1

(δ ( j) φ ( j))

and:

(A.4)φ ( j) =v( j) x( j)

∑ncie=1 (v(ie) x(ie))

List of symbols:ge: molar excess Gibbs free energync: number of components in the mixtureR: universal gas constantT : temperaturev: molar volume of pure component (model parameter)x: mole fractionδ : solubility parameter (model parameter)

A.1.3 Flory-Huggins

ge

RT=

nc

∑i=1

(ln(

m(i)∑

nckn=1 (m(kn) x(kn))

)x(i)

)+

∑nci=1

(m(i)

(∑

ncj=1 (χ (i, j) m( j) x( j))

)x(i)

)2 (∑nc

km=1 (m(km) x(km)))

(A.5)

List of symbols:ge: molar excess Gibbs free energym: size parameter (model parameter)nc: number of components in the mixtureR: universal gas constantT : temperaturex: mole fractionχ: Flory-Huggins energy parameter (model parameter)

A.1.4 Wilson

(A.6)ge

RT= −

nc

∑i=1

ln

∑ncj=1

(v( j)x( j)

e∆g(i, j)

RT

)v(i)

x(i)

11

Page 14: Xseos Manual

List of symbols:ge: molar excess Gibbs free energync: number of components in the mixtureR: universal gas constantT : temperaturev: molar volume of pure component (model parameter)x: mole fraction∆g: binary interaction parameter (model parameter)

A.1.5 TK-Wilson

(A.7)ge

RT=

nc

∑i=1

ln

∑ncj=1 (v( j) x( j))

∑ncie=1

(v(ie)x(ie)

e∆g(i,ie)

RT

) x(i)

List of symbols:ge: molar excess Gibbs free energync: number of components in the mixtureR: universal gas constantT : temperaturev: molar volume of pure component (model parameter)x: mole fraction∆g: binary interaction parameter (model parameter)

A.1.6 NRTL

(A.8)ge

RT=

∑nci=1

(

∑ncj=1

(a( j,i)x( j)

ea( j,i)α( j,i)

RT

))x(i)

∑ncm=1

(x(m)

ea(m,i)α(m,i)

RT

)

RTList of symbols:a: binary interaction parameter (model parameter)ge: molar excess Gibbs free energync: number of components in the mixtureR: universal gas constantT : temperaturex: mole fractionα: non-randomness parameter (model parameter)

12

Page 15: Xseos Manual

A.1.7 UNIQUAC

(A.9)

ge

RT=

nc

∑i=1

(ln(

φ (i)x(i)

)x(i)

)−

nc

∑i=1

(ln

(nc

∑j=1

(θ ( j)

ea( j,i)RT

))q(i) x(i)

)

+z(

∑nci=1

(ln(

θ(i)φ(i)

)q(i) x(i)

))2

with:(A.10)φ (i) =

r (i) x(i)∑

nckn=1 (r (kn) x(kn))

and:

(A.11)θ (i) =q(i) x(i)

∑nckn=1 (q(kn) x(kn))

List of symbols:ge: molar excess Gibbs free energync: number of components in the mixtureR: universal gas constantT : temperaturer: UNIQUAC volume parameterq: UNIQUAC area parameterx: mole fractionz: coordination number (usually equal to 10 in UNIQUAC)

A.1.8 UNIFAC

(A.12)ge

RT=

gec

RT+

ger

RT

with:

(A.13)ge

cRT

=nc

∑i=1

(ln(

φ (i)x(i)

)x(i)

)+

z(

∑nci=1

(ln(

θ(i)φ(i)

)q(i) x(i)

))2

(A.14)ge

rRT

=nc

∑i=1

((nsg

∑ksg=1

( f (i,ksg) (lngr (ksg)− lnigr (i,ksg)))

)x(i)

)

13

Page 16: Xseos Manual

(A.15)lngr (isg) = qsg(isg)

(1− ln

(nsg

∑msg3=1

(τ (msg3, isg) thsgm(msg3))

)

−nsg

∑msg4=1

(τ (isg,msg4) thsgm(msg4)

∑nsgmsg5=1 (τ (msg5,msg4) thsgm(msg5))

))

thsgm(isg)

=qsg(isg) (∑nc

i2=1 ( f (i2, isg) x(i2)))(∑

nsgmsg2=1

(qsg(msg2)(∑

nci2=1( f (i2,msg2)x(i2)))

∑nci1=1

((∑

nsgmsg1=1( f (i1,msg1))

)x(i1)

))) (

∑nci1=1

((∑

nsgmsg1=1 ( f (i1,msg1))

)x(i1)

))(A.16)

(A.17)lnigr (i, isg) = qsg(isg)

(1− ln

(nsg

∑lsg3=1

(τ (lsg3, isg) thsgp(i, lsg3))

)

−nsg

∑lsg4=1

(τ (isg, lsg4) thsgp(i, lsg4)

∑nsglsg5=1 (τ (lsg5, lsg4) thsgp(i, lsg5))

))

(A.18)thsgp(i, isg) =f (i, isg) qsg(isg)

∑nsglsg2=1 ( f (i, lsg2) qsg(lsg2))

(A.19)r (i) =nsg

∑ksg=1

( f (i,ksg) rsg(ksg))

(A.20)q(i) =nsg

∑ksg=1

( f (i,ksg) qsg(ksg))

(A.21)φ (i) =r (i) x(i)

∑ncknc=1 (r (knc) x(knc))

(A.22)θ (i) =q(i) x(i)

∑ncknc=1 (q(knc) x(knc))

(A.23)τ (i, j) = e−(

a(i, j)RT

)

14

Page 17: Xseos Manual

List of symbols:a: binary interaction parameter (model parameter)f : number of occurrences of a subgroup in a given moleculege: molar excess Gibbs free energync: number of components in the mixtureR: universal gas constantT : temperaturer: molecular volume parameterrsg: subgroup volume parameterq: molecular area parameterqsg: subgroup area parameterx: mole fractionz: coordination number (usually equal to 10 in UNIFAC)

A.1.9 Modified UNIFAC (Dortmund version)The equations are similar to those of the UNIFAC model with the following exceptions:

(A.24)ge

cRT

=nc

∑i=1

(ln

(φ′(i)

x(i)

)x(i)

)+

z(

∑nci=1

(ln(

θ(i)φ(i)

)q(i) x(i)

))2

(A.25)φ′(i) =

r (i)0.75 x(i)

∑ncknc=1

(r (knc)0.75 x(knc)

)

(A.26)a(i, j) = a′(i, j) + T b

′(i, j) + T 2 c

′(i, j)

List of additional symbols compared to the UNIFAC model:a′: binary interaction parameter (model parameter)

b′: binary interaction parameter (model parameter)

c′: binary interaction parameter (model parameter)

A.2 Equations of state

A.2.1 van der Waals

(A.27)P =RT

−bm + v−(am

v2

)

15

Page 18: Xseos Manual

with:

(A.28)am =nc

∑i=1

((nc

∑j=1

(a(i, j) x( j))

)x(i)

)

(A.29)bm =nc

∑i=1

(b(i) x(i))

(A.30)a(i, j) =√

apure(i)√

apure( j) (1− k (i, j))

(A.31)apure(i) =27R2 Tc (i)

2

64Pc (i)

(A.32)b(i) =RTc (i)8Pc (i)

List of symbols:k: binary interaction parameter (model parameter)P: pressurePc: critical pressure (model parameter)R: universal gas constantT : temperatureTc: critical temperature (model parameter)v: molar volumex: mole fraction

A.2.2 Redlich-Kwong

(A.33)P =RT

−bm + v− am

v (bm + v)

with:

(A.34)am =nc

∑i=1

((nc

∑j=1

(a(i, j) x( j))

)x(i)

)

(A.35)bm =nc

∑i=1

(b(i) x(i))

16

Page 19: Xseos Manual

(A.36)a(i, j) =√

apure(i)√

apure( j) (1− k (i, j))

(A.37)apure(i) =0.42748R2 Tc (i)

2.5√

T Pc (i)

(A.38)b(i) =0.08662RTc (i)

Pc (i)

List of symbols:k: binary interaction parameter (model parameter)P: pressurePc: critical pressure (model parameter)R: universal gas constantT : temperatureTc: critical temperature (model parameter)v: molar volumex: mole fraction

A.2.3 Soave-Redlich-Kwong (SRK)

(A.39)P =RT

−bm + v− am

v (bm + v)

with:

(A.40)am =nc

∑i=1

((nc

∑j=1

(a(i, j) x( j))

)x(i)

)

(A.41)bm =nc

∑i=1

(b(i) x(i))

(A.42)a(i, j) =√

apure(i)√

apure( j) (1− k (i, j))

apure(i)

=0.42747R2

(1 +

(0.48508 + 1.55171ω (i)− 0.15613ω (i)2

) (1−

√T

Tc(i)

))2Tc (i)

2

Pc (i)(A.43)

17

Page 20: Xseos Manual

(A.44)b(i) =0.08664RTc (i)

Pc (i)

List of symbols:k: binary interaction parameter (model parameter)P: pressurePc: critical pressure (model parameter)R: universal gas constantT : temperatureTc: critical temperature (model parameter)v: molar volumex: mole fractionω: acentric factor (model parameter)

A.2.4 Peng-Robinson

(A.45)P =RT

−bm + v+

am

bm (bm − 2v)− v2

with:

(A.46)am =nc

∑i=1

((nc

∑j=1

(a(i, j) x( j))

)x(i)

)

(A.47)bm =nc

∑i=1

(b(i) x(i))

(A.48)a(i, j) =√

apure(i)√

apure( j) (1− k (i, j))

apure(i)

=0.45724R2

(1 +

(0.37464 + 1.54226ω (i)− 0.26992ω (i)2

) (1−

√T

Tc(i)

))2Tc (i)

2

Pc (i)(A.49)

(A.50)b(i) =0.0778RTc (i)

Pc (i)

List of symbols:k: binary interaction parameter (model parameter)

18

Page 21: Xseos Manual

P: pressurePc: critical pressure (model parameter)R: universal gas constantT : temperatureTc: critical temperature (model parameter)v: molar volumex: mole fractionω: acentric factor (model parameter)

A.2.5 Peng-Robinson with quadratic mixing rule for the b parameterThe model is identical to the Peng-Robinson EOS except for the expression that computes thevalue of b for a mixture, here denoted as bm:

(A.51)bm =nc

∑i=1

nc

∑j=1

xix j

(bi + b j

2

)(1− `i j

)A.2.6 Stryjek-Vera

(A.52)P =RT

−bm + v+

am

bm (bm − 2v)− v2

with:

(A.53)am =nc

∑i=1

((nc

∑j=1

(a(i, j) x( j))

)x(i)

)

(A.54)bm =nc

∑i=1

(b(i) x(i))

(A.55)a(i, j) =√

apure(i)√

apure( j) (1− k (i, j))

(A.56)apure(i) =0.45724R2

(1 + f w(i)

(1−

√T

Tc(i)

))2Tc (i)

2

Pc (i)

(A.57)f w(i) = 0.378893 + 1.48972ω (i)− 0.171318ω (i)2

+ 0.0196554ω (i)3 + k1 (i)

(1 +

√T

Tc (i)

)(0.7− T

Tc (i)

)19

Page 22: Xseos Manual

(A.58)b(i) =0.0778RTc (i)

Pc (i)

List of symbols:k: binary interaction parameter (model parameter)k1: pure component parameter (model parameter)P: pressurePc: critical pressure (model parameter)R: universal gas constantT : temperatureTc: critical temperature (model parameter)v: molar volumex: mole fractionω: acentric factor (model parameter)

A.2.7 Predictive Soave-Redlich-Kwong (PSRK)

(A.59)P =RT

−bm + v− am

v (bm + v)

with:

(A.60)am = bm RT

nc

∑i=1

(apure(i) x(i)

RT b(i)

)+

ge

RT + ∑nci=1

(ln(

b(i)bm

)x(i)

)ln( u

1+u

)

(A.61)u = 1.1

(A.62)bm =nc

∑i=1

(b(i) x(i))

(A.63)apure(i)

=

0.42748R2(

1 + c1 (i)(

1−√

TTc(i)

)+ c2 (i)

(1−

√T

Tc(i)

)2+ c3 (i)

(1−

√T

Tc(i)

)3)2

Tc (i)2

Pc (i)

(A.64)b(i) =0.08664RTc (i)

Pc (i)

In Eq. A.60, ge denotes the molar excess Gibss free energy from the UNIFAC model withtemperature-dependent parameters, as follows:

20

Page 23: Xseos Manual

(A.65)a(i, j) = a′(i, j) + T b

′(i, j) + T 2 c

′(i, j)

List of symbols:a′: binary interaction parameter (model parameter)

b′: binary interaction parameter (model parameter)

c′: binary interaction parameter (model parameter)

c1: pure component parameter (model parameter)c2: pure component parameter (model parameter)c3: pure component parameter (model parameter)ge: molar excess Gibss free energy from UNIFAC with temperature-dependent parametersP: pressurePc: critical pressure (model parameter)R: universal gas constantT : temperatureTc: critical temperature (model parameter)v: molar volumex: mole fraction

A.2.8 Mattedi-Tavares-Castier (MTC)The compressibility factor is given by:

z = vr ln[

vv− 1

]+

Z2

vr ln[

v− 1 + (q/r)v

]+ l− vΨ(q/r)

v− 1 + (q/r)

nc

∑i=1

ng

∑a=1

xiνai Qa (Γa − 1)

v− 1 + (q/r)Γa

(A.66)

with:

(A.67)l = (Z/2)(r - q) - (r - 1)

(A.68)r =nc

∑i=1

xi

ng

∑a=1

νai Ra

(A.69)Zq =nc

∑i=1

xi

ng

∑a=1

νai Z Qa

(A.70)rV ∗ =nc

∑i=1

xi

ng

∑a=1

νai V a

(A.71)v =V

NrV ∗=

vrv∗

21

Page 24: Xseos Manual

(A.72)rv∗ =nc

∑i=1

xi

ng

∑a=1

νai va

(A.73)Γa =

ng

∑m=1

Smγ

ma

(A.74)Sm =

nc∑

i=1νm

i xiQm

q

(A.75)γma = exp(−uma/(RT ))

(A.76)uba

R=

uba0R

(1 +

Bba

T

)List of symbols:Bba: model parameter related to the interaction energyP: pressureQa: surfarce area of a group of type a (model parameter)R: universal gas constantRa: group contribution to the number of segmentsT : temperatureuma: interaction energy between groups m and auba

0 : : model parameter related to the interaction energyv: molar volumev∗: lattice cell volume (assumed equal to 5 cm3)V a: group contribution to the hard core volume (model parameter)x: mole fractionz: compressibility factorZ: lattice coordination number (equal to 10)νa

i : number of occurrences of group a in molecule iΨ: lattice constant (assumed equal to 1)

22

Page 25: Xseos Manual

Appendix B

GNU GPL License

Copyright c© 2007 Free Software Foundation, Inc. http://fsf.org/

Everyone is permitted to copy and distribute verbatim copies of thislicense document, but changing it is not allowed.

23

Page 26: Xseos Manual

Preamble

The GNU General Public License is a free, copyleft license for software and other kinds ofworks.

The licenses for most software and other practical works are designed to take away yourfreedom to share and change the works. By contrast, the GNU General Public License is intendedto guarantee your freedom to share and change all versions of a program–to make sure it remainsfree software for all its users. We, the Free Software Foundation, use the GNU General PublicLicense for most of our software; it applies also to any other work released this way by itsauthors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General PublicLicenses are designed to make sure that you have the freedom to distribute copies of free software(and charge for them if you wish), that you receive source code or can get it if you want it, thatyou can change the software or use pieces of it in new free programs, and that you know you cando these things.

To protect your rights, we need to prevent others from denying you these rights or asking youto surrender the rights. Therefore, you have certain responsibilities if you distribute copies of thesoftware, or if you modify it: responsibilities to respect the freedom of others.

For example, if you distribute copies of such a program, whether gratis or for a fee, you mustpass on to the recipients the same freedoms that you received. You must make sure that they,too, receive or can get the source code. And you must show them these terms so they know theirrights.

Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright onthe software, and (2) offer you this License giving you legal permission to copy, distribute and/ormodify it.

For the developers’ and authors’ protection, the GPL clearly explains that there is no warrantyfor this free software. For both users’ and authors’ sake, the GPL requires that modified versionsbe marked as changed, so that their problems will not be attributed erroneously to authors ofprevious versions.

Some devices are designed to deny users access to install or run modified versions of thesoftware inside them, although the manufacturer can do so. This is fundamentally incompatiblewith the aim of protecting users’ freedom to change the software. The systematic pattern of suchabuse occurs in the area of products for individuals to use, which is precisely where it is mostunacceptable. Therefore, we have designed this version of the GPL to prohibit the practice forthose products. If such problems arise substantially in other domains, we stand ready to extendthis provision to those domains in future versions of the GPL, as needed to protect the freedomof users.

Finally, every program is threatened constantly by software patents. States should not allowpatents to restrict development and use of software on general-purpose computers, but in thosethat do, we wish to avoid the special danger that patents applied to a free program could make it

Page 27: Xseos Manual

effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render theprogram non-free.

The precise terms and conditions for copying, distribution and modification follow.

2

Page 28: Xseos Manual

TERMS AND CONDITIONS

0. Definitions.

“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such assemiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licenseeis addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

To “modify” a work means to copy from or adapt all or part of the work in a fashionrequiring copyright permission, other than the making of an exact copy. The resultingwork is called a “modified version” of the earlier work or a work “based on” the earlierwork.

A “covered work” means either the unmodified Program or a work based on the Program.

To “propagate” a work means to do anything with it that, without permission, would makeyou directly or secondarily liable for infringement under applicable copyright law, exceptexecuting it on a computer or modifying a private copy. Propagation includes copying,distribution (with or without modification), making available to the public, and in somecountries other activities as well.

To “convey” a work means any kind of propagation that enables other parties to make orreceive copies. Mere interaction with a user through a computer network, with no transferof a copy, is not conveying.

An interactive user interface displays “Appropriate Legal Notices” to the extent that it in-cludes a convenient and prominently visible feature that (1) displays an appropriate copy-right notice, and (2) tells the user that there is no warranty for the work (except to the extentthat warranties are provided), that licensees may convey the work under this License, andhow to view a copy of this License. If the interface presents a list of user commands oroptions, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.

The “source code” for a work means the preferred form of the work for making modifica-tions to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by arecognized standards body, or, in the case of interfaces specified for a particular program-ming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as awhole, that (a) is included in the normal form of packaging a Major Component, but whichis not part of that Major Component, and (b) serves only to enable use of the work with thatMajor Component, or to implement a Standard Interface for which an implementation isavailable to the public in source code form. A “Major Component”, in this context, means

1

Page 29: Xseos Manual

a major essential component (kernel, window system, and so on) of the specific operatingsystem (if any) on which the executable work runs, or a compiler used to produce the work,or an object code interpreter used to run it.

The “Corresponding Source” for a work in object code form means all the source codeneeded to generate, install, and (for an executable work) run the object code and to modifythe work, including scripts to control those activities. However, it does not include thework’s System Libraries, or general-purpose tools or generally available free programswhich are used unmodified in performing those activities but which are not part of thework. For example, Corresponding Source includes interface definition files associatedwith source files for the work, and the source code for shared libraries and dynamicallylinked subprograms that the work is specifically designed to require, such as by intimatedata communication or control flow between those subprograms and other parts of thework.

The Corresponding Source need not include anything that users can regenerate automati-cally from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.

All rights granted under this License are granted for the term of copyright on the Program,and are irrevocable provided the stated conditions are met. This License explicitly affirmsyour unlimited permission to run the unmodified Program. The output from running acovered work is covered by this License only if the output, given its content, constitutes acovered work. This License acknowledges your rights of fair use or other equivalent, asprovided by copyright law.

You may make, run and propagate covered works that you do not convey, without condi-tions so long as your license otherwise remains in force. You may convey covered works toothers for the sole purpose of having them make modifications exclusively for you, or pro-vide you with facilities for running those works, provided that you comply with the termsof this License in conveying all material for which you do not control copyright. Thosethus making or running the covered works for you must do so exclusively on your behalf,under your direction and control, on terms that prohibit them from making any copies ofyour copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions statedbelow. Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users’ Legal Rights From Anti-Circumvention Law.

No covered work shall be deemed part of an effective technological measure under anyapplicable law fulfilling obligations under article 11 of the WIPO copyright treaty adoptedon 20 December 1996, or similar laws prohibiting or restricting circumvention of suchmeasures.

2

Page 30: Xseos Manual

When you convey a covered work, you waive any legal power to forbid circumvention oftechnological measures to the extent such circumvention is effected by exercising rightsunder this License with respect to the covered work, and you disclaim any intention tolimit operation or modification of the work as a means of enforcing, against the work’susers, your or third parties’ legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.

You may convey verbatim copies of the Program’s source code as you receive it, in anymedium, provided that you conspicuously and appropriately publish on each copy an ap-propriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all noticesof the absence of any warranty; and give all recipients a copy of this License along withthe Program.

You may charge any price or no price for each copy that you convey, and you may offersupport or warranty protection for a fee.

5. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from theProgram, in the form of source code under the terms of section 4, provided that you alsomeet all of these conditions:

(a) The work must carry prominent notices stating that you modified it, and giving arelevant date.

(b) The work must carry prominent notices stating that it is released under this Licenseand any conditions added under section 7. This requirement modifies the requirementin section 4 to “keep intact all notices”.

(c) You must license the entire work, as a whole, under this License to anyone whocomes into possession of a copy. This License will therefore apply, along with anyapplicable section 7 additional terms, to the whole of the work, and all its parts,regardless of how they are packaged. This License gives no permission to licensethe work in any other way, but it does not invalidate such permission if you haveseparately received it.

(d) If the work has interactive user interfaces, each must display Appropriate Legal No-tices; however, if the Program has interactive interfaces that do not display Appropri-ate Legal Notices, your work need not make them do so.

A compilation of a covered work with other separate and independent works, which arenot by their nature extensions of the covered work, and which are not combined with itsuch as to form a larger program, in or on a volume of a storage or distribution medium, iscalled an “aggregate” if the compilation and its resulting copyright are not used to limit theaccess or legal rights of the compilation’s users beyond what the individual works permit.Inclusion of a covered work in an aggregate does not cause this License to apply to theother parts of the aggregate.

3

Page 31: Xseos Manual

6. Conveying Non-Source Forms.

You may convey a covered work in object code form under the terms of sections 4 and5, provided that you also convey the machine-readable Corresponding Source under theterms of this License, in one of these ways:

(a) Convey the object code in, or embodied in, a physical product (including a physicaldistribution medium), accompanied by the Corresponding Source fixed on a durablephysical medium customarily used for software interchange.

(b) Convey the object code in, or embodied in, a physical product (including a physicaldistribution medium), accompanied by a written offer, valid for at least three yearsand valid for as long as you offer spare parts or customer support for that productmodel, to give anyone who possesses the object code either (1) a copy of the Corre-sponding Source for all the software in the product that is covered by this License, ona durable physical medium customarily used for software interchange, for a price nomore than your reasonable cost of physically performing this conveying of source, or(2) access to copy the Corresponding Source from a network server at no charge.

(c) Convey individual copies of the object code with a copy of the written offer to pro-vide the Corresponding Source. This alternative is allowed only occasionally andnoncommercially, and only if you received the object code with such an offer, inaccord with subsection 6b.

(d) Convey the object code by offering access from a designated place (gratis or for acharge), and offer equivalent access to the Corresponding Source in the same waythrough the same place at no further charge. You need not require recipients to copythe Corresponding Source along with the object code. If the place to copy the objectcode is a network server, the Corresponding Source may be on a different server (op-erated by you or a third party) that supports equivalent copying facilities, providedyou maintain clear directions next to the object code saying where to find the Cor-responding Source. Regardless of what server hosts the Corresponding Source, youremain obligated to ensure that it is available for as long as needed to satisfy theserequirements.

(e) Convey the object code using peer-to-peer transmission, provided you inform otherpeers where the object code and Corresponding Source of the work are being offeredto the general public at no charge under subsection 6d.

A separable portion of the object code, whose source code is excluded from the Corre-sponding Source as a System Library, need not be included in conveying the object codework.

A “User Product” is either (1) a “consumer product”, which means any tangible personalproperty which is normally used for personal, family, or household purposes, or (2) any-thing designed or sold for incorporation into a dwelling. In determining whether a productis a consumer product, doubtful cases shall be resolved in favor of coverage. For a partic-ular product received by a particular user, “normally used” refers to a typical or common

4

Page 32: Xseos Manual

use of that class of product, regardless of the status of the particular user or of the way inwhich the particular user actually uses, or expects or is expected to use, the product. Aproduct is a consumer product regardless of whether the product has substantial commer-cial, industrial or non-consumer uses, unless such uses represent the only significant modeof use of the product.

“Installation Information” for a User Product means any methods, procedures, authoriza-tion keys, or other information required to install and execute modified versions of a cov-ered work in that User Product from a modified version of its Corresponding Source. Theinformation must suffice to ensure that the continued functioning of the modified objectcode is in no case prevented or interfered with solely because modification has been made.

If you convey an object code work under this section in, or with, or specifically for usein, a User Product, and the conveying occurs as part of a transaction in which the right ofpossession and use of the User Product is transferred to the recipient in perpetuity or for afixed term (regardless of how the transaction is characterized), the Corresponding Sourceconveyed under this section must be accompanied by the Installation Information. But thisrequirement does not apply if neither you nor any third party retains the ability to installmodified object code on the User Product (for example, the work has been installed inROM).

The requirement to provide Installation Information does not include a requirement tocontinue to provide support service, warranty, or updates for a work that has been modifiedor installed by the recipient, or for the User Product in which it has been modified orinstalled. Access to a network may be denied when the modification itself materiallyand adversely affects the operation of the network or violates the rules and protocols forcommunication across the network.

Corresponding Source conveyed, and Installation Information provided, in accord withthis section must be in a format that is publicly documented (and with an implementationavailable to the public in source code form), and must require no special password or keyfor unpacking, reading or copying.

7. Additional Terms.

“Additional permissions” are terms that supplement the terms of this License by makingexceptions from one or more of its conditions. Additional permissions that are applicableto the entire Program shall be treated as though they were included in this License, to theextent that they are valid under applicable law. If additional permissions apply only to partof the Program, that part may be used separately under those permissions, but the entireProgram remains governed by this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option remove any additionalpermissions from that copy, or from any part of it. (Additional permissions may be writtento require their own removal in certain cases when you modify the work.) You may placeadditional permissions on material, added by you to a covered work, for which you haveor can give appropriate copyright permission.

5

Page 33: Xseos Manual

Notwithstanding any other provision of this License, for material you add to a coveredwork, you may (if authorized by the copyright holders of that material) supplement theterms of this License with terms:

(a) Disclaiming warranty or limiting liability differently from the terms of sections 15and 16 of this License; or

(b) Requiring preservation of specified reasonable legal notices or author attributions inthat material or in the Appropriate Legal Notices displayed by works containing it;or

(c) Prohibiting misrepresentation of the origin of that material, or requiring that modifiedversions of such material be marked in reasonable ways as different from the originalversion; or

(d) Limiting the use for publicity purposes of names of licensors or authors of the mate-rial; or

(e) Declining to grant rights under trademark law for use of some trade names, trade-marks, or service marks; or

(f) Requiring indemnification of licensors and authors of that material by anyone whoconveys the material (or modified versions of it) with contractual assumptions ofliability to the recipient, for any liability that these contractual assumptions directlyimpose on those licensors and authors.

All other non-permissive additional terms are considered “further restrictions” within themeaning of section 10. If the Program as you received it, or any part of it, contains a noticestating that it is governed by this License along with a term that is a further restriction,you may remove that term. If a license document contains a further restriction but permitsrelicensing or conveying under this License, you may add to a covered work materialgoverned by the terms of that license document, provided that the further restriction doesnot survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in therelevant source files, a statement of the additional terms that apply to those files, or anotice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separatelywritten license, or stated as exceptions; the above requirements apply either way.

8. Termination.

You may not propagate or modify a covered work except as expressly provided under thisLicense. Any attempt otherwise to propagate or modify it is void, and will automaticallyterminate your rights under this License (including any patent licenses granted under thethird paragraph of section 11).

However, if you cease all violation of this License, then your license from a particularcopyright holder is reinstated (a) provisionally, unless and until the copyright holder ex-plicitly and finally terminates your license, and (b) permanently, if the copyright holder

6

Page 34: Xseos Manual

fails to notify you of the violation by some reasonable means prior to 60 days after thecessation.

Moreover, your license from a particular copyright holder is reinstated permanently if thecopyright holder notifies you of the violation by some reasonable means, this is the firsttime you have received notice of violation of this License (for any work) from that copy-right holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of partieswho have received copies or rights from you under this License. If your rights have beenterminated and not permanently reinstated, you do not qualify to receive new licenses forthe same material under section 10.

9. Acceptance Not Required for Having Copies.

You are not required to accept this License in order to receive or run a copy of the Program.Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However,nothing other than this License grants you permission to propagate or modify any coveredwork. These actions infringe copyright if you do not accept this License. Therefore, bymodifying or propagating a covered work, you indicate your acceptance of this License todo so.

10. Automatic Licensing of Downstream Recipients.

Each time you convey a covered work, the recipient automatically receives a license fromthe original licensors, to run, modify and propagate that work, subject to this License. Youare not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or sub-stantially all assets of one, or subdividing an organization, or merging organizations. Ifpropagation of a covered work results from an entity transaction, each party to that trans-action who receives a copy of the work also receives whatever licenses to the work theparty’s predecessor in interest had or could give under the previous paragraph, plus a rightto possession of the Corresponding Source of the work from the predecessor in interest, ifthe predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmedunder this License. For example, you may not impose a license fee, royalty, or othercharge for exercise of rights granted under this License, and you may not initiate litigation(including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim isinfringed by making, using, selling, offering for sale, or importing the Program or anyportion of it.

11. Patents.

A “contributor” is a copyright holder who authorizes use under this License of the Programor a work on which the Program is based. The work thus licensed is called the contributor’s“contributor version”.

7

Page 35: Xseos Manual

A contributor’s “essential patent claims” are all patent claims owned or controlled by thecontributor, whether already acquired or hereafter acquired, that would be infringed bysome manner, permitted by this License, of making, using, or selling its contributor ver-sion, but do not include claims that would be infringed only as a consequence of furthermodification of the contributor version. For purposes of this definition, “control” includesthe right to grant patent sublicenses in a manner consistent with the requirements of thisLicense.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license un-der the contributor’s essential patent claims, to make, use, sell, offer for sale, import andotherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a “patent license” is any express agreement or com-mitment, however denominated, not to enforce a patent (such as an express permission topractice a patent or covenant not to sue for patent infringement). To “grant” such a patentlicense to a party means to make such an agreement or commitment not to enforce a patentagainst the party.

If you convey a covered work, knowingly relying on a patent license, and the Correspond-ing Source of the work is not available for anyone to copy, free of charge and under theterms of this License, through a publicly available network server or other readily accessi-ble means, then you must either (1) cause the Corresponding Source to be so available, or(2) arrange to deprive yourself of the benefit of the patent license for this particular work,or (3) arrange, in a manner consistent with the requirements of this License, to extendthe patent license to downstream recipients. “Knowingly relying” means you have actualknowledge that, but for the patent license, your conveying the covered work in a coun-try, or your recipient’s use of the covered work in a country, would infringe one or moreidentifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, orpropagate by procuring conveyance of, a covered work, and grant a patent license to someof the parties receiving the covered work authorizing them to use, propagate, modify orconvey a specific copy of the covered work, then the patent license you grant is automati-cally extended to all recipients of the covered work and works based on it.

A patent license is “discriminatory” if it does not include within the scope of its coverage,prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rightsthat are specifically granted under this License. You may not convey a covered work ifyou are a party to an arrangement with a third party that is in the business of distributingsoftware, under which you make payment to the third party based on the extent of youractivity of conveying the work, and under which the third party grants, to any of the par-ties who would receive the covered work from you, a discriminatory patent license (a) inconnection with copies of the covered work conveyed by you (or copies made from thosecopies), or (b) primarily for and in connection with specific products or compilations thatcontain the covered work, unless you entered into that arrangement, or that patent licensewas granted, prior to 28 March 2007.

8

Page 36: Xseos Manual

Nothing in this License shall be construed as excluding or limiting any implied license orother defenses to infringement that may otherwise be available to you under applicablepatent law.

12. No Surrender of Others’ Freedom.

If conditions are imposed on you (whether by court order, agreement or otherwise) thatcontradict the conditions of this License, they do not excuse you from the conditions ofthis License. If you cannot convey a covered work so as to satisfy simultaneously yourobligations under this License and any other pertinent obligations, then as a consequenceyou may not convey it at all. For example, if you agree to terms that obligate you to collecta royalty for further conveying from those to whom you convey the Program, the onlyway you could satisfy both those terms and this License would be to refrain entirely fromconveying the Program.

13. Use with the GNU Affero General Public License.

Notwithstanding any other provision of this License, you have permission to link or com-bine any covered work with a work licensed under version 3 of the GNU Affero GeneralPublic License into a single combined work, and to convey the resulting work. The termsof this License will continue to apply to the part which is the covered work, but the specialrequirements of the GNU Affero General Public License, section 13, concerning interac-tion through a network will apply to the combination as such.

14. Revised Versions of this License.

The Free Software Foundation may publish revised and/or new versions of the GNU Gen-eral Public License from time to time. Such new versions will be similar in spirit to thepresent version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that acertain numbered version of the GNU General Public License “or any later version” appliesto it, you have the option of following the terms and conditions either of that numberedversion or of any later version published by the Free Software Foundation. If the Programdoes not specify a version number of the GNU General Public License, you may chooseany version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU Gen-eral Public License can be used, that proxy’s public statement of acceptance of a versionpermanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, noadditional obligations are imposed on any author or copyright holder as a result of yourchoosing to follow a later version.

15. Disclaimer of Warranty.

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTEDBY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE

9

Page 37: Xseos Manual

COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “ASIS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRERISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITHYOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COSTOF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO INWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MOD-IFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLETO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTALOR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TOUSE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA ORDATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU ORTHIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANYOTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEENADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be givenlocal legal effect according to their terms, reviewing courts shall apply local law that mostclosely approximates an absolute waiver of all civil liability in connection with the Pro-gram, unless a warranty or assumption of liability accompanies a copy of the Program inreturn for a fee.

END OF TERMS AND CONDITIONSHow to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the pub-lic, the best way to achieve this is to make it free software which everyone can redistributeand change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the startof each source file to most effectively state the exclusion of warranty; and each file shouldhave at least the “copyright” line and a pointer to where the full notice is found.

<one line to give the program’s name and a brief idea of what it does.>Copyright (C) <year> <name of author>This program is free software: you can redistribute it and/or modify it under theterms of the GNU General Public License as published by the Free SoftwareFoundation, either version 3 of the License, or (at your option) any later version.

10

Page 38: Xseos Manual

This program is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABIL-ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU GeneralPublic License for more details.You should have received a copy of the GNU General Public License along withthis program. If not, see http://www.gnu.org/licenses/.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short notice like this when itstarts in an interactive mode:

<program> Copyright (C) <year> <name of author>This program comes with ABSOLUTELY NO WARRANTY; for details typeshow w. This is free software, and you are welcome to redistribute it undercertain conditions; type show c for details.

The hypothetical commands show w and show c should show the appropriate parts ofthe General Public License. Of course, your program’s commands might be different; fora GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, if any, to signa “copyright disclaimer” for the program, if necessary. For more information on this, andhow to apply and follow the GNU GPL, see http://www.gnu.org/licenses/.

The GNU General Public License does not permit incorporating your program into propri-etary programs. If your program is a subroutine library, you may consider it more usefulto permit linking proprietary applications with the library. If this is what you want to do,use the GNU Lesser General Public License instead of this License. But first, please readhttp://www.gnu.org/philosophy/why-not-lgpl.html.

11