Manuscrit_definitif

Download as pdf or txt
Download as pdf or txt
You are on page 1of 229

Numerical resolution of algebraic systems with

complementarity conditions. Application to the


thermodynamics of compositional multiphase mixtures
Duc Thach Son Vu

To cite this version:


Duc Thach Son Vu. Numerical resolution of algebraic systems with complementarity conditions.
Application to the thermodynamics of compositional multiphase mixtures. Numerical Analysis
[math.NA]. Université Paris-Saclay, 2020. English. �NNT : �. �tel-02965421�

HAL Id: tel-02965421


https://ifp.hal.science/tel-02965421v1
Submitted on 13 Oct 2020

HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est


archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents
entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non,
lished or not. The documents may come from émanant des établissements d’enseignement et de
teaching and research institutions in France or recherche français ou étrangers, des laboratoires
abroad, or from public or private research centers. publics ou privés.
Numerical resolution of
algebraic systems with
complementarity conditions
Application to the thermodynamics of
compositional multiphase mixtures
Thèse de doctorat de l'Université Paris-Saclay

École doctorale n° 580 (STIC)


Sciences et technologies de l'information et de la communication
Spécialité de doctorat : Mathématiques et Informatique
Unité de recherche : IFPEN, Sciences et Technologies du Numérique,
92852, Rueil-Malmaison, France
Référent : CentraleSupélec

Thèse présentée et soutenue à Rueil-Malmaison, le 7 octobre 2020, par

VU Duc Thach Son


Composition du Jury
M. Abdel LISSER
Président
Professeur des universités, Université Paris-Saclay
M. Samir ADLY
Thèse de doctorat

Rapporteur
Professeur des universités, Université de Limoges
M. Didier AUSSEL
Rapporteur
Professeur des universités, Université de Perpignan
Mme Hoai An LE THI
Examinatrice
Professeure des universités, Université de Lorraine
M. Jean-Pierre DUSSAULT
Examinateur
Professeur titulaire, Université de Sherbrooke
NNT : 2020UPASG006

M. Quang Huy TRAN


Directeur de thèse
Ingénieur de recherche, HDR, IFP Energies nouvelles
M. Mounir HADDOU
Co-Directeur de thèse
Professeur des universités, INSA Rennes
Mme Ibtihel BEN GHARBIA
Co-encadrante
Ingénieure de recherche, IFP Energies nouvelles
Acknowledgments

This thesis will never be completed without the support, encouragement, and knowledge from
many people to whom I would like to express my deep gratitude.
This work took place in the Applied Mathematics Department of IFP Energies Nouvelles.
This manuscript represents the culmination of three years very enriching, both from a scientific
and human point of view. That’s why I want in the first place to thank my three advisors
who helped me to make this experience an exceptional adventure. Without their dedication to
teaching, training, and growing me, I would not be here writing this acknowledgment.
First of all, from the bottom of my heart, my deepest gratitude goes to my thesis director Dr.
Tran Quang Huy. He guided me through the three years enthusiastically with all his meticulous,
dedication, and knowledge. I learned the way to write mathematics neatly and English usage
from all the precise hand-writing papers he wrote for me; the way to stir and then still have
an idea to escape a stuck point from all discussions with him or the way to organize my work
well from all tips he gave me. He was a guide full of ideas for me during my Ph.D. I began my
Ph.D. with many missing skills so everything even small I collected from him, I am grateful. His
optimism and psychology always help me through the difficult periods of my Ph.D. He helped
me to grow not only in my work but also in my life for the past 3 years.
I wish to express my gratitude most strongly to my thesis co-director Professor Mounir
Haddou. I appreciate all his supports from being my master’s teacher in Vietnam to becoming
my Ph.D. advisor. Although not working directly much, but all the multi-day trips working with
him in INSA Rennes always give me valuable experiences. His ideas and extensive knowledge
have helped me a lot in building and completing my work. I also greatly appreciate his close
friendship and valuable cooperation with French-Vietnam Master 2 program over the years. I
am very proud to be his first Vietnamese Ph.D. student.
I send the most special thanks to my remaining advisor Dr. Ibtihel Ben Gharbia. I especially
emphasize what I have learned in programming from her. It could just be a necessary space in
a command line, a reminder for a comment, or a name for a file. I was enlightened a lot about
programming more than when I was in college. I still remember many times when she spent
hours late debugging or patiently teaching me a new programming language to me. Her strict
times or friendly talks help me grow up a lot, I appreciate it. I am very proud of being her first
Ph.D. student.
I am also thankful to the members of the jury for my Ph.D. thesis who examined and decided
Ph.D. diploma for me, Prof. Abdel Lisser, Prof. Samir Adly, Prof. Didier Aussel, Prof. Le Thi
Hoai An, and Prof. Jean-Pierre Dussault. This manuscript was also corrected by their remarks.
I send a thank to my colleagues, especially Ph.D. students, at the IFP Energies Nouvelles.
In particular, thank Zakariae, Gouranga, Karine, Bastian, Nicolas, Henry, Arsene, Sylvie, Mani,
Julien, Riad, Sabrina, Joelle, Guissel, Alexis, Karim, Jingang.
A special mention goes to my Vietnamese friends. I cannot imagine how dull the past three

i
ii

years in France would have been without them. Thank Nguyen Van Thanh, Tran Thi Thoi, Do
Minh Hieu, Phan Tan Binh, Nguyen Viet Anh, Nguyen Tien Dat, Phung Thanh Tam, Nguyen
Thi Hoai Thuong, Ho Kieu Diem, Hoang Thi Kieu Loan, Le Tran Ngoc Tran, Tran Hoai Thuan,
Cao Van Kien, Le Minh Duy, Ngo Tri Dat, Trinh Ngoc Tu, Nguyen Manh Quan, Nguyen Thi
Thu Dieu, Cao Ngoc Yen Phuong.
Finally, I would like to express all my gratitude to my family, mom Ngo Thi Nga dad Vu
Duc Ha younger sister Vu Thach Thao Phuong, and my girlfriend, also my fiancée Tran Thi
Huong, for their unconditional encouragement and love. I always remember the midnight video
calls in Vietnam because of the 5-6 hour gap with France or the few trips back to Vietnam.
During the past three years, every day, they are the ones who listen and share with me all the
joys as well as the sorrows or pressures I went through. Here is the last place I can lean on, also
the motivation for me to move on and overcome challenges. Thank them too much for always
being behind me in this journey, and next journeys...
Cuối cùng, tôi xin gửi lời cảm ơn sâu sắc nhất đến gia đình tôi, mẹ Ngô Thị Ngà ba Vũ Đức
Hà em gái Vũ Thạch Thảo Phương, và người yêu của tôi, cũng là vợ sắp cưới Trần Thị Hương,
đã động viên và yêu thương vô điều kiện. Tôi vẫn luôn nhớ những cuộc gọi video lúc nửa đêm ở
Việt Nam vì khoảng cách 5-6 giờ với Pháp hay những chuyến trở về Việt Nam ít ỏi. Trong suốt
ba năm qua, mỗi ngày, họ đều là những người lắng nghe và chia sẻ với tôi mọi niềm vui cũng
như nỗi buồn hay áp lực mà tôi đã trải qua. Đây là nơi cuối cùng tôi có thể tựa vào, cũng là
động lực để tôi bước tiếp và vượt qua thử thách. Cảm ơn họ rất nhiều vì đã luôn ở phía sau tôi
trong hành trình này, và những hành trình tiếp theo...
Contents

1 Introduction 1
1.1 Gestion des phases d’un mélange compositionnel . . . . . . . . . . . . . . . . . . 2
1.1.1 Simulation des écoulements polyphasiques multiconstituants . . . . . . . . 2
1.1.2 Apports et revers des conditions de complémentarité . . . . . . . . . . . . 5
1.1.3 Objectifs de la thèse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Méthodes existantes pour les conditions de complémentarité . . . . . . . . . . . . 9
1.2.1 Méthodes de Newton non-lisses . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.2 Méthodes de régularisation . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Démarche, contributions et plan du mémoire . . . . . . . . . . . . . . . . . . . . 13
1.3.1 Étude du problème de l’équilibre des phases . . . . . . . . . . . . . . . . . 13
1.3.2 Analyse de convexité des lois simples et prolongement des lois cubiques . 14
1.3.3 Élaboration de la méthode des points intérieurs non-paramétrique . . . . 15
1.3.4 Comparaison numérique de plusieurs méthodes sur plusieurs modèles . . . 16

I Thermodynamic setting 17

2 Phase equilibrium for multicomponent mixtures 19


2.1 Preliminary notions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.1.1 Material balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.1.2 Chemical equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.2 Two mathematical formulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2.1 Variable-switching formulation . . . . . . . . . . . . . . . . . . . . . . . . 27
2.2.2 Unified formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3 Properties of the unified formulation . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3.1 Behavior of tangent planes . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3.2 Connection with Gibbs energy minimization . . . . . . . . . . . . . . . . . 34
2.3.3 Well-definedness of extended fractions . . . . . . . . . . . . . . . . . . . . 40
2.4 Two-phase mixtures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.4.1 The multicomponent case . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.4.2 The binary case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

3 Convexity analysis and extension of Gibbs energy functions 53


3.1 Convexity analysis for simple Gibbs functions . . . . . . . . . . . . . . . . . . . . 54
3.1.1 Henry’s law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.1.2 Margules’ law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

iii
iv Contents

3.1.3 Van Laar’s law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58


3.2 Cubic equations of state from a numerical perspective . . . . . . . . . . . . . . . 61
3.2.1 General principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.2.2 Van der Waals’ law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.2.3 Peng-Robinson’s law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.3 Domain extension for cubic EOS-based Gibbs functions . . . . . . . . . . . . . . 80
3.3.1 Trouble ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3.3.2 Direct method for binary mixture . . . . . . . . . . . . . . . . . . . . . . . 82
3.3.3 Indirect method for multicomponent mixtures . . . . . . . . . . . . . . . . 83

II Numerical methods and simulations 97

4 Existing methods for sytems with complementarity conditions 99


4.1 Background on complementarity problems . . . . . . . . . . . . . . . . . . . . . . 100
4.1.1 Classes of problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.1.2 Classes of methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
4.2 Nonsmooth approach to generalized equations . . . . . . . . . . . . . . . . . . . . 105
4.2.1 Nonsmooth Newton method . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.2.2 Semismooth Newton method . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.2.3 Newton-min method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.3 Smoothing methods for nonsmooth equations . . . . . . . . . . . . . . . . . . . . 112
4.3.1 Newton’s method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
4.3.2 Smoothing functions for complementarity conditions . . . . . . . . . . . . 119
4.3.3 Standard and modified interior-point methods . . . . . . . . . . . . . . . 124
4.4 What may go wrong? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.4.1 Issues with nonsmooth methods . . . . . . . . . . . . . . . . . . . . . . . . 133
4.4.2 Issues with smoothing methods . . . . . . . . . . . . . . . . . . . . . . . . 134

5 A new nonparametric interior-point method 137


5.1 Design principle and properties of NPIPM . . . . . . . . . . . . . . . . . . . . . . 138
5.1.1 When the parameter becomes a variable . . . . . . . . . . . . . . . . . . . 138
5.1.2 Global convergence analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 141
5.2 Regularity of zeros for the two-phase multicomponent model . . . . . . . . . . . . 145
5.2.1 A general proof for strictly convex laws . . . . . . . . . . . . . . . . . . . 146
5.2.2 A special proof for Henry’s law . . . . . . . . . . . . . . . . . . . . . . . . 153

6 Numerical experiments on various models 157


6.1 Simplified models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
6.1.1 Stratigraphic model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
6.1.2 Stationary binary model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
6.1.3 Stationary ternary model . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
6.1.4 Evolutionary binary model . . . . . . . . . . . . . . . . . . . . . . . . . . 193
6.2 Multiphase compositional model . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
6.2.1 Continuous model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
6.2.2 Discretized system and resolution . . . . . . . . . . . . . . . . . . . . . . . 200
6.2.3 Comparison of the results . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Contents v

7 Conclusion and perspectives 205


7.1 Summary of key results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
7.1.1 Theoretical aspects of the unified formulation . . . . . . . . . . . . . . . . 205
7.1.2 Practical algorithms for the numerical resolution . . . . . . . . . . . . . . 206
7.2 Recommendations for future research . . . . . . . . . . . . . . . . . . . . . . . . . 206
7.2.1 Warm start strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
7.2.2 Continuation Newton for large time-steps . . . . . . . . . . . . . . . . . . 207

Bibliography 209
Chapter 1

Introduction
Contents
1.1 Gestion des phases d’un mélange compositionnel . . . . . . . . . . . 2
1.1.1 Simulation des écoulements polyphasiques multiconstituants . . . . . . . 2
1.1.2 Apports et revers des conditions de complémentarité . . . . . . . . . . . 5
1.1.3 Objectifs de la thèse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Méthodes existantes pour les conditions de complémentarité . . . . 9
1.2.1 Méthodes de Newton non-lisses . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.2 Méthodes de régularisation . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Démarche, contributions et plan du mémoire . . . . . . . . . . . . . . 13
1.3.1 Étude du problème de l’équilibre des phases . . . . . . . . . . . . . . . . 13
1.3.2 Analyse de convexité des lois simples et prolongement des lois cubiques 14
1.3.3 Élaboration de la méthode des points intérieurs non-paramétrique . . . 15
1.3.4 Comparaison numérique de plusieurs méthodes sur plusieurs modèles . . 16

Ce chapitre présente les motivations de la thèse ainsi que les principales contributions. Il fait aussi office
de “résumé en français” requis par l’École Doctorale, d’où la différence dans la langue de rédaction avec
les autres chapitres.
Nous décrivons d’abord en §1.1 le contexte général en partant de l’application métier à l’origine du
problème, à savoir la simulation de réservoir. Nous y donnons un aperçu des modèles physiques utilisés et
de leurs difficultés mathématiques au regard de la gestion de l’apparition et de la disparition des phases.
Un accent particulier est mis sur la formulation unfiée, où l’emploi des conditions de complémentarité
permet de gagner en clarté et confort au prix de nouvelles difficultés d’ordre numérique, voire théorique
pour certaines lois thermodynamiques comme les équations d’état cubiques.
Une synthèse de l’état de l’art est ensuite fournie en §1.2 sur les méthodes de résolution numérique
des systèmes algébriques contenant des conditions de complémentarité. Celles-ci sont divisées en deux
catégories. La première comporte les méthodes non-lisses et semi-lisses dont fait partie Newton-min,
l’algorithme par défaut actuel dans les codes d’IFPEN. La seconde regroupe les méthodes de régularisation
par les θ-fonctions de lissage ainsi que les méthodes de points intérieurs.
Enfin, la dernière section §1.3 explique notre démarche et récapitule les résultats obtenus. Ce sera
également l’occasion d’exposer le plan du mémoire.

1
2 Chapter 1. Introduction

1.1 Gestion des phases d’un mélange compositionnel


1.1.1 Simulation des écoulements polyphasiques multiconstituants
La simulation de réservoir est l’art d’utiliser les techniques numériques pour prédire le comporte-
ment des écoulements de fluides dans les milieux poreux, connaissant les conditions initiales et
aux limites appropriées [8]. Née il y a plus d’un demi-siècle avec l’avènement des ordinateurs, elle
est aujourd’hui devenue une technologie mature, avec un abondant catalogue de modèles adaptés
aux différents besoins et une vaste panoplie de méthodes numériques performantes [26,28]. Jadis
dédiées à la récupération des hydrocarbures dans le sous-sol, les mêmes équations sont depuis
une décennie orientées vers des enjeux plus conformes à notre époque, comme la séquestration
du dioxide de carbone dans les aquifères salines, le stockage de gaz dans les réservoirs géologiques
ou l’enfouissement des déchets radioactifs...

Figure 1.1: Diverses options de stockage sous-terrain. c GIEC 2005

Que ce soit pour le pétrole ou pour des finalités plus modernes, une caractéristique commune
dans le cahier des charges que doit remplir un simulateur est sa capacité à traiter des cas
“réalistes” faisant intervenir des dizaines ou des centaines d’espèces chimiques différentes. Même
lorsque ces espèces ne réagissent pas entre elles, les lois régissant leur équilibre thermodynamique
font que chaque espèce — ou chaque constituant — peut se retrouver sous une ou plusieurs
phases différentes. Le concept de phase correspond grossièrement à l’intuition que nous avons
1.1. Gestion des phases d’un mélange compositionnel 3

des états de la matière (gaz, liquide, solide), mais pas toujours (par exemple, l’huile est considérée
comme phase distincte de l’eau). Les modèles qui prennent en compte cet aspect sont qualifiés
de polyphasiques compositionnels ou polyphasiques multiconstituants. Dans la hiérarchie des
modèles d’écoulement en milieu poreux, ce sont de loin les plus complexes1 .
La difficulté avec un mélange polyphasique compositionnel est que nous ne pouvons prévoir ni
où et quand une nouvelle phase va apparaı̂tre, ni où et quand une ancienne phase va disparaı̂tre.
Tout au mieux pouvons-nous poser les équations correspondant aux lois physiques considérées
et “attendre que cela se passe”. Or, la manière même de poser les équations fait débat. Pour
expliquer ce point avec précision, nous allons introduire quelques notations en vue d’écrire... des
équations. Soit (
K “ I, II, . . . , K , K ě 2, (1.1)
l’ensemble des constituants, et
P “ 1, 2, . . . , P ,
(
P ě 2, (1.2)
l’ensemble des phases virtuellement envisageables. S’il existe au moins une espèce i P K dans
la phase α P P, celle-ci est dite présente. Le sous-ensemble Γpχ, tq Ă P des phases présentes
à une position χ P R3 donnée et à un instant t P R` donné est appelé contexte. Ce dernier
dépend ainsi de l’espace et du temps. Pour chaque phase présente α P Γ, on définit les fractions
partielles xjα pour tout j P K, fonctions de pχ, tq. Celles-ci mesurent l’importance relative de
chaque constituant au sein de la phase présente α.
Considérons le modèle d’écoulement polyphasique compositionnel en milieu poreux suivant,
qui est très simpliste mais qui contient l’essence de la difficulté.

ÉTANT DONNÉS
φ, tρ˝α uαPP , tΦiα upi,αqPKˆP , tλα uαPP ,
CHERCHER
Γ Ă P, tSα uαPΓ ě 0, txiα upi,αqPKˆΓ ě 0, tuα uαPΓ , P
fonctions de pχ, tq P Dχ ˆ R` , où Dχ Ă R3 est un domaine borné, satisfaisant
• les lois de conservation massique
B ÿ ˝ ÿ
φ ρβ Sβ xiβ ` divχ ρ˝β xiβ uβ “ 0, @i P K ; (1.3a)
Bt βPΓ βPΓ

• les relations bilans


ÿ
Sβ ´ 1 “ 0, (1.3b)
βPΓ
ÿ
xjα ´ 1 “ 0, @α P Γ ; (1.3c)
jPK

• les égalités de fugacité


xiα Φiα pxα , Pq ´ xiβ Φiβ pxβ , Pq “ 0, @pi, α, βq P K ˆ Γ ˆ Γ, (1.3d)

où xα “ pxIα , . . . , xK´1
α q P RK´1 est le vecteur des fractions partielles indépendantes ;
1
bien plus que le modèle de black-oil, mieux connu du grand public mais qui n’en est qu’un cas très particulier.
4 Chapter 1. Introduction

• les lois de Darcy-Muskat


uα “ ´λα ∇χ P, @α P Γ. (1.3e)

• les conditions de Neumann homogènes sur le bord BDχ .


La quantité φ représente le champ de porosité, supposé connu en fonction de l’espace χ. Les
quantités ρ˝α représentent les densités (ou masse volumique) des phases, ici supposées constantes,
ce qui correspond à un écoulement incompressible. Il n’y a ni gravité ni capillarité (une pression
par phase) dans le modèle (1.3).
Les équations aux dérivées partielles (1.3a) expriment les lois fondamentales de conservation
de chaque constituant i P K. Ces bilans matière sont suppléés par les identités (1.3b)–(1.3c) qui
découlent de la définition des fractions partielles xiβ et des saturations Sβ , qui mesurent le taux
de présence globale des phases et qui sont des inconnues. Les égalités de fugacité (1.3d) sont
encore appelées relations d’équilibre, car traduisent l’équilibre thermodynamique pour chaque
constituant i P K à travers deux phases présentes. Les fonctions données Φiα sont les coefficients
de fugacité. Elles impliquent la pression P, qui est aussi un champ inconnu. Le gradient de
ce champ apparaı̂t dans les lois de Darcy-Muskat (1.3e) donnant empiriquement la vitesse de
filtration uα de chaque phase. Le coefficient de proportionnalité λα entre ∇χ P et uα est une
fonction donnée de la saturation Sα et de la composition partielle txiα uiPK . Elle encapsule la
perméabilité absolue, la perméabilité relative et la viscosité de la phase [26].
Si le contexte Γ est connu, on peut vérifier qu’il y a |Γ|K ` 4|Γ| ` 1 équations scalaires
pour |Γ|K ` 4|Γ| ` 1 inconnues scalaires, où |Γ| désigne le cardinal de Γ. Ceci montre que le
système (1.3) est fermé. Le plus gênant est que le contexte Γ est aussi une inconnue, fonction
de l’espace et du temps, alors qu’il n’y a pas vraiment d’équation qui permette de le déterminer
sans ambiguı̈té. C’est là qu’il faut exploiter les conditions de positivité sur Sα et xiα . Lorsqu’on
se donne une partie Γpχ, tq quelconque de P et qu’on résout le système, rien ne garantit que
les saturations et les fractions partielles sont toutes positives. Le “bon” contexte — à supposer
qu’il soit unique — est celui pour lequel Sα ě 0 et xiα ě 0 pour tout α P Γ.
La plus mauvaise méthode pour trouver Γpχ, tq serait d’essayer de manière combinatoire
tous les sous-ensembles de P. Ici, cela est tout à fait exclu puisque ce sous-ensemble dépend
des variables continues pχ, tq. Même après discrétisation en espace et en temps, le nombre de
configurations à essayer serait astronomique ! Il vaut mieux partir d’une approximation initiale
de Γpχ, tq qu’on corrige au fur et à mesure, en tenant compte des informations a priori dont on
dispose sur l’écoulement. Souvent, une approximation initiale “raisonnable” peut être obtenue
au moyen d’un flash négatif [1, 117] : on commence par supposer que toutes les phases sont
présentes, i.e., Γpχ, tq “ P ; on résout le système et détecte pour chaque pχ, tq les phases
pour lesquelles la condition de positivité est respectée et ne garde que celles-ci dans le contexte
actualisé.
Nous convenons d’appeler (1.3) la formulation en variables naturelles ou formulation de
Coats, malgré un léger abus de vocabulaire. En fait, ce que les ingénieurs entendent par “formu-
lation” n’est pas seulement un ensemble d’équations. L’usage de ce mot inclut aussi un choix de
variables primaires et d’équations primaires, par opposition aux variables secondaires qui seront
éliminées grâce aux équations secondaires. Le choix préconisé par Coats [30] est de prendre
comme inconnues primaires P, tSα uαPΓ et txiα uαPΓ et comme équations primaires (1.3a)–(1.3d).
Les inconnues secondaires uα sont éliminées soit préalablement soit au niveau du système linéaire
à l’intérieur de Newton par l’équation secondaire (1.3e). Cette étape n’est certes pas essentielle
pour notre problème cible, qui est la gestion des changements de phase. Néanmoins, il demeure
important dans les calculs pratiques parce qu’en diminuant la taille du système algébrique à
1.1. Gestion des phases d’un mélange compositionnel 5

résoudre à chaque pas de temps, il permet de réduire notablement le temps de calcul. Il ex-
iste un grand nombre d’autres formulations possibles. Une revue assez complète a été effectuée
dans [25, 116].
La formulation en variables naturelles ou de Coats est celle implantée actuellement dans
les logiciels d’IFPEN. Elle porte aussi le nom de formulation en variable switching. En effet,
le jeu d’inconnues et d’équations n’est pas fixe et doit être constamment ajusté en fonction
des changements locaux de contexte. Autrement dit, le “switching” se produit sans cesse pour
chaque maille et à chaque pas de temps selon que les hypothèses émises sur le contexte sont
violées ou non, à l’instar d’une méthode de type active set en optimisation sous contraintes. Il
se produit même d’une itération de Newton à l’autre, en cas de négativité des saturations ou des
fractions partielles, ce qui laisse de sérieux doutes au niveau théorique quant au système qu’on
veut vraiment résoudre. Au niveau informatique, cette gestion dynamique est lourde à mettre
en œuvre et consommatrice en temps de calcul. C’est là son inconvénient majeur.

1.1.2 Apports et revers des conditions de complémentarité


En 2011, une nouvelle formulation proposée par Lauser et al. [78] a retenu l’attention de la com-
munauté des numériciens en écoulements polyphasiques compositionnels. À l’aide d’une notion
de fractions partielles étendues et surtout des conditions de complémentarité, les auteurs parvi-
ennent à donner un traitement unifié aux phases présentes et absentes, d’où la dénomimation
de formulation unifiée. Voici ce que devient (1.3) dans la formulation unifiée.

ÉTANT DONNÉS
φ, tρ˝α uαPP , tΦiα upi,αqPKˆP , tλα uαPP ,

CHERCHER
tSα uαPP , tξαi upi,αqPKˆP , tuα uαPP , P

fonctions de pχ, tq P R3 ˆ R` satisfaisant

• les lois de conservation massique

B ÿ ˝ ÿ
φ ρβ Sβ ξβi ` divχ ρ˝β ξβi uβ “ 0, @i P K ; (1.4a)
Bt βPP βPP

• la conservation du volume ÿ
Sβ ´ 1 “ 0 ; (1.4b)
βPP

• les égalités de fugacité étendue

ξαi Φiα pxα , Pq ´ ξβi Φiβ pxβ , Pq “ 0, @pi, α, βq P K ˆ P ˆ P, (1.4c)

où les composantes de xα “ pxIα , . . . , xαK´1 q P RK´1 sont définies comme

ξαi
xiα “ ř j
; (1.4d)
jPK ξα
6 Chapter 1. Introduction

• les conditions de complémentarité


ˆ ÿ j˙
min Sβ , 1 ´ ξβ “ 0, @β P P ; (1.4e)
jPK

• les lois de Darcy-Muskat


uα “ ´λα ∇χ P, @α P P. (1.4f)

Les fractions partielles xiα , auparavant définies seulement pour les phases présentes α P Γ, sont
désormais remplacées par les fractions étendues ξαi , définies pour toutes les phases α P P. Le
contexte Γ s’est totalement éclipsé du nouveau système. Si l’on veut le retrouver a posteriori, il
suffit de chercher les phases α telles que Sα ą 0. Dans les relations d’équilibre étendues (1.4c),
notons que le premier argument du coefficient de fugacité Φiα doit être le vecteur des fractions
étendues renormalisées par (1.4d), de sorte que les xiα ainsi calculés jouent encore le rôle de
fractions partielles “classiques”.
La véritable nouveauté réside dans les conditions de complémentarité (1.4e), qui expriment
au fond que ˆ
ÿ j ÿ j˙
Sβ ě 0, 1´ ξβ ě 0, Sβ 1 ´ ξβ “ 0, (1.5a)
jPK jPK

ce qui peut encore s’écrire plus savamment comme


ÿ j
0 ď Sβ K 1 ´ ξβ ě 0. (1.5b)
jPK

Autrement dit, au moins l’une des deux quantités est nulle tandis que l’autre doit garder le
signe positif. Concrètement, si Sβ ą 0, à savoir si la phase β est présente, alors nécessairement
ř j i i
jPK ξβ “ 1. Il en résulte par (1.4c) que ξβ “ xβ , c’est-à-dire que les fractions étendues de la
phase coı̈ncident avec les fractions partielles classiques. Si Sβ “ 0, à savoir si la phase β est
absente, on a a priori jPK ξβj ď 1. Dans le sous-cas jPK ξβj ă 1, on parle d’absence stricte
ř ř

pour la phase β. Dans le sous-cas contraire, si jPK ξβj “ 1, on a affaire à un point de transition
ř

qui marque la frontière entre la présence et l’absence de la phase β.


La formulation unifiée présente l’énorme avantage de travailler avec un jeu fixe d’équations
et d’inconnues. Indiscutablement, ce confort est non-négligeable pour l’implémentation pratique.
Sur le plan théorique, le cadre semble aussi plus satisfaisant, dans la mesure où les changements
de phase sont automatiquement pris en charge par les conditions de complémentarité, ce qui
évite entre autres d’avoir à recourir au flash négatif. Il en va ainsi dans de nombreux domaines,
notamment en mécanique et en électronique [2], où les conditions de complémentarité s’imposent
comme la façon la plus efficace pour exprimer un va-et-vient entre deux régimes de fonction-
nement possibles pour un système. Un exemple récent à IFPEN où les conditions de complémen-
tarité ont apporté une réelle avancée concerne la modélisation stratigraphique [102, 103]. Nous
en étudierons un modèle très réduit en tant que banc d’essai pour nos méthodes numériques.
Plusieurs équipes se sont intéressées à la formulation unifiée pour les écoulements polypha-
siques compositionnels. Outre l’Université de Stuttgart où l’idée a pris naissance, on peut citer
Inria avec les travaux doctoraux de Ben Gharbia [11, 17] sur des lois de fugacité relativement
simples, l’Université de Nice avec les travaux de Masson et ses co-auteurs [9,86,87] sur des lois de
fugacité également simples mais en évoluant vers des modèles non-isothermes avec couplage. De
1.1. Gestion des phases d’un mélange compositionnel 7

son côté, IFPEN s’est attaché à réaliser des comparaisons entre la formulation de Coats et celle de
Lauser sur des cas d’écoulements réalistes, utilisant des coefficients de fugacité associés à des lois
d’état cubiques [12, 13, 84, 101]. Ces comparaisons visent d’abord à valider les résultats obtenus
par la formulation unifiée, puis à jauger de sa performance du point de vue de la robustesse
(qui se manifeste notamment par la convergence de l’algorithme de résolution numérique). On
observe qu’en cas de convergence pour la formulation unifiée, le temps de calcul est nettement
meilleur, le facteur de gain se situant entre 3 et 10.
La thermodynamique serait-elle une nouvelle terre de conquête pour les conditions de com-
plémentarité ? Nous n’en sommes pas encore là. Si les premiers succès sont prometteurs, ils
s’accompagnent aussi d’un certain nombre de défauts mis en évidence lors des travaux précités.
Le premier est imputable à la non-différentiabilité des conditions de complémentarité, ce qui
empêche l’accès à la méthode de Newton classique. Bien entendu, on peut employer une variante
de Newton avec une notion plus faible pour la matrice jacobienne. En l’occurrence, compte tenu
de la fonction min pour exprimer la complémentarité (1.4e), c’est naturellement vers la méthode
de Newton-min [3, 72] que se sont tournées toutes les équipes précédentes. Les détails de la
méthode seront données en §1.2.1 et §4.2.3. Pour le moment, faisons le constat que sur certains
cas difficiles, par exemple quand le pas de temps est trop grand, Newton-min souffre d’un
phénomène de cyclage : les itérés oscillent de manière périodique entre quelques états, souvent
deux ou trois. Cette pathologie s’explique directement à partir de la discontinuité des dérivées sur
des exemples “jouets”, comme en §4.4. En somme, à moins de disposer d’une meilleure méthode
de résolution du système en formulation unifiée, on n’a fait que reporter la difficulté du problème
de départ sur les épaules du solveur non-linéaire.
En marge de cette obstruction générique, commune à tous les systèmes non-différentiables,
le déploiement de la formulation unifiée (1.4) se heurte également à un obstacle plus subtil,
spécifique à certaines lois de fugacité pourtant couramment utilisées en thermodynamique. À
vrai dire, nous n’en étions pas conscients au début et ne l’avons découvert que suite aux nombreux
“plantages” du code. Mais il est utile de l’évoquer ici afin de compléter le tableau des difficultés.
Soit

Ω “ x “ pxI , . . . , xK´1 q P RK´1 | xI ą 0, . . . , xK´1 ą 0, 1 ´ xI ´ . . . ´ xK´1 ą 0


(
(1.6)

le domaine du vecteur des fractions partielles indépendantes et considérons les mélanges dipha-
siques, où les phases de P “ tG, Lu sont le gaz et le liquide. Dans la famille des équations d’état
cubiques, les coefficients de fugacité ΦiG pxq et ΦiL pxq — pour alléger, on omet la dépendance par
rapport à la pression P — sont définies par l’intermédiaire d’une équation du troisième degré.
Prenons l’exemple de la loi de Van der Waals, où cette équation s’écrit

Z 3 pxq ´ rBpxq ` 1sZ 2 pxq ` ApxqZpxq ´ ApxqBpxq “ 0, (1.7)

où les fonctions Ap¨q, Bp¨q sont données. Lorsque l’équation admet trois racines réelles, on les
nomme
ZL pxq ď ZI pxq ď ZG pxq.
Cette définition de ZG p¨q et ZL p¨q permet de calculer les coefficients de fugacité par

Bpxq ` ∇x Bpxq ¨ pδ i ´ xq
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs
Bpxq
Bpxq ` ∇x Bpxq ¨ pδ i ´ xq 2Apxq ` ∇x Apxq ¨ pδ i ´ xq Apxq
„ 
` ´ , (1.8)
Bpxq Apxq Zα pxq
8 Chapter 1. Introduction

pour i P K et α P tG, Lu, où les composantes de δ i “ pδi,I , . . . , δi,K´1 q sont des symboles de
Kronecker. Malheureusement, la région des x P Ω où la cubique (1.7) possède trois racines réelles
ne couvre pas tout Ω. Elle n’en est qu’une modeste partie. Dans le reste de Ω, soit on ne peut
définir que ZL pxq mais pas ZG pxq, soit vice-versa. Par conséquent, lorsqu’on décrète une égalité
de type
i i
ξG ΦG pxG q ´ ξLi ΦiL pxL q “ 0, (1.9)
deux scénarios peuvent grosso modo se produire. Si les deux phases sont présentes, chaque
vecteur xα se trouve dans le domaine de définition de Zα et des Φiα . Les deux fugacités étendues
au premier membre sont bien définies et l’on peut espérer l’existence d’une solution. Si l’une des
phase est absente, disons G, alors seul xL se trouve dans le domaine de définition de ZL et la
valeur de ξLi ΦiL pxL q peut ne pas se trouver dans l’ensemble image de ξG i Φi px q. Dans ce cas, il
G G
n’y a pas de solution au système. Pour tenter de satisfaire l’égalité, il faudra faire sortir xG du
domaine de ZG , ce qui ne pourra se faire sans un prolongement de la fonction ΦiG .
L’explication que nous venons de faire s’appuie sur les coefficients de fugacité dans le but
d’être la plus courte possible. En §3.3.1, un éclairage supplémentaire sera fourni en termes
de fonctions de Gibbs et de leurs gradients, qui sont des grandeurs plus fondamentales et qui
permettront d’approfondir notre compréhension de cette difficulté.
Il peut être soutenu que le même défaut des lois cubiques devrait causer le même préjudice à
la formulation en variables naturelles. Il n’en est rien. Dans la formulation de Coats, si le contexte
est correctement deviné, nous n’avons pas besoin de calculer quoi que ce soit en rapport avec la
phase évanescente. En l’absence d’une phase, l’équation (1.9) n’existe pas dans le système et le
problème ci-dessus n’est pas pertinent. Si le contexte est mal deviné, nous avons la possibilité de
nous rattraper en changeant le contexte. La formulation en variables naturelles n’a pas à aller
chercher l’information là où celle-ci n’existe pas. La formulation unifiée s’inflige cette mission
impossible, de par sa vocation — ou sa prétention — à traiter toutes les phases sur un pied
d’égalité.
Nous avons dit plus haut qu’une “formulation” vient avec un choix de variables primaires et
d’équations primaires. Dans la formulation de Lauser, les variables primaires sont P, tSα uαPP ,
tϕi uiPK , où ϕi est la valeur commune de la fugacité étendue de l’espèce i à travers les phases.
Les fractions étendues ξαi sont alors prééliminées par l’inversion du système local K ˆ K
ξαi Φiα pxα q “ ϕi , i P K, (1.10)
dans chaque phase α. Pour les mêmes raisons qu’avant, à cause de la construction par équation
d’état cubique des Φiα , α P tG, Lu, le système (1.10) n’a pas toujours de solution pour tout
ϕ “ pϕI , . . . , ϕK q. Les essais numériques de [84, 101] corroborent cette remarque.

1.1.3 Objectifs de la thèse


En dépit de ces deux difficultés majeures, nous avons la conviction que la formulation unifiée
présente un fort potentiel pour améliorer la performance des simulateurs d’écoulement polypha-
sique compositionnel. En soi, formuler de manière unifiée le problème au niveau continu est déjà
un progrès considérable. Il serait dommage de s’arrêter en si bon chemin. Pour “transformer
l’essai” et aller au bout de l’intérêt de la formulation unifiée, nous devons relever deux défis :
1. Mettre au point une méthode de résolution numérique des systèmes d’équations contenant
des conditions de complémentarité, en remplacement de Newton-min. La nouvelle méthode
doit avoir une meilleure garantie de convergence et être aussi robuste que possible par
rapport aux paramètres du problème, ainsi qu’au point initial.
1.2. Méthodes existantes pour les conditions de complémentarité 9

2. Mettre en place des remèdes éventuellement ad hoc pour contourner la difficulté inhérente
aux équations d’état cubiques, indépendamment de toute méthode numérique de réso-
lution. Le cas échéant, préciser les conditions mathématiques favorables à l’existence et
l’unicité d’une solution dans la formulation unifiée.

Sur le deuxième objectif, il n’y a à notre connaissance aucun travail antérieur, la difficulté
ayant été identifiée “en cours de route”. Sur le premier objectif, en revanche, il y a une volumineuse
littérature.

1.2 Méthodes existantes pour les conditions de complémentar-


ité
Après discrétisation de (1.4) par un schéma Euler implicite en temps et un schéma de type
volumes finis en espace sur un domaine borné muni de conditions aux limites appropriées, nous
devons résoudre à chaque pas de temps un système de la forme

ΛpXq “ 0, (1.11a)
minpGpXq, HpXqq “ 0, (1.11b)

dans laquelle X P Rn est l’inconnue et Λ : D Ă R` Ñ R`´m , G : D Ă R` Ñ Rm et H : D Ă


R` Ñ Rm sont des fonctions continûment différentiables sur le domaine ouvert D. Rappelons
que la fonction min dans (1.11b), qui agit composante par composante, n’est qu’une astuce
algébrique commode pour exprimer la complémentarité

0 ď GpXq K HpXq ě 0.

Pour être encore plus concis, posons


„ 
ΛpXq
F pXq “ P R` , (1.12a)
minpGpXq, HpXqq

de sorte que le système à résoudre devient

F pXq “ 0, (1.12b)

où F n’est pas différentiable partout. Nous distinguons deux catégories de méthodes pour la
résolution de (1.12), que nous passons rapidement en revue ci-après en faisant référence au
chapitre §4 pour de plus amples détails.

1.2.1 Méthodes de Newton non-lisses


Pour une fonction F continûment différentiable, la méthode de Newton

X k`1 “ X k ´ r∇F pX k qs´1 F pX k q (1.13)

correspond à la recherche d’un zéro du modèle d’approximation locale

X s ` ∇F pX k qpX
s ÞÑ F pXq s ´ Xkq (1.14)
10 Chapter 1. Introduction

au voisinage de X k . Il existe une théorie de Newton non-lisse [47, §7.2] qui généralise le modèle
local (1.14) en un schéma d’approximation de Newton
s ÞÑ F pX k q ` T pX k , X
X s ´ X k q, (1.15)
où chaque T pX, ¨q provient d’un ensemble T pXq soumis à des conditions techniques [Définition
4.5] qui garantissent le caractère bien défini et la convergence locale [Théorème 4.2] à taux
quadratique [Théorème 4.3] de l’algorithme généralisé [Algorithme 4.1]. Le lecteur trouvera les
énoncés précis de cette théorie en §4.2.1. En réalité, cette théorie de Newton non-lisse est avant
tout un cadre opérationnel abstrait qui ne donne pas lieu à un algorithme concret. On ne
demande même pas que T pX k , ¨q soit linéaire !
Pour avoir un objet plus “palpable”, il faut se restreindre aux fonctions F lipschitziennes
pour lesquelles on peut définir la sous-différentielle de Bouligand BB F et celle de Clarke BF
[Définition 4.7], qui est l’enveloppe convexe de la première. Cela ouvre la voie à l’approximation
locale linéaire
X s ` M k pX
s ÞÑ F pXq s ´ Xkq (1.16)
où M k P BF pX k q. Cependant, on ne peut vérifier les hypothèses techniques du cadre non-lisse
[Définition 4.5] que pour une sous-classes de fonctions lipschitziennes, définies alors [Définition
4.8] comme les fonctions semi-lisses [92, 105]. Dans ce cas, on parle de méthode de Newton
semi-lisse [Algorithme 4.2], avec le caractère bien défini [Théorèmes 4.4] et les bons résultats de
convergence [Théorème 4.5]. Là encore, les énoncés précis se trouvent en §4.2.2.
Un cas particulier important d’algorithme semi-lisse est la méthode de Newton-min [Algo-
rithm 4.3]. Dans le cas du système (1.12), il est en effet possible de montrer [Proposition 4.2]
que les matrices de BB F pXq sont de la forme
„ 
∇ΛpXq
M“ , { P Rmˆ` ,
∇ (1.17a)

{

dans laquelle la α-ième ligne de ∇


{ pour α P t1, . . . , mu est
$
& ∇Gα pXq
’ if Gα pXq ă Hα pXq,

{ α “ ∇Gα pXq or ∇Hα pXq if Gα pXq “ Hα pXq, (1.17b)

∇Hα pXq if Gα pXq ą Hα pXq.
%

Les défauts de la méthode Newton-min ont été soulignés en §1.1.2. Ils ont été également formal-
isés dans [11, 14]. Un autre inconvénient avec Newton-min est qu’il est difficile de le “globaliser”
par une recherche linéaire afin d’atteindre un comportement globalement convergent.

1.2.2 Méthodes de régularisation


À l’opposé des méthodes non-lisses ou semi-lisses, les méthodes de régularisation tentent d’abord
de lisser la fonction F , ce qui introduit un paramètre de régularisation qu’il faudra faire tendre
vers 0. Une régularisation de F est la donnée d’une famille de fonctions
Frp¨; νq : D Ă R` Ñ R` , ν ą 0
(
(1.18)

telle que : (i) Frp¨; νq soit continûment différentiable en X pour tout ν ą 0 ; (ii) Frp¨; νq soit
continue par rapport à ν, selon un certain sens fonctionnel ; (iii) limνÓ0 Frp¨; νq “ F p¨q, toujours
selon un certain sens fonctionnel. À partir d’une valeur courante pour le couple pX k , ν k q, la
stratégie consiste à :
1.2. Méthodes existantes pour les conditions de complémentarité 11

1. Résoudre FrpX k`1 ; ν k q “ 0 en l’inconnue X k`1 par la méthode de Newton classique,


utilisant X k comme point initial. Très souvent, pour gagner en temps de calcul, on ne fait
qu’une seule itération de Newton.

2. Diminuer le paramètre de régularisation de ν k à ν k`1 à l’aide d’une règle heuristique.


Recommencer jusqu’à ce que F pX k`1 q “ 0.

Parmi les nombreuses régularisations possibles d’une condition de complémentarité

0 ď v K w ě 0, (1.19)

où v et w sont des scalaires, celles utilisant les θ-fonctions sont particulièrement élégantes. Elles
consistent à traduire d’abord (1.19) sous l’une des formes équivalentes [Lemmes 4.2 et 4.3]

v ě 0, w ě 0, Spvq ` Spwq ď 1 (1.20a)

ou
v ě 0, w ě 0, Spvq ` Spwq “ Spv ` wq, (1.20b)
dans lesquelles #
0 if t “ 0,
Sptq “ (1.21)
1 if t ą 0.
est la fonction saut2 . Ensuite, on approche (1.20a)–(1.20b) par

v ě 0, w ě 0, θν pvq ` θν pwq “ 1 (1.22a)

ou
v ě 0, w ě 0, θν pvq ` θν pwq “ θν pv ` wq, (1.22b)
en utilisant ˆ ˙
t
θν ptq :“ θ , ν ą 0, (1.23)
ν
comme régularisation de S, obtenue par contraction d’une fonction “père” θ : R` Ñ r0, 1q
continue, croissante, concave et vérifiant [Définition 4.11]

θp0q “ 0, lim θptq “ 1. (1.24)


tÑ`8

Initiée par Haddou et ses co-auteurs [7, 55], l’approximation de la complémentarité par les θ-
fonctions ont trouvé un usage polyvalent dans de nombreux problèmes appliqués [19, 56, 57,
93]. En pratique, pour appliquer cette régularisation au problème (1.12), il est recommandé
d’introduire les variables d’écart V “ GpXq et W “ HpXq avant de considérer le système
régularisé

ΛpXq “ 0, (1.25a)
GpXq ´ V “ 0, (1.25b)
HpXq ´ W “ 0, (1.25c)
ν rθν pV q ` θν pW q ´ 1s “ 0. (1.25d)
2
step function en anglais.
12 Chapter 1. Introduction

Dans la dernière équation, la fonction θ agit composante par composante, tandis que la prémul-
tiplication par ν sert à prévenir l’explosion les dérivées lorsque ν Ó 0.
Les méthodes de points intérieurs [54, 118], réputées pour leur grande efficacité en program-
mation linéaire grâce notamment à leur complexité polynomiale, peuvent s’interpréter comme des
méthodes de régularisation. Nous nous intéressons plus particulièrement aux méthodes primales-
duales [119], dans lesquelles les variables primales (inconnues de départ) et duales (multiplica-
teurs de Lagrange) jouissent du même statut. Lorsqu’on décortique une méthode de points
intérieurs de type primal-dual, on s’aperçoit qu’il s’agit au fond d’une méthode de résolution du
système algébrique des conditions d’optimalité de Karush-Kuhn-Tucker (KKT). Le fait que ce
système provient d’un problème de minimisation sous contraintes d’inégalité compte finalement
peu dans la méthode. Cela laisse donc entrevoir la perspective de transposer ces méthodes au
cas d’un système général contenant des conditions de complémentarité.
Le problème de départ (1.12) est remplacé par la suite des problèmes régularisés

ΛpXq “ 0, (1.26a)
GpXq ´ V “ 0, (1.26b)
HpXq ´ W “ 0, (1.26c)
V d W ´ ν1 “ 0, (1.26d)

où d désigne le produit composante par composante et 1 P Rm est le vecteur dont toutes les
composantes sont égales à 1. De manière plus concise, ce problème s’écrit

FpX ; νq “ 0, (1.27a)

avec » fi
» fi ΛpXq
X — GpXq ´ V ffi
X “ V fl P R``2m ,
– FpX ; νq “ —
– HpXq ´ W fl P R
ffi ``2m
. (1.27b)
W
V d W ´ ν1
La méthode génère alors une suite Xk “ pX k , V k , W k q ainsi qu’une suite auxiliaire ν k ą 0 telles
que
pX k , V k , W k q Ñ pX,
s GpXq,
s HpXqq, s ν k Ñ 0,
où Xs est un zéro de F . De surcroı̂t, la première suite doit satisfaire la condition de stricte
positivité
V k ą 0, W k ą 0,
pour tout k ě 0.
De ce principe général, plusieurs méthodes peuvent être déduites. La plus simple est celle dite
à un pas [Algorithme 4.5], dont l’esprit est fidèle à celui des méthodes de régularisation : on fait
une itération de Newton à ν k fixé pour trouver X k`1 , puis on met à jour ν k`1 “à la louche” selon
l’une des règles empiriques (4.77) ou une autre. Une méthode plus sophistiquée, qui comporte
deux étapes [Algorithme 4.6], est inspirée de l’algorithme de Mehrotra [88], référence incon-
tournable en optimisation. Dans cet algorithme, le paramètre ν k est toujours égal à la mesure de
centralité xV k , W k y{m de l’itéré courant, où x¨, ¨y désigne le produit scalaire. À la première étape,
surnommée prédicteur, on fait fi de ν k et cherche à atteindre immédiatement la cible ultime, qui
correspond à ν “ 0, en faisant un pas de Newton (4.78) puis en tronquant la direction obtenue
pour respecter la positivité. Quelle que soit l’issue de cette tentative audacieuse, un facteur de
1.3. Démarche, contributions et plan du mémoire 13

recentrage σ k est évalué par l’heuristique (4.82) afin de viser l’objectif mieux adapté ν “ σ k ν k
dans la seconde étape, appelée correcteur. Ce facteur d’adaptation σ k est un ingrédient essentiel
de l’algorithme. La dernière étape incorpore également une correction du second ordre dans les
équations dans le but de gagner en précision et se termine par une autre troncature, toujours en
vue de rester dans le domaine strictement intérieur.

1.3 Démarche, contributions et plan du mémoire


Dans cette thèse, nous avons pris le parti de nous focaliser sur le sous-problème de l’équilibre des
phases, extrait d’un modèle d’écoulement complet comme (1.4). L’avantage d’étudier d’abord
ce sous-problème est qu’il est plus petit et qu’il ne dépend pas de pχ, tq. En escamotant ainsi
l’écoulement, on peut mieux se concentrer sur la thermodynamique pure. Une fois les difficultés
appréhendées et résolues, nous reviendrons bien entendu au modèle d’écoulement complet dans
les simulations numériques.

1.3.1 Étude du problème de l’équilibre des phases


Les deux premières sections du chapitre §2 introduisent ce sous-problème de l’équilibre des
phases, de manière délibérément indépendante du modèle d’écoulement complet retenu puisqu’il
peut y en avoir plusieurs. Montrons ici le lien entre le sous-problème de l’équilibre de phases et
le modèle (1.4). Soit ÿ
ρ“ ρ˝α Sα (1.28)
αPP

la densité totale. Définissons les fractions de phase


ρ˝β Sβ
Yβ “ , β P P, (1.29)
ρ
ainsi que les compositions
1 ÿ ˝
ci “ ρ Sβ ξβi , i P K. (1.30)
ρ βPP β

Il est alors facile de voir que ces deux types de fractions sont reliées par la relation bilan
ÿ
ci “ Yβ ξβi , @i P K. (1.31)
βPP

D’autre part, à cause de (1.29) et comme ρ˝β {ρ ą 0, la condition de complémentarité (1.4e)


équivaut encore à ˆ ÿ j˙
min Yβ , 1 ´ ξβ “ 0, @β P P. (1.32)
jPK

Les relations (1.31), (1.32) auxquelles se joignent les relations d’équilibre étendues (1.4c) forment
un système qui n’est autre que la formulation unifiée (2.37)–(2.39) du problème de l’équilibre
des phases. La scission avec le modèle complet d’écoulement est réalisée en considérant que les
compositions tci uiPK ainsi que la pression P sont données.
La section §2.3 regroupe plusieurs résultats originaux concernant la formulation unifiée du
problème de l’équilibre des phases. Ces résultats s’expriment le plus naturellement lorsqu’on
utilise les fonctions d’énergie de Gibbs, dont le rôle central est ainsi mis en exergue.
14 Chapter 1. Introduction

• En §2.3.1, nous montrons qu’elle permet de retrouver rigoureusement le critère du plan


tangent [Théorème 2.1], certes connu des physiciens mais dont la démonstration dans les
ouvrages de thermodynamique suit un cheminement tout à fait différent.

• En §2.3.2, nous mettons en avant un lien fort et jusqu’à présent méconnu entre la formu-
lation unifiée et la minimisation d’une énergie de Gibbs modifiée du mélange, exprimée
directement en fonction des fractions étendues [Théorèmes 2.3 et 2.4]. Il n’y a pas équiva-
lence parfaite, mais nous prouvons que la formulation unifiée correspond à un choix pour
les fractions des phases absentes parmi une infinité possible de minimiseurs. Ce choix est
de surcroı̂t naturel, puisqu’il est obtenu par limite continue de solutions dans lesquelles les
phases sont présentes.

• En §2.3.3, nous émettons des hypothèses raisonnables [Hypothèses 2.2] afin d’assurer
l’existence et l’unicité des fractions étendues dans deux configurations particulières mais
importantes. Elles requièrent notamment la stricte convexité des fonctions de Gibbs et
seront indispensables pour la suite des développements théoriques.

À partir de la section §2.4, nous nous restreignons à un mélange diphasique. En §2.4.1, nous
définissons deux notions de dégénérescence pour les solutions, à savoir les points de transition et
les points azéotropiques, qui seront exclues plus tard des théorèmes. En §2.4.2, nous examinons
le cas particulier d’un mélange binaire (à deux composantes), pour lequel nous démontrons
l’existence et l’unicité d’une solution pour la formulation unifiée.

1.3.2 Analyse de convexité des lois simples et prolongement des lois cubiques
Le chapitre §3 pousse plus loin l’étude du problème de l’équilibre des phases en prenant en
compte l’expression explicite de quelques lois physiques spécifiques habituellement utilisées par
la fonction d’énergie de Gibbs. La première section §3.1 s’intéresse à la question de savoir si les
Hypothèses 2.2 sont satisfaites pour certaines lois simples. La réponse est positive incondition-
nellement pour la loi de Henry [Proposition 3.1], conditionnellement pour les lois de Margules
[Proposition 3.2] et Van Laar [Proposition 3.3]. Pour ces dernières, nous déterminons la région
dans l’espace des paramètres pour laquelle la fonction de Gibbs associée est strictement convexe.
Les lois d’état cubiques, très prisées par les ingénieurs réservoir pour leur précision, font
l’objet de la section §3.2. Comme cela est rappelé en §3.2.1, leur construction passe par une
équation du troisième degré dépendant de deux paramètres. Nous examinons plus en profondeur
la loi de Van der Waals en §3.2.2 et celle de Peng-Robinson en §3.2.3. Pour chaque loi,

• nous donnons l’expression des coefficients de fugacité pour une loi de mélange générale
[Théorèmes 3.1 et 3.4] en supposant que la racine de l’équation cubique correspondant à
la phase considérée existe ;

• nous élucidons le comportement de l’équation cubique en fonction de la criticité des


paramètres [Théorèmes 3.2 et 3.5], à partir de quoi nous énonçons les règles permettant
d’attribuer une phase à une racine [Définitions 3.2 et 3.3] en régime sous-critique ;

• nous identifions dans le plan des paramètres la frontière entre la zone à une racine réelle
et celle à trois racines réelles [Théorèmes 3.3 et 3.6], ce qui sera extrêmement utile pour la
suite.
1.3. Démarche, contributions et plan du mémoire 15

Le troisième point est tout à fait nouveau. Le matériel des deux premiers points existe plus
ou moins dans les livres de thermodynamique, mais nous en avons cherché des démonstrations
plus rigoureuses. Ceci nous a conduit notamment à déterminer la valeur exacte des paramètres
critiques de Peng-Robinson, dont la littérature ne donne en général que des approximations
décimales.
Vu la complexité des lois cubiques, la question de la stricte convexité des fonctions de Gibbs
associées ne sera guère abordée. À la place, nous examinons dans la section §3.3 une question
plus urgente et plus vitale concernant la limitation des domaines de définition des fonctions
de Gibbs. En effet, comme expliqué rapidement en §1.1.2 et repris pas à pas en §3.3.1, cette
particularité des lois d’état cubiques est un handicap sérieux pour la formulation unifiée, car elle
est susceptible de mettre en défaut l’existence d’une solution quand l’une des phases est absente.
Nous proposons d’y remédier en prolongeant les fonctions de Gibbs à tout le domaine des
fractions par deux méthodes. La première, dite directe et détaillée en §3.3.2, est trop intimement
liée au cas binaire et se généralise difficilement au cas d’un nombre quelconque d’espèces. La
seconde, dite indirecte et développée en §3.3.3, manipule les racines au lieu des fractions et s’avère
mieux adaptée au cas multicompositionnel. L’idée de base est que quand la cubique n’a qu’une
seule racine réelle associée à une certaine phase, on peut utiliser la partie réelle (commune) des
deux autres racines complexes (conjuguées) comme “racine” associée à l’autre phase. En envoyant
cette valeur dans les formules de la fonction de Gibbs, on obtient un prolongement continu. Cette
stratégie, justifiée par des propriétés favorables [Lemmes 3.4 et 3.5], donne d’excellents résultats
numériques.

1.3.3 Élaboration de la méthode des points intérieurs non-paramétrique


Les méthodes de régularisation évoquées en §1.2.2 et détaillées en §4.3 sont séduisantes sur le
papier et donnent d’ailleurs des résultats acceptables la plupart du temps. Elles ont toutes néan-
moins un défaut en commun : il n’y pas de recette miracle pour piloter la suite des paramètres de
régularisation ν k vers 0. Une règle heuristique qui fonctionne bien sur un problème peut échouer
piteusement sur un autre. L’utilisateur doit essayer plusieurs suites ν k avant de savoir laquelle
convient le mieux à son problème.
Ce constat nous incite à concevoir en §5.1 une nouvelle méthode, appelée nonparametric
interior-point method (NPIPM), dans laquelle la mise à jour de ν est “automatique” et cou-
plée avec celle des inconnues X “ pX, V, W q. Pour cela, nous devons accomplir une nouvelle
“unification”, cette fois entre X et ν. Concrètement, on pose
„  „ 
X “ ν , F pX q “ 1 kV ´ k2 ` 1 kW ´ k2 ` ην ` ν 2 ,
X FpX ; νq
(1.33a)
2 2

où η ą 0 est un petit paramètre fixé une fois pour toutes et


m
ÿ m
ÿ
kV ´ k2 “ min2 pVα , 0q, kW ´ k2 “ min2 pWα , 0q, (1.33b)
α“1 α“1

et on cherche à résoudre
F pX q “ 0. (1.34)
La construction de s νsq de F tel que νs ą ´η{2 vérifie
F est faite de sorte que tout zéro Xs “ pX,
νs “ 0, FpX
s ; 0q “ 0, V ´ “ W ´ “ 0.
16 Chapter 1. Introduction

Comme expliqué en détail en §5.1.1, la raison d’être du terme linéaire ην dans la dernière
équation est d’éviter une racine double en νs “ 0 et d’assurer ainsi une convergence quadratique.
Puisque F est différentiable, on peut appliquer la méthode de Newton classique

X k`1 “ X k ´ r∇F pX k qs´1 F pX k q, (1.35)

combinée avec une recherche linéaire de type Armijo pour tenter d’assurer une convergence
globale [Algorithm 5.1]. La théorie de convergence globale à laquelle nous faisons appel, due
à Bonnans [21], est rappelée en §5.1.2. Elle repose de manière essentielle sur l’hypothèse de
régularité du zéro, par laquelle on entend que la matrice jacobienne ∇F pX s q est non-singulière.
En application de cette théorie, nous nous attachons en §5.2 à vérifier la régularité des zéros
du problème de l’équilibre des phases pour un mélange diphasique compositionnel en formulation
unifiée. Notre résultat principal [Théorème 5.3], acquis au prix de laborieuses transformations de
déterminants, est que sous l’hypothèse de stricte convexité des fonctions de Gibbs, toute solution
du problème est régulière à l’exception des points transitionnels et des points azéotropiques. En
marge de la preuve générale en §5.2.1, nous indiquons également une démonstration plus courte
pour le cas des lois de Henry en §5.2.2.

1.3.4 Comparaison numérique de plusieurs méthodes sur plusieurs modèles


Le chapitre §6 relate enfin les expériences numériques que nous avons menées sur plusieurs
modèles physiques avec conditions de complémentarité en utilisant plusieurs méthodes numéri-
ques. Les quatre premiers modèles, traités en §6.1, sont considérés comme “simples” du fait du
faible nombre d’équations et d’inconnues. Le premier d’entre eux, en §6.1.1, ne relève pas de la
thermodynamique mais de la géologie, et plus exactement de la stratigraphie dont nous avons
eu un aperçu en §4.4. Les deux suivants, en §6.1.2–§6.1.3, correspondent au modèle (2.77) pour
l’équilibre d’un mélange diphasique respectivement binaire (à deux constituants) et ternaire (à
trois constituants). Le dernier de la série des modèles “simples”, en §6.1.4, est une variante du
modèle binaire avec une évolution temporelle imposée à la composition c et où la valeur du
pas de temps ∆t influe sur la raideur du système à résoudre. C’est un avant-goût du modèle
“complet” (6.42).
En ce qui concerne les méthodes numériques, nous procédons de la manière suivante. En
partant du premier modèle, nous essayons toutes les méthodes envisagées. Si une méthode ne
donne pas de résultat satisfaisant, elle est éliminée de la liste. Nous passons alors au modèle
suivant et essayons les méthodes qui restent. Ainsi de suite...
La deuxième section §6.2 porte sur un modèle d’écoulement “complet” dont nous présentons
seulement les équations algébriques et aux dérivées partielles au niveau continu, la discrétisation
spatiale par un schéma de volumes finis étant longue et pouvant être consultée par ailleurs.
Ce modèle est loin d’être le plus réaliste : il manque plusieurs effets physiques importants
comme la gravité et la capillarité (différence de pression entre les deux phases). Néanmoins, il
est suffisamment complexe pour créer des difficultés à Newton-min et NPIPM. Contrairement
aux cas simples où NPIPM surpasse sans conteste Newton-min, ici la situation est plus délicate.
Il y a certes quelques scénarios pour lesquels NPIPM converge sans que Newton-min ne le
fasse. Mais en général, l’amélioration apportée par NPIPM est faible et parfois NPIPM peut
faire légèrement moins bien en nombre d’itérations. Nous avançons quelques explications à ces
observations en considérant la spécificité des problèmes d’évolution au regard de l’initialisation
des algorithmes.
Part I

Thermodynamic setting

17
Chapter 2

Phase equilibrium for


multicomponent mixtures
Contents
2.1 Preliminary notions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.1.1 Material balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.1.2 Chemical equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.2 Two mathematical formulations . . . . . . . . . . . . . . . . . . . . . . 27
2.2.1 Variable-switching formulation . . . . . . . . . . . . . . . . . . . . . . . 27
2.2.2 Unified formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3 Properties of the unified formulation . . . . . . . . . . . . . . . . . . 31
2.3.1 Behavior of tangent planes . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.3.2 Connection with Gibbs energy minimization . . . . . . . . . . . . . . . . 34
2.3.3 Well-definedness of extended fractions . . . . . . . . . . . . . . . . . . . 40
2.4 Two-phase mixtures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.4.1 The multicomponent case . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.4.2 The binary case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Nous exposons le problème de l’équilibre des phases pour un mélange polyphasique compositionnel, dont
la résolution numérique constitue la motivation de cette thèse. Par rapport aux présentations usuelles en
thermodynamique, la nôtre se focalise sur les vraies inconnues que sont les fractions de phase et d’espèce,
omettant souvent d’indiquer les grandeurs fixées que sont la pression et la température.
Après rappel de quelques notions préliminaires en §2.1, nous introduisons en §2.2 deux formula-
tions pour ce problème. La première, dite formulation naturelle, fait appel à une gestion dynamique des
variables. La seconde, appelée formulation unifiée, permet de travailler avec un jeu fixe d’inconnues et
d’équations au moyen des conditions de complémentarité. Nous établissons en §2.3 quelques propriétés
originales de la formulation unifiée, en particulier sa relation avec la minimisation de l’énergie de Gibbs.
En nous restreignant ensuite au cadre diphasique en §2.4, nous donnons la forme définitive au modèle
à résoudre numériquement dans cette thèse. Nous examinons le cas particulier des mélanges à deux
constituants, pour lesquels nous mettons en avant quelques propriétés supplémentaires, notamment la
construction géométrique par Gibbs de la solution exacte, que nous redémontrons rigoureusement à partir
de la formulation unifiée.

19
20 Chapter 2. Phase equilibrium for multicomponent mixtures

2.1 Preliminary notions


We start by reviewing some prerequisites on the thermodynamics of multiphase multicomponent
mixtures. This also gives us the opportunity to introduce the mathematical notations that will
be used throughout this manuscript.

2.1.1 Material balance


2.1.1.1 Species, phases and context
A multicomponent mixture is a physical system consisting of several chemically distinct com-
ponents or species. Such a system arises in many real-life applications such as transport of
hydrocarbons or subsurface energy storage, where the components may be, for instance, hydro-
gen pH2 q, water pH2 Oq, carbon dioxide pCO2 q, methane pCH4 q... To think of the mixture in a
more abstract way, let us designate by
(
K “ I, II, . . . , K , K ě 2, (2.1)

the set of its species, labeled by Roman numerals. The total number of components K “ |K|
usually ranges from tens to hundreds, so that sometimes partial aggregation or lumping is
necessary to reduce complexity.
Each component i P K may be present under one or many phases, hence the denomination
of multiphase multicomponent mixtures. Intuitively, a phase is more or less a state of matter,
e.g., gas pGq, liquid pLq, oil pOq, solid pSq... However, this notion is more subtle, especially at
high pressure [39]. Again, to lay down an abstract framework, let us consider

P “ 1, 2, . . . , P ,
(
P ě 2, (2.2)

the set of all virtually possible phases, labeled by Arabic numerals. The choice of P within a
model is the (difficult) task of physicists: P should be large enough to take into account the
appearance of new phases in models with time evolution, but not too large for computations to
remain feasible. Most commonly, the maximum number of possible phases P “ |P| is about 3
in IFPEN’s simulations.
Let niα ě 0 be the number of moles1 of component i P K existing under phase α P P. Then,
ÿ
nα “ niα (2.3)
iPK

is the number moles of matter within phase α. If nα “ 0, the phase α is said to be absent.
Indeed, it does not exist. If nα ą 0, the phase α is said to be present. The subset of present
phases, namely,
Γ “ tα P P | nα ą 0u Ă P (2.4)

is referred to as the context. Since the statement of the phase equilibrium problem in this chapter
is static and local, the context seems to share the same features. Nevertheless, in flow models
where the niα ’s vary in time and space, the context also depends on time and space.
1
A mole of substance is defined as exactly 6.02214076 ¨ 1023 particles (atoms, molecules, ions, electrons), the
latter number being the Avogadro constant.
2.1. Preliminary notions 21

2.1.1.2 Phasic, partial and global fractions


By summing (2.3) over the phases, we obtain
ÿ ÿ ÿ
n“ nα “ niα (2.5)
αPP αPP iPK

as the total number of moles of matter in the mixture. Naturally, it is assumed that n ą 0;
otherwise, the system is empty. This allows us to define the phasic fraction
nα nα
Yα “ “ř P r0, 1s (2.6)
n βPP nβ

of phase α P P. Thus, the phase can be characterized as absent or present depending on whether
Yα “ 0 or Yα ą 0. Of course, ÿ
Yα “ 1. (2.7)
αPΓ
If a phase α is present, that is, nα ą 0 or equivalently Yα ą 0, then it is possible to define
niα ni
xiα “ “ ř α j P r0, 1s (2.8)
nα jPK nα

as the partial fraction of component i P K within phase α P Γ. From definition (2.8), it follows
that ÿ
xiα “ 1 (2.9)
iPK
for all α P Γ. Note that this notion does not make sense for an absent phase α R Γ, at least
from a quick inspection of (2.8), which gives rise to the indeterminate form 0{0. Surprisingly,
the unified formulation of §2.2.2 will enable us to assign a well-defined value to xiα even for a
vanishing phase, subject to some technical conditions. This will be done in §2.3.3.
By reversing the order of summation in (2.5), we have
ÿ ÿ ÿ
n“ niα “ ni , (2.10)
iPK αPP iPK

where the newly defined quantity ÿ


ni “ niα (2.11)
αPP
represents the total number of moles of component i across all phases. Then,
ni ni
ci “ “ř j
P r0, 1s (2.12)
n jPK n

is called the global fraction of component i inside the mixture. Needless to say,
ÿ
ci “ 1. (2.13)
iPK

By dividing (2.11) by n, restricting summation in the right-hand sides to present phases and
artificially inserting nα in each summand, we end up with
ÿ
ci “ Yα xiα . (2.14)
αPΓ
22 Chapter 2. Phase equilibrium for multicomponent mixtures

Given the context Γ, the phasic fractions tYα uαPΓ and the partial fractions txiα upi,αqPKˆP , it
is straightforward to calculate the global composition tci uiPK by (2.14). The phase equilibrium
problem takes exactly the opposite direction: given the global composition tci uiPK satisfying
(2.13), is it possible to find the context Γ, the phasic fractions tYα uαPΓ and the partial fractions
txiα upi,αqPKˆP satisfying (2.7), (2.9) and (2.14) beside positivity? Obviously, we do not have
enough equations yet. The missing ones are addressed below.

2.1.2 Chemical equilibrium


2.1.2.1 Gibbs energy, chemical potential and Gibbs-Duhem conditions
The behavior of each phase α P P is governed by a single fundamental function

Gα : RK
` ÑR

known as the Gibbs free energy of the phase. The Gibbs energy is the Legendre-conjugate of
the internal energy with respect to volume and entropy [115], which makes it a function of the
number of moles, the pressure and the temperature. Therefore, it is well suited to the study of
systems at fixed pressure and temperature2 . We require Gα to be as smooth as necessary.
With respect to the number of moles, this function must be extensive. This actually means
that it must be homogeneous of degree 1, i.e.,

Gα pλnIα , λnII K I II K
α , . . . , λnα q “ λGα pnα , nα , . . . , nα q, for all λ ą 0. (2.15)

Then, Euler’s homogeneous function theorem —derived by differentiating (2.15) with respect to
λ and by putting λ “ 1 in the result— asserts that
ÿ BGα
Gα pnIα , nII K
α , . . . , nα q “ njα pnIα , nII K
α , . . . , nα q. (2.16)
jPK Bnjα

Furthermore, the functions


BGα
µjα “ (2.17)
Bnjα
can be shown to be homogeneous of degree 0, i.e.,

µjα pλnIα , λnII K j I II K


α , . . . , λnα q “ µα pnα , nα , . . . , nα q, for all λ ą 0. (2.18)

Each function µjα is the chemical potential of component j P K within phase α P P. Note that
Gα and the µjα ’s are defined for all phases, present or absent, since here the niα ’s are dummy
arguments.
Differentiating the Euler relation
ÿ
Gα “ niα µiα (2.19)
iPK

with respect to njα yields


ÿ ÿ Bµiα
µjα “ δj,i µiα ` niα ,
iPK iPK Bnjα
2
This is also why we shall not explicitly write down the dependency of the Gibbs energy with respect to the
pressure P and the temperature T.
2.1. Preliminary notions 23

from which it is deduced that


ÿ Bµiα
niα “ 0, for all j P K. (2.20)
iPK Bnjα

Identity (2.20), called the Gibbs-Duhem condition, can be regarded as a compatibility require-
ment to be prescribed on K given 0-homogeneous functions µiα so that they can correctly play
the role of chemical potentials for a bona fide Gibbs energy function.
We now wish to express (2.19)–(2.20) in terms of the partial fractions xiα defined in (2.8).
Again, since we are interested in functional relationships, we can put aside our concerns about
an absent phase and carry out calculations for all phases α P P. Plugging
1
λ“

into (2.15) and (2.18) results in

Gα pnIα , nII K I II K
α , . . . , nα q “ nα Gα pxα , xα , . . . , xα q, (2.21a)
µiα pnIα , nII
α, ..., nK
αq “ µiα pxIα , xII
α, ..., xK
α q. (2.21b)

Because of (2.9), the quantities xIα , xII K


α , . . . , xα are not independent. We select the first K ´ 1
partial fractions
xα “ pxIα , . . . , xαK´1 q P Ω Ă RK´1
as independent variables. Whenever a xK
α turns up in any formula, it should be interpreted as

xK I K´1
α “ 1 ´ xα ´ . . . ´ xα .

The domain of xα is the closure of

Ω “ x “ pxI , . . . , xK´1 q P RK´1 | xI ą 0, . . . , xK´1 ą 0, 1 ´ xI ´ . . . ´ xK´1 ą 0 ,


(
(2.22a)

namely,

Ω “ x “ pxI , . . . , xK´1 q P RK´1 | xI ě 0, . . . , xK´1 ě 0, 1 ´ xI ´ . . . ´ xK´1 ě 0 .


(
(2.22b)

Although this choice somehow breaks the symmetry, it is commonly resorted to in practice.
Introduce for each phase α the intensive or molar Gibbs energy and chemical potentials

gα : Ω Ñ R, µiα : Ω Ñ R,

defined as

gα pxα q “ Gα pxIα , xII K


α , . . . , xα q, (2.23a)
µiα pxα q “ µiα pxIα , xII
α, ..., xK
α q, (2.23b)

In (2.23b), we have slightly abused notation by reusing the same symbol µiα in the left-hand
side. We require gα and µiα to be as smooth as necessary over Ω. Moreover, gα is assumed to be
extendable by continuity to the closure Ω, but not the µiα ’s which usually blow up on BΩ.
The following statement summarizes some identities between gα and µiα that would be most
helpful in the sequel.
24 Chapter 2. Phase equilibrium for multicomponent mixtures

Lemma 2.1 (Connection between molar Gibbs energy and chemical potentials). For all xα P Ω:
1. The molar Gibbs energy is related to the chemical potentials by
K
ÿ
gα pxα q “ xiα µiα pxα q. (2.24a)
i“I

2. Each chemical potential can be deduced from the molar Gibbs energy by

µjα pxα q “ gα pxα q ` ∇xα gα pxα q ¨ pδ j ´ xα q, for all j P K, (2.24b)

where the Kronecker vector δ i is defined as δ j “ pδj,1 , δj,2 , . . . , δj,K´1 q P RK´1 .


3. The gradient of the molar Gibbs energy is given from the chemical potentials by
Bgα
pxα q “ µjα pxα q ´ µK
α pxα q, for all j P KztKu. (2.24c)
Bxjα

4. The gradients of the chemical potentials satisfy the Gibbs-Duhem condition


K
ÿ
xiα ∇xα µiα pxα q “ 0. (2.24d)
i“I

Chứng minh. To prove (2.24a), we just have to divide (2.19) by nα and to make use of (2.23).
From definition (2.17), we have
K´1
B ÿ Bgα Bxiα
µjα pxα q “ pnα gα pxα qq “ gα pxα q ` nα pxα q
Bnjα i“I
Bxiα Bnjα
for j P K. But
Bxiα niα δi,j nα ´ niα δj,i ´ xiα
ˆ ˙
B
“ “ “ .
Bnjα Bnjα nα pnα q2 nα
Plugging this into the previous equation yields
K´1
ÿ Bgα
µjα pxα q “ gα pxα q ` pδj,i ´ xiα q pxα q,
i“I
Bxiα

of which (2.24b) is just a condensed vector form. Let us now subtract the last potential

µK K
α pxα q “ gα pxα q ` ∇gα pxα q ¨ pδ ´ xα q

from each µjα , j P KztKu, given by (2.24b). This cancels out gα pxα q and xα . Since δ K “
p0, 0, . . . , 0q, we are left with (2.24c). To derive the Gibbs-Duhem condition (2.24d), we start
from (2.24a) and differentiate both sides with respect to xjα , j P KztKu. This leads to
K´1
ÿ ˆ i
˙ K
Bgα i i Bµα K K Bµα
“ δ µ
j,i α ` x α ´ µα ` xα ,
Bxjα i“I Bxjα Bxjα
j
the minus sign in the right-hand side being due to BxK
α {Bxα “ ´1. This can rearranged as

K
Bgα ÿ Bµiα
“ µjα ´ µK
α ` xiα .
Bxjα i“I Bxjα
2.1. Preliminary notions 25

By virtue of (2.24c), the sum in the right-hand side above must vanish. In other words,
K
ÿ Bµiα
xiα pxα q “ 0, for all j P tI, . . . , K ´ 1u, (2.25)
i“I Bxjα

which is the component-wise version of (2.24d).

2.1.2.2 Equilibrium conditions, fugacity and fugacity coefficient


In a multicomponent mixture without any chemical reaction (also called non-reactive), the pres-
ence of two phases pα, βq P Γ ˆ Γ implies that some equilibrium conditions must be achieved.
According to thermodynamics, these conditions are the equalities across the two phases of pres-
sure, temperature, and the chemical potentials corresponding to each component i P K. In other
words,
µiα pxα q “ µiβ pxβ q, for all pi, α, βq P K ˆ Γ ˆ Γ. (2.26)
These are the missing equations for the phase equilibrium problem. Since pressure and temper-
ature are identical across the phases α and β, we can keep omitting them as arguments of the
µi ’s in (2.26).
For a solid phase, µiα is a constant. For fluid phases such as gas, liquid and oil, the chemical
potential takes the form
µiα pxα q “ lnpxiα Φiα pxα qq, (2.27)
in which Φiα is called the fugacity coefficient of component i in phase α. Note, however, that it
depends on the partial concentrations of the other components as well. As for the quantity

fαi pxα q “ xiα Φiα pxα q, (2.28)

it is known as the fugacity of component i in phase α. The equality of chemical potentials (2.26)
is then equivalent to that of fugacities

xiα Φiα pxα q “ xiβ Φiβ pxβ q, for all pi, α, βq P K ˆ Γ ˆ Γ. (2.29)

In practice, the fugacity coefficients Φiα are given empirically or inferred from an equation of
state. This will be elaborated on in chapter §3.
Remark 2.1. In physics textbooks, chemical potentials and fugacities are defined as

piα pxα , P, Tq “ µ
µ pi‚ pP, Tq ` RT lnpxiα Φiα pxα , P, Tqq, (2.30a)
fpi pxα , P, Tq “ xi Φi pxα , P, TqP,
α α α (2.30b)

where P is the pressure, T the temperature, R the universal gas constant and µi‚ pP, Tq a reference
ideal value. Since P and T are equal across the phases, they drop out from the equality of chemical
potentials and we have the equivalence

piα pxα , P, Tq “ µ
µ piβ pxβ , P, Tq ô µiα pxα q “ µiβ pxβ q.

The form (2.27) has the advantage of highlighting the influence of partial fractions at fixed
pP, Tq. Opting for (2.27)–(2.28) instead of keeping (2.30) amounts to working with the molar
Gibbs energy function gα instead of
ÿ
gpα pxα , P, Tq “ pi‚ pP, Tqxiα ` RTgα pxα q.
µ
iPK
26 Chapter 2. Phase equilibrium for multicomponent mixtures

The two functions differ from each other by an additive affine function and a multiplicative
constant.

Substituting the form (2.27) into (2.24a), we obtain

K
ÿ K
ÿ
gα pxα q “ xiα ln xiα ` xiα ln Φiα pxα q (2.31)
i“I i“I

řK j j
The first sum in the right-hand side, j“I xα ln xα , is called the ideal part. The second sum,
denoted by
K
ÿ
Ψα pxα q “ xiα ln Φiα pxα q, (2.32)
i“I

is called the excess part or the excess Gibbs energy. In this perspective, a fluid phase α is
assimilated to a “perturbation” of the ideal gas. Whenever we want to modify the Gibbs function,
we should act only on the excess part. We shall adopt this point of view in chapter §3.
Owing to the regularity assumptions made on gα and µiα , the functions

Ψα : Ω Ñ R, ln Φiα : Ω Ñ R,

are also as smooth as necessary, with Ψα extendable by continuity to Ω but not the ln Φiα ’s. The
very useful relations between Ψα and ln Φiα are similar to those between gα and µiα .

Lemma 2.2 (Connection between molar excess Gibbs energy and logarithm of fugacity coeffi-
cients). For all xα P Ω:

1. Each fugacity coefficient can be deduced from the excess Gibbs energy by

ln Φjα pxα q “ Ψα pxα q ` ∇xα Ψα pxα q ¨ pδ j ´ xα q, for all j P K, (2.33a)

where the Kronecker vector δ i is defined as δ j “ pδj,1 , δj,2 , . . . , δj,K´1 q P RK´1 .

2. The gradient of the excess Gibbs energy is given from the fugacity coefficents by

BΨα
pxα q “ ln Φjα pxα q ´ ln ΦK
α pxα q, for all j P KztKu. (2.33b)
Bxjα

3. The gradients of the fugacity coefficents satisfy the Gibbs-Duhem condition


K
ÿ
xiα ∇xα tln Φiα upxα q “ 0. (2.33c)
i“I

Chứng minh. The proof is straightforward. For each identity from Lemma 2.1, we just have to
separate the ideal part from the excess part. The ideal part vanishes trivially.

A given family of positive real-valued functions tΦiα upi,αqPKˆP is said to be admissible if, for
each α P P, there exists a Gibbs energy function gα such that they are the fugacity coefficients.
This implies, in particular, that the functions Φiα satisfy the Gibbs-Duhem condition (2.33c).
2.2. Two mathematical formulations 27

2.2 Two mathematical formulations


Equipped with the preliminary notions and notations of §2.1, we are now in a position to
rigorously state the phase equilibrium problem in two different ways: the “traditional” one and
the “modern” one.

2.2.1 Variable-switching formulation


Let us write down a first formulation before commenting on it.

GIVEN
K, P, tΦiα upi,αqPKˆP admissible,
tci uiPK P r0, 1s subject to iPK ci “ 1,
ř

FIND
Γ Ă P, tYα uαPΓ P p0, 1s, txiα upi,αqPKˆΓ P r0, 1s
so as to satisfy
• the material balances
ÿ
Yβ ´ 1 “ 0, (2.34a)
βPΓ
ÿ
xjα ´ 1 “ 0, @α P Γ, (2.34b)
jPK
ÿ
Yβ xiβ ´ ci “ 0, @i P K; (2.34c)
βPΓ

• the fugacity equalities


xiα Φiα pxα q ´ xiβ Φiβ pxβ q “ 0, @pi, α, βq P K ˆ Γ ˆ Γ. (2.35)

This first formulation has the advantage of being “natural,” insofar as it uses the variables
that have been introduced so far. It also bears the name of natural variable formulation. The
price to be paid for naturality is that the context Γ is itself an unknown. To circumvent this
major difficulty, we have to start by making an “educated guess” for Γ. At every fixed Γ, we
attempt to solve the algebraic equations (2.34)–(2.35): this is what physicists call a flash —or
a pP, Tq-flash to be more accurate in our case. After exiting the flash, we check the positivity
of Yα and the non-negativity of xiα , for α P Γ. Should one of these fractions have the wrong
sign, we must update Γ in some “smart” way and go for another flash! The number of unknowns
and equations for a flash (2.34)–(2.35), as well as their significance, strongly depend on the
assumption currently made about the context Γ. Understandably, this approach is also qualified
as the variable-switching formulation.
Remark 2.2. Another reason for calling it this way is that in most multiphase multicomponent
flow models of interest, there are many (coupled) equilibrium problems to be solved: one per
cell and per time-step. Since even the correct context changes in space and in time, the size and
the structure of the global system to be solved at each time-step keeps evolving. The choice of
relevant unknowns and equations then turns out to be delicate. To this end, Coats [30] advocated
a set of “natural” variables for some multiphase flow models in porous media. But the heart of
Coats’ strategy, when boiled down to a single phase equilibrium problem, is exactly what we
described above.
28 Chapter 2. Phase equilibrium for multicomponent mixtures

At first sight, there seems to be a lot redundancy in (2.34)–(2.35). A natural question to ask
is how many independent equations we do have for a given Γ, and whether or not this number
is equal to that of the unknowns in the same context.
Proposition 2.1. For a fixed context Γ P P, system (2.34)–(2.35) contains pK ` 1qγ unknowns
and pK ` 1qγ a priori independent equations, where K “ |K| and γ “ |Γ|.
Chứng minh. There are γ unknowns tYα uαPΓ and Kγ unknowns txiα upi,αqPKˆΓ . Hence, the num-
ber of unknowns is γ ` Kγ “ pK ` 1qγ.
It can be observed that by summing (2.34c) over i P K, permuting the ř order of the double
sum and invoking (2.34b), we obtain (2.34a) thanks to the assumption iPK ci “ 1. Thus,
equation (2.34a) can be obtained from the remaining ones and should be left out of the system.
To eliminate redundancy in the fugacity equalities, we fix a phase β P Γ and require (2.35) to
hold for all α P Γztβu. The resulting system
ÿ
xjα ´ 1 “ 0, @α P Γ, (2.36a)
jPK
ÿ
Yβ xiβ ´ ci “ 0, @i P K; (2.36b)
βPΓ

xiα Φiα pxα q ´ xiβ Φiβ pxβ q “ 0, @pi, αq P K ˆ Γztβu, (2.36c)

plainly contains
γ ` K ` Kpγ ´ 1q “ pK ` 1qγ
equations. The independance of the fugacity equalities (2.36c) is a hypothesis to be made on the
physical properties of the species.

There is a vast literature on numerical methods [89–91, 117] for the flash problem (2.36)
at fixed Γ. In addition to the classical and generic Newton-Raphson method [6, 115], many
special purpose algorithms have been dedicated to the flash problem. These are iterative methods
based on various kinds of substitution [61], the most famous of them being the Rachford-Rice
substitution [106]. Regarding the update of the context Γ, it is recommended to start with the
highest number of possible phases, i.e., Γ “ P. In case of failure, one of the phases whose phasic
fraction has the wrong sign is taken out. The procedure continues until a flash is successful or
until there remains a single phase. There exist many variants [23, 75] to this general philosophy.

2.2.2 Unified formulation


To avoid the annoyance of dynamically handling the context, Lauser et al. [78] put forward an
alternate formulation for the phase equilibrium problem. Let us write it down before commenting
on its advantages.

GIVEN
K, P, tΦiα upi,αqPKˆP admissible,
tci uiPK P r0, 1s subject to iPK ci “ 1,
ř

FIND
tYα uαPP P p0, 1s, tξαi upi,αqPKˆP P r0, 1s
so as to satisfy
2.2. Two mathematical formulations 29

• the material balances


ÿ
Yβ ´ 1 “ 0, (2.37a)
βPP
ÿ
Yβ ξβi ´ ci “ 0, @i P K; (2.37b)
βPP

• the extended fugacity equalities

ξαi Φiα pxα q ´ ξβi Φiβ pxβ q “ 0, @pi, α, βq P K ˆ P ˆ P, (2.38a)

where the components of xα “ pxIα , . . . , xαK´1 q P RK´1 are defined as

ξαi
xiα “ ř j
; (2.38b)
jPK ξα

• the complementarity conditions


ˆ ÿ j˙
min Yβ , 1 ´ ξβ “ 0, @β P P. (2.39)
jPK

In this second formulation, the partial fractions xiα have been replaced by a new notion, that
of extended fractions ξαi . The latter are defined over pi, αq P K ˆ P instead of being restricted
to pi, αq P K ˆ Γ. Although the connection between extended fractions and partial fractions is
given by the renormalization (2.38b), the xiα ’s here are merely auxiliary variables that can be
eliminated by inserting (2.38b) into (2.38a). The complementarity conditions (2.39) means that,
for each β P P, ˆ
ÿ j ÿ j˙
Yβ ě 0, 1´ ξβ ě 0, Yβ 1 ´ ξβ “ 0. (2.40)
jPK jPK

As a consequence, for each phase β P P, there are three possible regimes:

B Yβ ą 0.
Phase β is present. This implies jPK ξβj “ 1 and by virtue of (2.38b), ξβi “ xiβ for all
ř
i P K. In other words, the extended fractions corresponding to a present phase coincide
with the usual partial fractions.
ř j
B 1´ jPK ξβ ą 0.
This entails Yβ “ 0, i.e., phase β is absent. Since jPK ξβj ă 1, we have ξβi ‰ xiβ . The
ř
extended fractions corresponding to an absent phase do not coincide in general with the
usual partial fractions (barring from the exception below).

B Yβ “ 0 and 1 ´ jPK ξβj “ 0.


ř
This happens at the frontier between those solutions for which phase β is present and those
solutions for which phase β is absent. At such a transition point, phase β starts appearing
or disappearing.
30 Chapter 2. Phase equilibrium for multicomponent mixtures

It is legitimate to be concerned about the origin of the sign condition 1 ´ jPK ξβj ě 0.
ř
After all, it seems to bring a new piece of information that was clearly not included in the
variable-switching formulation (2.34)–(2.35). As will be proven in §2.3.1, this condition ensures
a stability property known as the tangent plane criterion by physicists. It can also be related to
the minimization of the Gibbs energy of the mixture, as will be done in §2.3.2.
The ability of the formulation (2.37)–(2.39) to deal with all possible configurations (arising
from the presence or the absence of each phase) in the same manner accounts for the name of
unified formulation. The context Γ no longer appears in the statement of the problem. It can be
determined a posteriori by collecting those phases α for which Yα ą 0. The unified formulation
has turned an intricate combinatorial problem into a fixed set of equations and unknowns, with
which it is definitely more convenient to work with. Let us clarify the number of unknowns and
independent equations of (2.37)–(2.39).

Proposition 2.2. System (2.37)–(2.39) contains pK ` 1qP unknowns and pK ` 1qP a priori
independent equations, where K “ |K| and P “ |P|.

Chứng minh. There are P unknowns tYα uαPP and KP unknowns tξαi upi,αqPKˆP . Hence, the
number of unknowns is P ` KP “ pK ` 1qP .
It can be observed that by summing (2.37b) over i P K, permuting the order of the double
sum, we obtain ÿ ÿ ÿ
Yβ ξβi ´ ci “ 0. (2.41)
βPP iPK iPK

By virtue of the third part of (2.40), which results from the complementarity condtions (2.39),
we have ÿ
Yβ ξβi “ Yβ .
iPK

ci
ř
Then, with the help of iPK “ 1, equation(2.41) becomes
ÿ
Yβ ´ 1 “ 0,
βPP

which is none other than (2.37a). The latter equation is therefore redundant and should be left
out of the system. To eliminate redundancy in the extended fugacity equalities, we fix a phase
β P P and require (2.38a) to hold for all α P Pztβu. The resulting system
ÿ
Yβ ξβi ´ ci “ 0, @i P K; (2.42a)
βPP

ξα Φα pxα q ´ ξβi Φiβ pxβ q


i i
“ 0, @pi, αq P K ˆ Pztβu, (2.42b)
ˆ ÿ j˙
min Yβ , 1 ´ ξβ “ 0, @β P P, (2.42c)
jPK

in which the xiα ’s are seen as functions of the ξαi ’s by means of (2.38b), contains

K ` KpP ´ 1q ` P “ pK ` 1qP

equations. The independance of the extended fugacity equalities (2.42b) is a hypothesis to be


made on the physical properties of the species.
2.3. Properties of the unified formulation 31

Remark 2.3. To solve (2.42) in practice, Lauser et al. [77, 78] advocated using the common
values tϕi uiPK of extended fugacity across phases as main unknowns. This gives rise to a two-
level algorithm. In the inner level, we solve P nonlinear systems of size K ˆ K

ξαi Φiα pxα q “ ϕi , @i P K, (2.43)

one for each α P P. These local inversions express the extended fractions as implicit functions
ξαi pϕq of the extended fugacity vector ϕ “ pϕI , . . . ϕK q P RK
` . In the outer level, we solve one
nonlinear system of size pK ` P q ˆ pK ` P q consisting of the remaining equations
i i
ř
βPP Yβ ξβ pϕq ´ c “ 0, @i P K, (2.44a)
j
@β P P.
` ř ˘
min Yβ , 1 ´ jPK ξβ pϕq “ 0, (2.44b)

This approach, the interest of which is to involve only “small” systems, was followed by subse-
quent works at IFPEN [12, 13, 84, 101]. The difficulty, however, lies in the computation of the
gradients of the ξαi ’s with respect to ϕ, which are necessary for solving (2.44) via the Newton
method. Analytically or numerically, these gradient evaluations are expensive. In view of this
previous experience, we have preferred to tackle (2.42) in a more direct way.

2.3 Properties of the unified formulation


The unified formulation enjoys many remarkable properties that seem to be unknown so far, at
least to our knowledge. In particular, it achieves a deep connection with some classical results
in thermodynamics. In this section, we are going to carefully derive these properties.

2.3.1 Behavior of tangent planes


Valuable insights can be gained by transforming the extended fugacity equalities (2.38a) into
another form, the geometric significance of which is clearer. Before doing so, let us set the scene
by introducing some concepts and notations. Recall that

Ω “ x “ pxI , . . . , xK´1 q P RK´1 | xI ě 0, . . . , xK´1 ě 0, 1 ´ xI ´ . . . ´ xK´1 ě 0


(

defined in (2.22b), is the domain of the (renormalized) partial fractions. In Ω ˆ R, the generic
element is denoted by px, yq. To each molar Gibbs energy function gα : Ω Ñ R, we associate its
graph (
Gα “ px, yq P Ω ˆ R | y “ gα pxq . (2.45)
Note that we have not specified the phase subscript for the variable x, since we intend to visualize
several graphs on the same domain. For an interior point xα P Ω, we designate by Txα Gα the
tangent hyperplane to Gα at xα . This tangent hyperplane, which exists thanks to the regularity
assumptions on gα , is the graph of the affine function Txα gα : RK´1 Ñ R defined as

Txα gα pxq “ gα pxα q ` ∇x gα pxα q ¨ px ´ xα q. (2.46)

In general, Txα gα and Txα Gα cannot be defined in this way for xα P BΩ, as ∇x gα pxα q blows up.
Although the existence of a solution to the unified formulation (2.37)–(2.39) is not yet guar-
s α P Ω for all α P P
anteed, let us assume that ptYsα uαPP , tξsαi qpi,αqPKˆP q is a solution satisfying x
and let us try to learn as much as we can about it.
32 Chapter 2. Phase equilibrium for multicomponent mixtures

Theorem 2.1. For any pair pα, βq P P ˆ P of phases, present or absent:

1. The K potentials in phase β are equal to their counterparts in phase α shifted by a same
constant. More specifically, for all j P K,

µjβ ps
xβ q “ µjα ps
xα q ` rln σ
sα ´ ln σ
sβ s, (2.47a)

where ÿ
σ
sα “ ξsαi . (2.47b)
iPK

2. The two tangents hyperplanes Txs α Gα and Txs β Gβ are parallel. More accurately, there holds
the equality of gradients
∇x gα ps
xα q “ ∇x gβ ps
xβ q. (2.47c)

Chứng minh. For each phase α P P, let us define σα as in (2.47b), so that for all j P K, we have

ξsαj “ σ sjα
sα x

in view of the normalization (2.38b). The extended fugacity equalities (2.38a) then become

σ sjα Φjα ps
sα x sjβ Φjβ ps
sβ x
xα q “ σ xβ q. (2.48)

Taking the natural logarithm of both sides and recalling definition (2.27) of the fugacity coeffi-
cient, we obtain
sα ` µjα ps
ln σ sβ ` µjβ ps
xα q “ ln σ xβ q. (2.49)
From this, we deduce (2.47a). Subtracting the last equality

sα ` µK
ln σ sβ ` µK
xα q “ ln σ
α ps xβ q.
β ps

from (2.49) and recalling (2.24c) [Lemma 2.1], we have

Bgα Bgβ
j
xα q “ j ps
ps xβ q
Bx Bx
for all j P tI, II, . . . , K ´ 1u. This completes the proof for (2.47c).

The first part of Theorem 2.1 indicates that, in general, there is no equality of chemical
potentials, computed using the renormalized partial fractions. Equality holds in fact for extended
chemical potentials, defined as lnpξαi Φiα pxα qq. The second part of Theorem 2.1 is more interesting.
Let us investigate this aspect further by making an additional assumption on one of the phases.

Theorem 2.2 (Tangent plane criterion). Assume that a phase α P P is present, i.e., Ysα ą 0.
Then, for any other phase β P P, absent or present,

Txs β gβ pxq ě Txs α gα pxq, for all x P RK´1 , (2.50)

where Txs α gα and Txs β gβ are the linearized expansions defined in (2.46). In other words, the
tangent hyperplane Txs β Gβ lies above or coincide with the tangent hyperplane Txs α Gα .
2.3. Properties of the unified formulation 33

Chứng minh. From equality (2.47a), we have

µK xβ q “ µK
β ps xα q ` Cαβ ,
α ps Cαβ “ ln σ
sα ´ ln σ
sβ .

sα “ jPK ξsαj “ 1, hence ln σ


ř
Since Ysα ą 0, the complementarity condition (2.39) entails σ sα “ 0.
j
For any other β P P, we have σ
ř
sβ “ jPK ξβ ď 1, also by virtue of (2.39). Therefore, ln σ
s sβ ď 0
and Cαβ ě 0. Thus,
µK xβ q ě µK
β ps xα q.
α ps

Using (2.24b) from Lemma 2.1, we can rewrite the previous inequality as

xβ q ´ ∇x gβ ps
gβ ps xβ q ¨ x xβ q ´ ∇x gα ps
s β ě gα ps xα q ¨ x
sα. (2.51)

On the other hand, taking the dot product of the equality of gradients (2.47c) with any x P Ω,
we have
∇x gβ ps
xβ q ¨ x “ ∇x gα ps
xα q ¨ x. (2.52)
Adding together (2.51) and (2.52), we end up with

xβ q ` ∇x gβ ps
gβ ps xβ q ¨ px ´ x xβ q ` ∇x gα ps
s β q ě gα ps xα q ¨ px ´ x
sαq

which is the desired result (2.50).

This result is notoriously known in thermodynamics as the tangent plane criterion [89]. It
is usually derived by physicists from a local analysis of phase stability (see §2.3.2). Theorem 2.2
testifies to the fact
ř that this stability property is already encoded in the ř unified formulation via
j j
the sign of 1 ´ jPK ξβ . If phase β is “strictly” absent, namely, if 1 ´ jPK ξβ ą 0 and Ysβ “ 0,
s s
then the tangent hyperplane Txs β Gβ will lie strictly above Txs α Gα .
Let us now push one step further by looking at the case of several present phases. Let Γ s be
the set of all α P P such that Yα ą 0. Its cardinal is denoted by γ
s s “ |Γ|.
s

Corollary 2.1 (Common tangent hyperplane). At a solution of the unified formulation satis-
s α P Ω for all α P P, the γ tangent hyperplanes tTxs α Gα uαPΓs are all the same. Moreover,
fying x

c “ pcI , . . . , cK´1 q P intpConvpts


xα uαPΓs qq, (2.53)

i.e., the global composition point belongs to the open convex hull spanned by the γ xα uαPΓs .
s points ts
Finally, a necessary condition for this solution to be unique is that

s ď K.
γ (2.54)

Chứng minh. Let pα, βq P Γ s ˆ Γ.


s Applying Theorem 2.2 twice and switching their roles, we have
Txs β gβ pxq ě Txs α gα pxq and Txs α gα pxq ě Txs β gβ pxq, whence Txs α gα pxq “ Txs β gβ pxq for all x P Ω.
Thus, Txs α Gα “ Txs β Gβ . The material balance (2.37b) reads
ÿ ÿ
ci “ Ysβ ξsβi “ siα ,
Ysα x
βPP αPΓ
s

where the last equality comes from retaining only those summands in the context, where the
two notions of extended and partial fractions coincide. Extracting the first K ´ 1 components
from the above equation yields ÿ
c“ Ysα x
sα. (2.55)
αPΓ
s
34 Chapter 2. Phase equilibrium for multicomponent mixtures

ř
Since Ysα ą 0 and αPΓ Ysα “ 1, the point c belongs to the interior of Convpts xα uαPΓs q, the
dimension of which is at most γ s ´ 1. The weights tYsα uαPΓs of this convex combination are
solutions of a linear system of K equations in γ s unknowns. If γs ą K, the matrix of the linear
system has a nonzero kernel. Moving along a direction in this kernel with a small enough step,
it is possible to find another set of weights satisfying the system while remaining positive.

From this common tangent plane property, a purely geometric procedure can be devised in
order to build a solution of the phase equilibrium formulated by (2.37)–(2.39). The construction
involves the lower convex envelope of the function x ÞÑ minαPP gα pxq. More details will be given
in §2.4.2 for two-phase binary mixtures. Regarding condition (2.54), it is automatically satisfied
when P ď K, which turns out to be true in practice: there are about two or three phases at
most for tens to hundreds of components.

2.3.2 Connection with Gibbs energy minimization


The previous section §2.3.1 has revealed the benefits of imposing 1 ´ iPK ξαi ě 0 from the
ř
beginning, by means of the unified formulation (2.37)–(2.39). This enabled us to recover all the
well-known properties of the solutions. We would like, however, to better understand where this
sign information comes from.

2.3.2.1 On the origin of the sign condition

In the literature, the condition 1 ´ iPK ξαi ě 0 is customarily derived from a phase stability
ř
analysis. The most commonly cited reference is Michelsen [89], in relation to the tangent plane
criterion. A more mathematical presentation was recently given by Ben Gharbia-Flauraud [12].
The idea is the following: starting from single-phase α, we wonder if the mixture would be
“tempted” to split into two phases. The difference in the Gibbs energies between the new con-
figuration and the old one is minimized with respect to all virtually possible compositions of
a would-be new phase β. Phase α is said to be stable if the smallest value of this difference is
positive. This gives rise to a condition on the composition of the fictitious phase β at which
the minimum is reached. This condition is finally expressed in terms of the extended fractions,
defined to be a rescaled version of the mole numbers in phase β.
This classical analysis suffers from a few limitations. First, it is restricted to two phases.
Second, it is local: the Gibbs energy difference under study must be linearized via a first-order
Taylor expansion, before minimizing. Third, the notion of extended fractions appears only at
the end, in a very ad hoc way. It would be far more satisfying if we could derive a more direct
connection between the unified formulation (2.37)–(2.39) and a multiphase multicomponent
Gibbs enery minimization problem expressed in terms of the extended fractions ξαi , without any
linearization.
We claim that such a quest is attainable. In this section, we are going to show that every
solution of the unified formulation is necessarily a ř
critical point of some constrained minimization
problem pPq stated below. The quantities 1 ´ iPK ξαi will then appear to be the Lagrange
multipliers associated with the constraints Yα ě 0. Conversely, while not every critical point of
the minimization problem pPq is a solution of the unified formulation, some “natural” choice of
critical points satisfies the unified formulation. This result, which does not seem to be known in
the community, sheds a new light into the complementarity conditions (2.39).
2.3. Properties of the unified formulation 35

2.3.2.2 Towards a novel interpretation


In order to state the minimization problem, we need to introduce a new Gibbs function. For
each phase α P P, let g : RK
` Ñ R be the extended molar Gibbs energy defined as
ÿ
gα pξαI , . . . , ξαK q “ ξαi lnpξαi Φiα pxα qq. (2.56)
iPK

For normalized fractions, gα pxIα , . . . , xK


α q “ gα pxα q. Thus, gα extends the intensive Gibbs func-
tion gα to the domain of extended fractions. It should not be confused with the extensive Gibbs
function ÿ
Gα pξαI , . . . , ξαK q “ ξαi lnpxiα Φiα pxα qq, (2.57)
iPK

introduced in (2.15)–(2.16), using niα


in place of ξαi . Unlike gα and Gα , the extended function gα
is neither intensive nor extensive. But it has many handy properties summarized in the following
Lemma. For convenience, we shall from now on be using the notations
ÿ
ξ α “ pξαI , . . . , ξαK q, σα “ ξαi . (2.58)
iPK

Lemma 2.3. For all ξ α P RK


` and j P K,

Bgα
pξ α q “ lnpξαj Φjα pxα qq ` 1, (2.59a)
Bξαj
ÿ Bgα
gα pξ α q “ ξαi pξ q ´ σα , (2.59b)
iPK
Bξαi α
ÿ B lnpξαi Φiα q
1“ ξαi pξ α q. (2.59c)
iPK Bξαj

Chứng minh. Inserting ξαi “ σα xiα into (2.56), we find


ÿ
gα pξ α q “ ξαi rlnpxiα Φiα pxα qq ` ln σα s “ Gα pξ α q ` σα ln σα .
iPK

Differentiating this equality with respect to ξαj , we have


Bgα BGα
pξ α q “ pξ α q ` ln σα ` 1 “ lnpxjα Φjα pxα qq ` ln σα ` 1,
Bξαj Bξαj

which proves (2.59a). Multiplying (2.59a) by ξαj and summing over j P K, we arrive at
ÿ Bgα ÿ ÿ
ξαi pξ q “ ξ i
lnpξ i j
Φ px α qq ` ξαi “ gα pξ α q ` σα ,
iPK
Bξαi α iPK
α α α
iPK

which proves (2.59b). The last relation (2.59c) follows from


ÿ B lnpξαi Φiα q ÿ B lnpxiα Φiα q ÿ B ln σα
ξαi pξ α q “ ξαi pξ α q ` ξαi ,
iPK Bξαj iPK Bξαj iPK Bξαj

in the right-hand side of which the first summand vanishes thanks to the Gibbs-Duhem condition
(2.20) and the second summand boils down to 1.
36 Chapter 2. Phase equilibrium for multicomponent mixtures

Equipped with this new Gibbs function, we can now consider the following minimization
problem pPq.

GIVEN
K, P, tΦiα upi,αqPKˆP admissible,
tci uiPK P r0, 1s subject to iPK ci “ 1,
ř

FIND ÿ
min Yα gα pξ α q (2.60a)
tYα uαPP
αPP
tξα uαPP

subject to
ÿ
Yα ´ 1 “ 0, (2.60b)
αPP
ÿ
Yα ξαi ´ ci “ 0, @i P K, (2.60c)
αPP
´Yα ď 0, @α P P. (2.60d)
The objective function in (2.60a) represents a notion of extended Gibbs energy for the mixture.
The equality constraints (2.60b)–(2.60c) are exactly the material balances (2.37) of the unified
formulation. This time, there is no redundancy since we have not imposed the complementarity
conditions (2.39).
Let u, tv i uiPK and twα uαPP be the Lagrange multipliers associated respectively with the
constraints (2.60b), (2.60c) and (2.60d). The Lagrangian of the minimization problem (2.60)
reads
ÿ
L ptYα u, tξ α u, u, tv i u, twα uq “ Yα gα pξ α q
αPP
´ ÿ ¯ ÿ ´ ÿ ¯ ÿ
`u Yα ´ 1 ` vi Yα ξαi ´ ci ´ wα Yα .
αPP iPK αPP αPP

The saddle-points of L are given by the Karush-Kuhn-Tucker (KKT) conditions [22, 94]
ÿ
gβ pξ β q ` u ` v i ξβi ´ wβ “ 0, @β P P (2.61a)
iPK
„ 
Bgβ
Yβ pξ β q ` v j
“ 0, @pj, βq P K ˆ P, (2.61b)
Bξβj
ÿ
Yα ´ 1 “ 0, (2.61c)
αPP
ÿ
Yα ξαi ´ ci “ 0, @i P K, (2.61d)
αPP
minpYβ , wβ q “ 0, @β P P. (2.61e)
The last equation (2.61e) expresses the complementarity between each inequality constraint
(2.60d) and its Lagrange multiplier at optimality. It can be rephrased as
Yβ ě 0, wβ ě 0, Yβ wβ “ 0.
A set of values tpYα , ξ α quαPP is said to be a critical point for the minimization problem (2.60)
if there exists a set of values pu, tv i uiPK , twα uαPP q such that the KKT optimality system (2.61)
is satisfied.
2.3. Properties of the unified formulation 37

2.3.2.3 From one formulation to the other


We first show that it is easy to go from the unified formulation to the minimization problem.
Theorem 2.3. Every solution tpYsα , sξ α quαPP of the unified formulation (2.37)–(2.39) is a crit-
ical point of the minimization problem (2.60), with

u
s “ 1, vsj “ ´rlnpϕ
sj q ` 1s, w
sβ “ 1 ´ σ
sβ , (2.62)

sj is the common value of the extended fugacity ξsαj Φjα ps


where ϕ xα q across all phases α P P.
Chứng minh. Let tpYsα , s ξ α quαPP be a solution of (2.37)–(2.39). The material balances (2.61c)–
(2.61d) are naturally met, owing to (2.37). The equality of extended fugacities (2.38a) makes it
possible to define vsj “ ´rlnpϕj q ` 1s in the way described in the Theorem. This choice of vsj
trivially fulfills (2.61b) because of (2.59a). The choice of w sβ implies (2.61e) because of (2.39).
It remains to check (2.61a). To this end, we use Lemma 2.3 to write
ÿ ÿ Bgβ ÿ Bgβ
ξβ q ` u
gβ ps s` vsi ξsβi ´ w
sβ “ ξsβi si psξβ q ´ σ
sβ ` 1 ´ ξsβi si ps
ξ β q ´ p1 ´ σ
sβ q “ 0.
iPK iPK
B ξ β iPK
B ξβ

This completes the proof.

In the reverse direction, things do not go as smoothly. The main difficulty lies in the inde-
termination of the extended fractions for an absent phase.
Theorem 2.4. Let tpYrα , ξrα quαPP be a critical point of the minimization problem (2.60).
1. If two phases pα, βq P P ˆ P are both present, i.e., Yrα ą 0 and Yrβ ą 0, then

σ
rα “ σ
rβ “ 1, xα q “ ξrβi Φiβ pr
ξrαi Φiα pr xβ q for all i P K. (2.63)

This implies that the complementarity condition (2.39) holds for both phases and that the
extended fugacity equalities (2.38a) hold between the two phases considered.

2. If phase α is present and phase β is absent, i.e., Yrα ą 0 and Yrβ “ 0, then
ÿ “
ξri lnpξri Φi pr
xβ qq ´ lnpξri Φi pr

σ
rα “ 1, β β β xα qq ` 1 ´ σ
α αrβ ě 0. (2.64)
iPK

In general, the complementarity condition (2.39) does not hold for phase β and the extended
fugacity equalities (2.38a) do not hold between α and β. But the complementarity condition
(2.39) is automatically met for phase β as soon as the extended fugacity equalities (2.38a)
hold between α and β.
u, tr
Chứng minh. Let tpYrα , ξrα quαPP , pr v i uiPK , tw
rα uαPP q be a solution of the KKT system (2.61).
First, assume that Yrα ą 0 and Yrβ ą 0. It is then possible to simplify by Yr in (2.61b) to obtain

Bgα r Bgβ r
pξ α q ` vrj “ 0, pξ β q ` vrj “ 0.
Bξαj Bξβj

From this, it is deduced that


Bgα r Bgβ
j
pξ α q “ j pr vj .
ξ β q “ ´r
Bξα Bξβ
38 Chapter 2. Phase equilibrium for multicomponent mixtures

According to (2.59a) [Lemma 2.3], this is equivalent to the equality of extended fugacities (2.38a),
rewritten in the second part of (2.63). On the other hand, Yrα ą 0 implies w rα “ 0 by (2.61e).
Equation (2.61a) then becomes

ÿ Bgα r
ξα q ` u
gα pr r´ ξrαi pξ α q “ 0.
iPK B ξri
α

Combining this with (2.59b) [Lemma 2.3], we infer that σ rα “ ur. Repeating the same reasoning
for β, we also get σ
rβ “ u
r. Hence, σ rα . This means that σ
rα “ σ r takes on the same value u
r in all
present phases. Let Γr be set of π P P such that Yrπ ą 0. Note that Γr ‰ H because of (2.61c).
Summing (2.61d) over i P K and permuting the order of summation yields
ÿ ÿ ÿ ÿ ÿ
0“ Yrπ ξrπi ´ ci “ Yrπ σ
rπ ´ 1 “ u
r Yrπ ´ 1 “ u
r ´ 1.
iPK πPP iPK πPP πPΓ
r

Therefore, ur “ 1, which proves the first part of (2.63).


Assume now that Yrα ą 0 and Yrβ “ 0. It is no longer possible to divide (2.61b) by Yrβ to
retrieve information on the extended fugacities. Likewise, we now simply have wβ ě 0 from
(2.61e). Equation (2.61a) for phase β leads to
ÿ
ξβ q ` u
gβ pr r` vri ξrβi “ w
rβ ě 0.
iPK

Because phase α is present, σ r “ 1 and vri “ ´rBgα {Bξαi spr


rα “ u ξ α q. Invoking (2.59b) [Lemme 2.3]
for phase β, we can transform the above equality into
„ 
ÿ Bgβ r Bgα r
ξrβi pξ q ´ i pξ α q ´ σ
rβ ` 1 ě 0.
iPK
Bξβi β Bξα

This is none other than the second part of (2.64).

To fully grasp the meaning of Theorem 2.4, it is capital to observe that when a critical point
of (2.60) has a vanishing phase β P P for which Yrβ “ 0, the corresponding extended fractions r ξβ
cannot be uniquely determined. Indeed, r ξ β plainly does not contribute to neither the objective
function (2.60a) nor the constraint (2.60c) at fixed Yrβ “ 0. To put it another way, changing r ξβ
K
to any other vector R` will provide another acceptable critical point. Thus, as soon as there is
a critical point of (2.60) for which Yrβ “ 0, there are in fact an infinity of such critical points.
Among this infinity of critical points, only those for which

ξrβi Φiβ pr
xβ q “ ξrαi Φiα pr
xα q for all i P K, (2.65)

where α is present phase pYrα ą 0q, will be also solutions of the unified formulation (2.37)–(2.39).
Combining this with Theorem 2.3, we can interpret the unified formulation as a set of equations
that is slightly “stronger” than that of the KKT system for the critical points. It is stronger in
the sense that it helps selecting some special critical points —and hopefully just one— among
the infinity of possible critical points that appear when one of the phases disappears.
2.3. Properties of the unified formulation 39

2.3.2.4 A continuity principle


We now give an argument to assert that the critical points thus selected by the unified formula-
tion are “natural” ones. By this, we mean that the additional conditions (2.65) to be prescribed
on the extended fractions of an absent phase β can be interpreted as the limit of a continuous
process during which β was present before vanishing. To build up this process, let us reformulate
the minimization problem pPq or (2.60) as the bilevel or hierarchical problem
ÿ
min min Yα gα pξ α q ` Yβ gβ pξ β q (2.66a)
Yβ tYα uαPPztβu
αPPztβu
tξα uαPP

subject to
ÿ
Yα ` Yβ ´ 1 “ 0, (2.66b)
αPPztβu
ÿ
Yα ξαi ` Yβ ξβi ´ ci “ 0, @i P K, (2.66c)
αPPztβu

´Yα ď 0, @α P Pztβu. (2.66d)

The constraints (2.66b)–(2.66d) are imposed on the inner minimization problem pPYβ q
ÿ
min Yα gα pξ α q ` Yβ gβ pξ β q (2.67)
tYα uαPPztβu
αPPztβu
tξα uαPP

for a fixed Yβ ě 0. To begin with, consider pPYβ q for a fixed and small enough Yβ ą 0. The KKT
optimality conditions for (2.66b)–(2.67) are
ÿ
gα pξ α q ` u ` v i ξαi ´ wα “ 0, @α P Pztβu (2.68a)
iPK
„ 
Bgα
Yα i
pξ q ` v “ 0, @pi, αq P K ˆ P, (2.68b)
Bξαi α
ÿ
Yα ` Yβ ´ 1 “ 0, (2.68c)
αPPztβu
ÿ
Yα ξαi ` Yβ ξβi ´ ci “ 0, @i P K, (2.68d)
αPPztβu

minpYα , wα q “ 0, @α P Pztβu. (2.68e)

Note that (2.68a) and (2.68e) do not make sense for β since Yβ is not a variable for the inner
problem, but that (2.68b) do make sense for pi, βq since ξβi is a variable with respect to which
minimization is carried out. Assume that for each small enough Yβ ą 0 there is a unique critical
point. We designate it by
tYrα pYβ quαPPztβu , tr
ξ α pYβ quαPP
to lay emphasis on its dependency with respect to Yβ . Setting α “ β in (2.68b), we are allowed
to divide by Yβ ą 0 in order to obtain

Bgβ r
v pYβ q “
´r pξ pYβ qq “ lnpξriβ pYβ qΦpr
xβ pYβ qqq for all i P K.
Bξβi α
40 Chapter 2. Phase equilibrium for multicomponent mixtures

Setting α in (2.68b) to another present phase (which necessary exists since Yβ ă 1) and simpli-
fying by Yα ą 0, we have

Bgα r
v pYβ q “
´r pξ pYβ qq “ lnpξriα pYβ qΦpr
xα pYβ qqq for all i P K.
Bξαi α

From the last two equalities, it follows that

ξriβ pYβ qΦpr


xβ pYβ qq “ ξriα pYβ qΦpr
xα pYβ qq for all i P K.

Now, we let Yβ Ó 0. If all of the quantities involved in the above equality have finite limits, we
clearly end up with (2.65). The values assigned to the extended fractions in an absent phase in
the unified formulation are thus based on a continuity principle for the critical point.

2.3.3 Well-definedness of extended fractions


Let us go back to the equality of gradients (2.47c) and ask ourselves the following question.
Assume that phase β is well determined, namely, the extended fractions tξβi uiPK are known.
Under which hypotheses on the Gibbs energy gα would it be possible to invert the relation

∇x gα pxα q “ ∇x gβ pxβ q

in order to get the partial fractions xα , from which the extended fractions tξαi uiPK could also be
calculated? Mathematically, this makes sense insofar as we have a pK ´ 1q ˆ pK ´ 1q nonlinear
system. Before elaborating on the requirements to be imposed on gα , let us point out two
instances where this issue crucially arises.

2.3.3.1 Two essential issues


The first situation occurs when the solution is single-phase, say, in phase β. Put another way,
Ysβ “ 1 and Ysα “ 0 for all α P Pztβu. By (2.37b), rewritten as (2.55), we have x
s β “ c. Assume
c P Ω. After Theorem 2.1, the extended fractions in a vanishing phase α P Pztβu satisfy

∇x gα ps
xα q “ ∇x gβ pcq, (2.69a)
sα ` µK
ln σ xα q “ µK
α ps β pcq, (2.69b)

where we recall that


ÿ ξsαi
σ
sα “ ξsαj , siα “
x .
jPK
σ

If (2.69a) could be uniquely inverted, i.e., if we had the legitimacy to write

s α “ r∇x gα s´1 p∇x gβ pcqq,


x

then we could easily deduce from (2.69b) that

sα “ exprµK
σ K
β pcq ´ µα ps
xα qs, ξsαi “ σ siα ,
sα x

and phase α would be entirely determined. We refer to this first situation as the vanishing phases
problem.
2.3. Properties of the unified formulation 41

The second situation takes place in Lauser’s suggestion for using the extended fugacities,
as mentioned in Remark 2.3. By means of similar operations (taking the log of both sides,
introducing the sum of extended fractions, using the connection between the potentials and the
molar Gibbs energy), the inner system (2.43) can be transformed into
∇x gα pxα q “ tln ϕi ´ ln ϕK u1ďjďK´1 , (2.70a)
ln σα ` µK
α pxα q “ ln ϕ ,K
(2.70b)
which displays exactly the same structure as (2.69). Our ability to solve (2.70) for all reasonable
inputs ϕ P RK ´1
` relies on the existence of an unambiguous reciprocal function r∇x gα s . We refer
to this second situation as the local fugacity inversion problem.

2.3.3.2 Two sets of assumptions


The claimed superiority of the unified formulation over the variable-switching formulation rests
upon its capability to assign well-determined values to the extended fractions in the absent
phases. Failing to do so would ultimately defeat its purpose. The short calculation above demon-
strates that this capability cannot be taken for granted. Additional assumptions need to be made
in order to ensure that the unified formulation works properly. Below is the most natural one.
Hypotheses 2.1. The gradient map ∇x gα : Ω Ñ RK´1 is a homemorphism. In other words,
it is a continuous bijection as well as its inverse r∇x gα s´1 : RK´1 Ñ Ω.
The following noteworthy example hints that Hypotheses 2.1 is neither unrealistic nor un-
reachable.
Proposition 2.3. The molar Gibbs energy function of an ideal gas
K
ÿ
gα pxα q “ xiα ln xiα , (2.71)
i“I

where xK I K´1 , satisfies Hypotheses 2.1.


α “ 1 ´ xα ´ . . . ´ xα

Chứng minh. To alleviate notations, let us omit the phase subscript α of x. The gradient ∇x gα :
Ω Ñ RK´1 is given by
∇x gα pxq “ pln xI ´ ln xK , . . . , ln xK´1 ´ ln xK q. (2.72)
This map is continuous over Ω. For any given u “ puI , . . . , uK´1 q P RK´1 , the nonlinear system
∇x gα pxq “ u can be turned into the K ˆ K linear system
xI ´ exppuI qxK “ 0,
..
.
xK´1 ´ exppuK´1 qxK “ 0,
xI ` . . . ` xK´1 ` xK “ 1.
The first K ´ 1 components of the solution are
exppuI q exppuK´1 q
xI “ řK´1 , ..., xK´1 “ řK´1 .
1 ` i“I exppui q 1 ` i“I exppui q
This defines a unique continuous inverse map r∇x gα s´1 : RK´1 Ñ Ω.
42 Chapter 2. Phase equilibrium for multicomponent mixtures

Unfortunately, Hypotheses 2.1 may not be easy to check for fluids other than an ideal gas.
Therefore, it could be more convenient to consider some stronger but more convenient hypothe-
ses.
Hypotheses 2.2. The gradient map ∇x gα : Ω Ñ RK´1 is surjective. Moreover, the molar
Gibbs energy gα : Ω Ñ R is strictly convex, that is, it satisfies one of the two conditions below,
which are equivalent for a twice differentiable function:
(a) For all px, yq P Ω ˆ Ω with x ‰ y,
@ D
∇x gα pxq ´ ∇x gα pyq, x ´ y ą 0. (2.73)

(b) For all x P Ω, the Hessian matrix ∇2xx gα pxq is definite positive.
We refer the reader to [24, 109] for the notion of strict convexity and for the equivalence
between the two conditions (a) and (b) for twice differentiable functions. Surjectivity provides
existence of a solution x P Ω to ∇x gα pxq “ u P RK´1 . Strict convexity enforces uniqueness
of such a solution. Again, the case of an ideal gas suggests that this is not an unreasonable
assumption.
Proposition 2.4. The molar Gibbs energy function of an ideal gas, defined by (2.71), is strictly
convex.
Chứng minh. Again, we drop the phase subscript α for clarity. From the expression (2.72) of
the gradient, the Hessian matrix can be found to be
ˆ ˙
2 1 1 1
∇xx gpxq “ K E ` Diag I , . . . , K´1 ,
x x x

where E is the matrix whose all entries are equal to 1. It follows that, for a generic v P RK´1 ,
K´1
ÿ |v i |2
1
∇2xx gpxqv, v “ K |v I ` . . . ` v K´1 |2 `
@ D
.
x i“1
xi
@ D
When x P Ω, it is obvious that ∇2xx gpxqv, v ą 0 for all v ‰ 0.

To conclude this section, Hypotheses 2.2 set the framework in which we can guarantee that
the extended fractions introduced in the unified formation are well-defined. Strict convexity of
the molar Gibbs energy will also be of great help in proving non-singularity of the solution of
the unified formulation in chapter §5.

2.4 Two-phase mixtures


Throughout the rest of this manuscript, we shall study only the two-phase case, for which

P “ tG, Lu, P “ 2. (2.74)

The two-phase case is sufficiently representative of the numerical difficulties we wish to address,
while simple enough to make implementations faster. The new labels G (gas) and L (liquid)
are aimed at being more meaningful and fixing ideas. They have no consequence on the ensuing
mathematical developments.
2.4. Two-phase mixtures 43

2.4.1 The multicomponent case


Let us write down the corresponding unified formulation in the simplest way possible. System
(2.42) is now reduced to
i
YG ξG ` YL ξLi ´ ci “ 0, @i P K, (2.75a)
i i
ξG ΦG pxG q´ ξLi ΦiL pxL q “ 0, @i P K, (2.75b)
` ř j˘
min YG , 1 ´ jPK ξG “ 0, (2.75c)
min YL , 1 ´ jPK ξLj
` ř ˘
“ 0. (2.75d)

2.4.1.1 A further reduction


This p2K ` 2q ˆ p2K ` 2q nonlinear system can be further simplified as follows. As we already
know that the phasic fractions will automatically satisfy YG ` YL “ 1, let us choose one of them
as unknown and express the other as its complement to 1, that is,

YG “ Y, YL “ 1 ´ Y. (2.76)

This enables us to work with the p2K ` 1q ˆ p2K ` 1q nonlinear system


i
Y ξG ` p1 ´ Y qξLi ´ ci “ 0, @i P KztKu, (2.77a)
i i
ξG ΦG pxG q ´ ξLi ΦiL pxL q “ 0, @i P K, (2.77b)
` ř j˘
min Y, 1 ´ jPK ξG “ 0, (2.77c)
1 ´ jPK ξLj
` ř ˘
min 1 ´ Y, “ 0. (2.77d)

in the unknowns pY , ξ G , ξ L q P R ˆ RK ˆ RK . It is important to point out that in the material


balances (2.77a), there are now only K ´ 1 equations. As system (2.77) has one less unknown
than (2.75), it should also have one less equation. We have decided to leave aside the material
balance of the last component K. Let us rationalize this decision.
From the complementarity condition (2.77c), it follows that
ÿ j ÿ j
K
Y “Y ξG “ Y ξG ` Y ξ G .
jPK jPKztKu

Hence, ÿ j K
Y ξG “ Y ´ Y ξG . (2.78a)
jPKztKu

Likewise, starting from the complementarity condition (2.77d), we have


ÿ j
p1 ´ Y q ξG “ p1 ´ Y q ´ p1 ´ Y qξLK . (2.78b)
jPKztKu

Summing the material balances (2.77a) over i P KztKu, invoking (2.78) and recalling that
j K
ř
jPKztKu c “ 1 ´ c yield

K
rY ´ Y ξG s ` rp1 ´ Y q ´ p1 ´ Y qξLK s ´ p1 ´ cK q “ 0.

After simplification and a change of sign, we obtain the material balance of component K. Thus,
the “forgotten” equation can be in fact recovered from those prescribed in (2.77).
44 Chapter 2. Phase equilibrium for multicomponent mixtures

2.4.1.2 Two kinds of singularity


There are two kinds of singular solutions to which we should pay attention. These are noteworthy
not only from the physical standpoint, but also from the mathematical perspective. Indeed, the
determinant of some Jacobian matrix vanishes at the singular solutions, which will be unfavorable
for numerical methods, as will be seen later. The first family of singular solutions was already
briefly mentioned in §2.2.2.

Definition 2.1. A solution pYs , s ξ L q P R ˆ RK ˆ RK of (2.77) is said to be a transition point


ξG , s
when both arguments of one of the complementarity conditions vanish simultaneously, that is,
ÿ
i
Ys “ 0, 1´ ξsG “ 0, (2.79a)
iPK

or ÿ
Ys “ 1, 1´ ξsLi “ 0. (2.79b)
iPK

In the two-phase framework, such a point marks the change in the nature of the solution,
from a two-phase regime to a single-phase regime or vice-versa. To avoid ambiguity due to
transition points, we say that the gas phase G is strictly absent if Y “ 0 and 1 ´
ř si ą 0.
ξ
iPK G
Likewise, we say that the liquid phase L is strictly absent if Y “ 1 and 1 ´ iPK ξsLi ą 0.
ř

Figure 2.1: Azeotropic compositions for a two-phase two-component mixture.

Definition 2.2. A global composition c P Ω, where Ω Ă RK´1 is the open domain of fractions
defined in (2.22a), is said to be azeotropic if the Gibbs hypersurfaces GG and GL , defined in
(2.45), are tangent to each other at c. In other words if Tc GG “ Tc GL , or equivalently,

gG pcq “ gL pcq, ∇x gG pcq “ ∇x gL pcq. (2.80)

Note that c alone is not responsible for azeotropy. It also takes the two Gibbs functions to
behave in a peculiar way to satisfy (2.80). If azeotropy occurs at some c P Ω, then it is easily
seen that
i si
pYs , ξsG , ξL q “ pY, ci , ci q (2.81)
is a solution of (2.77) for all Y P r0, 1s. This infinity of solutions is undertermined with respect
to the phasic fraction Y . Physically speaking, since the two phases have identical proportions of
2.4. Two-phase mixtures 45

species, they can no longer be distinguished from each other. Therefore, it is no longer possible
to tell how much of a phase is globally present in the mixture3 . The second kind of singularity
consists of azeotropic solutions (2.80)–(2.81). An illustration of azeotropic configurations is given
in Figure 2.1 for a two-component mixture, with K “ 2 and Ω “ p0, 1q.

2.4.2 The binary case


The special case of two-phase two-component mixtures, for which in addition to (2.74),
(
K “ I, II , K “ 2, (2.82)

is called binary. Thanks to its simplicity, analytical calculations can performed and geometric
constructions to worked out, which helps gaining intuition into the phase equilibrium problem.

2.4.2.1 Notations and assumptions


As K ´ 1 “ 1, the domain of partial fractions is Ω “ r0, 1s. For conciseness, we shall be using the
symbols c instead of cI , xG instead of xIG and xL instead of xIL . The vectors c “ pcI q, xG “ pxIG q
and xL “ pxIL q will also be written as c, xG and xL . We recall that

I
ξG ξLI
xG “ I ` ξ II
, xL “ .
ξG G ξLI ` ξLII

The two-phase multicomponent model (2.77) then boils down to

I
Y ξG ` p1 ´ Y qξLI ´ c “ 0, (2.83a)
I
ξG ΦIG pxG q ´ ξLI ΦIL pxL q “ 0, (2.83b)
II II
ξG ΦG pxG q´ ξLII ΦII
L pxL q “ 0, (2.83c)
I II
minpY ; 1 ´ ξG ´ ξG q “ 0, (2.83d)
I II
minp1 ´ Y ; 1 ´ ξL ´ ξL q “ 0. (2.83e)

There are five equations in the unknowns pY, ξG I , ξ II , ξ I , ξ II q P R5 . Admissibility of the fugacity
G L L
I II
coefficients Φα , Φα for α P tG, Lu imply that they derive from the molar Gibbs energy functions
gα : r0, 1s Ñ R defined as

gα pxq “ x lnpx ΦIα pxqq ` p1 ´ xq lnpp1 ´ xq ΦII


α pxqq,

and in particular that they meet the Gibbs-Duhem condition

x pln ΦIα q1 pxq ` p1 ´ xq pln ΦII 1


α q pxq “ 0

for all x P p0, 1q, where 1 denotes the derivative with respect to x. In §2.3.3, Hypotheses 2.2 were
set out in an attempt to guarantee existence and uniqueness in most situations. Here, we wish
to strengthen these hypotheses in order to include the extreme cases c “ 0 and c “ 1 in the
upcoming analytical solution for (2.83).
3
In chemical engineering, the phases can no longer be separated by distillation at an azeotropic composition.
46 Chapter 2. Phase equilibrium for multicomponent mixtures

Hypotheses 2.3. The molar Gibbs energy gα is strictly convex, that is, gα2 pxq ą 0 for all
x P p0, 1q. Moreover, the gradient gα1 : p0, 1q Ñ R can be extended to be a surjective map from
r0, 1s to R “ t´8u Y R Y t`8u, with gα1 p0q “ ´8 and gα1 p1q “ `8.

Hypotheses 2.3 enable us to extend the inverse map rgα1 s´1 : R Ñ r0, 1s, with rgα1 s´1 p´8q “
0 and rgα1 s´1 p`8q “ 1. Note that for K ě 3, it is no longer possible to include ˘8 in the range
of the components of ∇x gα . This is testified by the ideal gas law (2.71), for which the difficulty
lies on the hyperplane 1 ´ xI ´ . . . ´ xK´1 “ 0.

2.4.2.2 Gibbs’ geometric construction


There is a famous geometric construction due to Gibbs [39, 95] for the phase equilibrium of a
two-phase binary mixture. Let us sketch out this construction, depicted in Figure 2.2. The first
task is to look for a common tangent between the graphs GG and GL .

B If there is no common tangent, then the mixture is single-phase. The present phase α is
the one whose graph lies below the other. In phase α, the partial fraction is x
sα “ c.

B If there is a common tangent, let x


qG and x
qL be the abscissae of the contact points.

– If c lies outside the open interval defined by x


qG and x
qL , then the mixture is single-
phase. The present phase α is the one whose graph lies below the other at the abscissa
c. In phase α, the partial fraction is x
sα “ c.
– If c lies inside the open interval defined by x
qG and xqL , then the mixture is two-phase.
The partial fractions are then x sG “ x qG and xsL “ x qL . The phasic fraction Ys is
given by the lever rule, which amounts to calculating the weights by which c can be
expressed as a convex combination of x sG and x
sL .

Note that Gibbs’ geometric construction is concerned with the natural-variable or variable-
switching formulation (2.34)–(2.35). In a pure liquid regime pYs “ 0q, for instance, it does not
make sense to speak about x sG because phase G does not exist. Using the unified formulation,
however, we can assign a well-defined value to x sG . As represented in the lower panel of Figure
2.2, this value is x 1 ´1 1 xL qq “ rgG s pgL1 pcqq.
sG “ rgG s pgL ps 1 ´1

2.4.2.3 Analytical derivation


In the same spirit as in §2.3.1, we seek to rigorously derive the Gibbs geometric construction
from model (2.83). Our contribution is summarized in the Theorem below. To our knowledge,
this is the first existence and uniqueness result for a non-azeotropic phase equilibrium problem
using the unified formulation.

Theorem 2.5. Assume that Hypotheses 2.3 hold and that the given composition c P r0, 1s is not
azeotropic. Then, system (2.83) has a unique solution pYs , ξsIG , ξsII sI sII 4
G , ξ L , ξ L q P r0, 1s ˆ R` , given by
the following procedure. Let gq be the lower convex envelope of minpgG ; gL q over r0, 1s, that is,

gqpxq “ suptgpxq | g is convex and g ď minpgG ; gL q over r0, 1su.

• If gqpcq ă minpgG pcq; gL pcqq, then in the neighborhood of pc, gqpcqq the graph of gqp¨q is
a straightline. This straightline is a common tangent to the graphs of GG and GL . Let
2.4. Two-phase mixtures 47

Figure 2.2: Gibbs’ geometric construction for the phase equilibrium of a two-phase binary mix-
ture. Top: two-phase solution. Bottom: single-phase solution.
48 Chapter 2. Phase equilibrium for multicomponent mixtures

xG , gG ps
ps xG qq and ps
xL , gL ps
xL qq be the distinct contact points. The abscissae of these con-
tact points are necessarily from distinct sides of c, one on the left and the other on the
right. The solution is then in the two-phase regime, with
c´xsL
Ys “ , ξsIG “ x
sG , ξsII
G “1´x
sG , ξsIL “ x
sL , ξsII
L “1´x
sL . (2.84)
x
sG ´ x
sL

• If gqpcq “ gG pcq, then at least in a half-neighborhood of pc, gqpcqq the graph of gqp¨q coincides
with GG . The solution is then in the G single-phase regime, with

Ys “ 1, x
sG “ c, ξsIG “ c, ξsII
G “ 1 ´ c, sL “ rgL1 s´1 pgG
x 1
pcqq, (2.85a)

and, recalling the definition (2.46) of tangent map Txα gα ,

ξsIL “ exp Tc gG ps
“ ‰
xL q ´ gL ps
xL q xsL , (2.85b)
ξsII “ exp Tc gG ps
“ ‰
L xL q ´ gL ps
xL q p1 ´ xsL q. (2.85c)

• If gqpcq “ gL pcq, then at least in a half-neighborhood of pc, gqpcqq the graph of gqp¨q coincides
with GL . The solution is then in the L single-phase regime, with

Ys “ 0, x
sL “ c, ξsIL “ c, ξsII
L “ 1 ´ c, x 1 ´1 1
sG “ rgG s pgL pcqq, (2.86a)

and, recalling the definition (2.46) of tangent map Txα gα ,

ξsIG “ exp Tc gL ps
“ ‰
xG q ´ gG ps
xG q xsG , (2.86b)
ξsII “ exp Tc gL ps
“ ‰
G xG q ´ gG ps
xG q p1 ´ xsG q. (2.86c)

Chứng minh. Before proving Theorem 2.5, we remark that thanks to the non-azeotropy assump-
tion, the above procedure is non-ambiguous: we cannot have gqpcq “ gG pcq “ gL pcq.
EXISTENCE. Let us check that the procedure described leads to a valid solution of (2.83).
It is well-known that the graph of the lower convex envelope of a continuous function is made
up of successive parts, where the envelope either exactly matches the graph of the function or
is a straightline that lies strictly below the initial function but that is eventually tangent to the
latter at the ends of that part.
Two-phase regime. If gqpcq ă minpgG pcq; gL pcqq, then the part of the envelope containing
pc, gqpcqq is necessarily a segment of a straightline that is tangent to the graph of minpgG pcq; gL pcqq
at two points px´ , gqpx´ qq and px` , gqpx` qq, with x´ ă c ă x` . We claim that

either pq
g px´ q, gqpx` qq “ pgG px´ q, gL px` qq or pq
g px´ q, gqpx` qq “ pgL px´ q, gG px` qq. (2.87)

Suppose by contradiction that pq g px´ q, gqpx` qq “ pgG px´ q, gG px` qq. Then, the part of the graph
of gqp¨q passing through pc, gqpcqq is a straightline tangent to the graph of gG p¨q at abscissae
x´ and x` . Hence, gG 1 px q “ g 1 px q. But this violates the strict convexity of g , accord-
´ G ` G
1
ing to which gG should be strictly increasing. Similarly, we get a contradiction by supposing
that pq g px´ q, gqpx` qq “ pgL px´ q, gL px` qq. This proves the claim (2.87). As a consequence, up
to relabelling and reordering, the two contact points can be designated as ps xG , gG ps
xG qq and
xL , gL ps
ps xL qq, which geometrically determines the real fractions x sG and x sL . The part of the
envelope containing pc, gqpcqq is therefore a common tangent to gG p¨q and gL p¨q.
2.4. Two-phase mixtures 49

Let us verify that the set of values (2.84) has correct range and solves indeed (2.83). Since
c lies strictly between x
sG and x sL , the quantity Ys “ pc ´ x xG ´ x
sL q{ps sL q lies in p0, 1q. Since
x
sG P r0, 1s and x s I s II s I
sL P r0, 1s by construction, the quantities ξ G , ξ G , ξ L and ξsIIL computed by
(2.84) also belong to r0, 1s. These values plainly satisfy equations (2.83a) and (2.83d)–(2.83e).
It remains to check (2.83b)–(2.83c). But we know that these are equivalent to
1
gG xG q “ gL1 ps
ps xL q, (2.88a)
1
xG q ´
gG ps x
sG gG xG q
ps xL q ´
“ gL ps sL gL1 ps
x xL q, (2.88b)

on the ground of earlier calculations [Theorem 2.1]. The first equality holds thanks to common
tangency. Now, we observe that gG ps xG q ´ x 1 ps
sG gG xG q is the ordinate of the intersection between
the tangent line TxsG gG and the axis x “ 0. Likewise, gL ps sL gL1 ps
xL q ´ x xL q is the ordinate of the
intersection between the tangent line TxsL gL and the axis x “ 0. Again, TxsG gG “ TxsL gL entails
the second equality.
Single-phase regime. If gqpcq “ gG pcq, then the part of the envelope containing pc, gG pcqq
coincides with GG in a neigborhood or at least in a half-neighborhood of c. Since gq is convex, its
graph lies above its tangent line at c, i.e.,
1
Tc gG pxq “ gG pcq ` px ´ cqgG g 1 pcq ď gqpxq
pcq “ gqpcq ` px ´ cqq (2.89)

for all x P r0, 1s. The quantities computed by (2.85) are all non-negative and obviously satisfy
(2.83a) and (2.83d). However, the fact that Ys “ 1 is not enough to infer (2.83e). We still have
to check the inequality 1 ´ ξsIL ´ ξsII
L ě 0. But

sL “ ξsIL ` ξsII
“ ‰ “ ‰
σ xL q ´ gL ps
L “ exp Tc gG ps xL q ď exp gqps
xL q ´ gL ps
xL q ď expp0q “ 1,

where the last two inequalities result from (2.89) and from the definition of gq. Thus, σ sL ď 1
and (2.83e) is satisfied. It remains to check (2.83b)–(2.83c). On the ground of earlier calcuations
[Theorem 2.1], these are equivalent to
1
gG pcq “ gL1 ps
xL q, (2.90a)
1
gG pcq ´ cgG pcq xL q ´
“ gL ps sL gL1 ps
x xL q ` ln σ
sL . (2.90b)

The first equation is already satisfied. The second one stems from ln σ
sL “ Tc gG ps
xL q ´ gL ps
xL q.
If gqpcq “ gL pcq, the proof goes along the same lines.
UNIQUENESS. By virtue of Theorem 2.1, any solution pY, ξG I , ξ II , ξ I , ξ II q of (2.83) satisfies
G L L
1 px q “ g 1 px q regardless of its phase regime. For ℘ P R, we define
gG G L L

1 ´1
x
qG p℘q “ rgG s p℘q, qL p℘q “ rgL1 s´1 p℘q
x (2.91)

and consider the Legendre transforms

xG p℘qq ´ x
LgG p℘q “ gG pq qG p℘q℘, xL p℘qq ´ x
LgL p℘q “ gL pq qL p℘q℘

of gG and gL . A straightforward calculation shows that

dLgG dLgL
xG p℘q,
p℘q “ ´q xL p℘q.
p℘q “ ´q (2.92)
d℘ d℘
50 Chapter 2. Phase equilibrium for multicomponent mixtures

If pYs , ξsIG , ξsII sI sII r rI rII rI rII


G , ξ L , ξ L q and pY , ξ G , ξ G , ξ L , ξ L q are two solutions of (2.83), we let

1
℘s “ gG xG q “ gL1 ps
ps xL q, 1
℘r “ gG xG q “ gL1 pr
pr xL q. (2.93)

Of a single-phase solution. Suppose pYs , ξsIG , ξsII sI sII


G , ξ L , ξ L q is a G single-phase solution. Then,

Ys “ 1, x
sG “ c, ξsIG “ c, ξsII
G “ 1 ´ c,
1
gG xG q “ gL1 ps
ps xL q,

and
sL “ lnpξsIL ` ξsII
ln σ L q “ gG pcq ` ps
1
xL ´ cqgG pcq ´ gL ps
xL q “ LgG p℘q
s ´ LgL p℘q.
s
by usual transformations. Thus, a G single-phase solution is necessarily given by formulas (2.85).
Furthermore, in order to ensure σ
sL ď 1, we must have

LgG p℘q
s ´ LgL p℘q
s ď 0. (2.94)

If the other solution pYr , ξrIG , ξrII rI rII


G , ξ L , ξ L q were in the same G single-phase regime, it would also
be explicitly given formulas (2.85) and would therefore coincide with pYs , ξsIG , ξsII sI sII
G , ξ L , ξ L q. For the
second solution to be distinct from the first one, it has to be either in the L single-phase or in
the two-phase regime.
If pYr , ξrIG , ξrII rI rII
G , ξ L , ξ L q were in the L single-phase regime, a similar analysis would reveal that
it is necessarily given by formulas (2.86) and that

LgG p℘q
r ´ LgL p℘q
r ě 0. (2.95)

Let us investigate three subcases.

(i) If ℘r ą ℘,
s then by inverting the increasing functions in (2.93) we have xsL ă c ă x rG , and
even xsL ă x
qL p℘q ă c ă x
qG p℘q ă x
rG for all ℘ P p℘,
s ℘q,
r using (2.91). Therefore, after (2.92),

d
pLgG ´ LgL qp℘q “ x
qL p℘q ´ x
qG p℘q ă 0
d℘

for all ℘ P p℘,


s ℘q.
r The difference LgG ´ LgL is decreasing over p℘,
s ℘q,
r whence

LgG p℘q
r ´ LgL p℘q
r ă LgG p℘q
s ´ LgL p℘q.
s

But this obviously contradicts (2.94)–(2.95).

(ii) If ℘r ă ℘,
s then by inverting the increasing functions in (2.93), we have x
rG ă c ă x sL , and
even xrG ă x
qG p℘q ă c ă x
qL p℘q ă x
sL for all ℘ P p℘,
r ℘q,
s using (2.91). Therefore, after (2.92),

d
pLgG ´ LgL qp℘q “ x
qL p℘q ´ x
qG p℘q ą 0
d℘

for all ℘ P p℘,


r ℘q.
s The difference LgG ´ LgL is increasing over r℘,
r ℘s,
s whence

LgG p℘q
r ´ LgL p℘q
r ă LgG p℘q
s ´ LgL p℘q.
s

This is the same contradiction as in (i).


2.4. Two-phase mixtures 51

(iii) If ℘r “ ℘,
s then gG 1 pcq “ g 1 pcq by (2.93). On the other hand, (2.94)–(2.95) imply that
L
LgG p℘q
s “ LgL p℘q.
s In other words,
1
gG pcq ´ cgG pcq “ gL pcq ´ cgL1 pcq,

from which we infer that gG pcq “ gL pcq. This means that c is an azeotropic composition,
which is excluded by the assumptions of the Theorem.

If pYr , ξrIG , ξrII rI rII


G , ξ L , ξ L q were in a strict two-phase regime, then c should lie strictly between x
rG
and x
rL . Furthermore, the common tangency implies

LgG p℘q
r ´ LgL p℘q
r “ 0. (2.96)

Let us investigate three subcases.

(i) If ℘r ą ℘,
s then by convexity x sL ă xrL ă c ă x
rG . For all ℘ P p℘,
s ℘q,
r we have x
sL ă x
qL p℘q ă
x
rL ă c ă x qG p℘q ă x
rG . Therefore,

d
pLgG ´ LgL qp℘q “ x
qL p℘q ´ x
qG p℘q ă 0
d℘

for all ℘ P p℘,


s ℘q.
r As before, we obtain a contradiction by comparing the values of LgG ´LgL
at ℘s and ℘.
r

(ii) If ℘r ă ℘,
s then by convexity x rG ă xrL ă c ă x
sL . For all ℘ P p℘,
r ℘q,
s we have x
rG ă x
qG p℘q ă
căx rL ă xqL p℘q ă x
sL . Therefore,

d
pLgG ´ LgL qp℘q “ x
qL p℘q ´ x
qG p℘q ą 0
d℘

for all ℘ P p℘,


r ℘q.
s Again, we obtain a contradiction by comparing the values of LgG ´ LgL
at ℘r and ℘.
s

(iii) If ℘r “ ℘,
s then xrG “ c by applying rgG1 s´1 . This entails Y
r “ 1, which means that we are
at a transition point. The second solution is not in a strict two-phase regime.

Of a two-phase solution. Suppose pYs , ξsIG , ξsII sI sII


G , ξ L , ξ L q is a strict two-phase solution. By algebraic
manipulations similar to the previous ones, it is not difficult to show that this two-phase solution
is necessarily given by formulas (2.84). This prevents any other solution pYr , ξrIG , ξrII rI sII
G , ξ L , ξ L q to
be in the strict two-phase regime. The only possibility for a second solution to exist is that it
is in a single-phase regime. However, we have just proven that a single-phase solution of (2.83)
cannot co-exist with any other solution, unless it is the same.
52 Chapter 2. Phase equilibrium for multicomponent mixtures
Chapter 3

Convexity analysis and extension of


Gibbs energy functions
Contents
3.1 Convexity analysis for simple Gibbs functions . . . . . . . . . . . . . 54
3.1.1 Henry’s law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.1.2 Margules’ law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.1.3 Van Laar’s law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.2 Cubic equations of state from a numerical perspective . . . . . . . . 61
3.2.1 General principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
3.2.2 Van der Waals’ law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.2.3 Peng-Robinson’s law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.3 Domain extension for cubic EOS-based Gibbs functions . . . . . . . 80
3.3.1 Trouble ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3.3.2 Direct method for binary mixture . . . . . . . . . . . . . . . . . . . . . . 82
3.3.3 Indirect method for multicomponent mixtures . . . . . . . . . . . . . . . 83

Après avoir formulé au chapitre précédent le problème de l’équilibre des phases d’un mélange composi-
tionnel de manière générale, nous nous intéressons à présent à l’expression de quelques lois physiques
spécifiques habituellement utilisées pour la fonction d’énergie de Gibbs.
La première famille de fonctions de Gibbs que nous examinons en §3.1 provient de lois physiques
assez simples. Il s’agit de la loi des coefficients constants pour un gaz multiconstituant et des modèles
d’activité de Margules et de Van Laar pour un liquide binaire. Pour chacune d’entre elles, nous étudions
dans l’espace de ses paramètres les régions assurant les Hypothèses 2.2, en particulier la stricte convexité.
La seconde famille est celle des fonctions de Gibbs associées à une équation d’état cubique. Tout en
rappelant en §3.2 leur construction, nous nous livrons à une analyse des zones d’existence d’une ou de
trois racines réelles. Cette analyse est effectuée directement dans le plan des paramètres adimensionnés,
ce qui consitue une originalité et fournit une expression analytique utile des frontières.
L’analyse révèle également des problèmes concernant le domaine de définition des fonctions de Gibbs,
fort nuisibles au bon fonctionnement de la formulation unifiée. Deux remèdes sont proposés en §3.3 pour
étendre les domaines de définition, le plus prometteur étant la méthode indirecte qui de par sa généralité
n’est pas restreinte au cas binaire.

53
54 Chapter 3. Convexity analysis and extension of Gibbs energy functions

In chapter §2, we formulated the phase equilibrium problem for a multicomponent mixture in a
quite general way, with an abstract molar Gibbs energy function per phase. Our goal is now to
review some widely used expressions of these Gibbs functions. As introduced in (2.31)–(2.32),
the molar Gibbs energy function takes the form
K
ÿ
gα pxq “ xi ln xi ` Ψα pxq (3.1)
i“I

for each phase α P P, where Ψα denotes the excess function. To alleviate notations, we have
dropped the phase subscript α for the dummy argument x P Ω Ă RK´1 . Specifying gα amounts
therefore to specifying Ψα , from which the fugacity coefficients are deduced by means of (2.33a)
[Lemma 2.2], which we rewrite as

ln Φjα pxq “ Ψα pxq ` ∇x Ψα pxq ¨ pδ j ´ xq, for all j P K. (3.2)

For each law of Ψα presented, we endeavour whenever possible to study its adequacy with the
Hypotheses 2.2, in particular the issue of strict convexity of gα .

3.1 Convexity analysis for simple Gibbs functions


In this section, the subscript α stands for the phase to which the physical law under consideration
applies. Let us start with some simple laws. Perhaps the simplest one is that of an ideal gas

Ψα ” 0.

In §2.3.3 [Proposition 2.4], we proved that an ideal gas fulfills Hypotheses 2.2.

3.1.1 Henry’s law


Next in the level of complexity is Henry’s law [62, 115]
K
ÿ
Ψα pxq “ xi ln k i (3.3)
i“1

where tk i uiPK are positive constants, each of them embodying a property of the corresponding
species. The fugacity coefficients are then

ln Φjα pxq “ ln k i , for all j P K. (3.4)

This is why this law is also referred to as the constant coefficients law.

Proposition 3.1. For all pk I , . . . , k K q P pR˚` qK , the molar Gibbs energy function gα associated
with Henry’s law fulfills Hypotheses 2.2.

Chứng minh. Since Ψα is affine with respect to x “ pxI , . . . , xK´1 q, its second derivatives all
vanish. Therefore, the Hessian matrix ∇2xx gα coincides with that of the Gibbs function of the
ideal gas. But this matrix was shown to be definite positive in Proposition 2.4. We still have to
check that the range of the gradient map

∇x gα pxq “ plnpk I xI q ´ lnpk K xK q, . . . , lnpk I xK´1 q ´ lnpk K xK qq.


3.1. Convexity analysis for simple Gibbs functions 55

is equal to RK´1 . For a given u “ puI , . . . , uK´1 q P RK´1 , the nonlinear system ∇x gα pxq “ u
can be cast into the K ˆ K linear system

k I xI ´ exppuI qk K xK “ 0,
..
.
k K´1 xK´1 ´ exppuK´1 qk K xK “ 0,
xI ` . . . ` xK´1 ` xK “ 1.

The first K ´ 1 components of the solution are

exppuI q{k I exppuK´1 q{k K´1


xI “ , ..., xK´1 “ .
1{k K ` K´1
ř i i
řK´1
i“I exppu q{k 1{k K ` i“I exppui q{k i

This defines a unique continuous inverse map r∇x gα s´1 : RK´1 Ñ Ω.

3.1.2 Margules’ law


We now consider two laws dedicated to binary mixtures, namely, Margules’ and Van Laar’s [100].
From the viewpoint of physics, these are in reality models for activity coefficients of liquid
instead fugacity coefficients. However, the mathematical structure of thermodynamic equilibria
via activity coefficients remains the same [96].
Since K ´ 1 “ 1, we simply write x instead of xI and x “ pxI q, as was done in §2.4.2. The
excess function associated with Margules’ law is

Ψα pxq “ xp1 ´ xq rA12 p1 ´ xq ` A21 xs , (3.5)

where pA12 , A21 q P pR˚ q2 are two nonzero constants. By (3.2), the fugacity coefficients are

ln ΦIα pxq “ rA12 ` 2pA21 ´ A12 qxs p1 ´ xq2 , (3.6a)


ln ΦII 2
α pxq “ rA21 ` 2pA12 ´ A21 qp1 ´ xqs x , (3.6b)

For a binary mixture, Hypotheses 2.3 are more appropriate than Hypotheses 2.2, as explained in
§2.4.2. To meet these requirements, the pair of parameters pA12 , A21 q must be restricted to some
region of R2 . The following result was obtained by Lai Nguyen [76] in his Master’s internship at
INSA Rennes, during which he joined the PhD team.

Proposition 3.2. Let S “ A12 `A21 and D “ A12 ´A21 . Then, the molar Gibbs energy function
gα associated with Margules’ law fulfills Hypotheses 2.3 if and only if

1“ 2 ‰1{2
S ă 4 and |D| ă S ´ 18S ` 54 ` 2p9 ´ 2Sq3{2 . (3.7)
3
The “good” region indicated by (3.7) is colored in striped green in Figure 3.2. Its right-most
point is located at pS, Dq “ p4, 0q, where it has a vertical tangent.

Chứng minh. We give an abridged version of the proof in [76]. The first derivative of gα is

gα1 pxq “ ln x ´ lnp1 ´ xq ` A12 ` p2A21 ´ 4A12 qx ` 3pA12 ´ A21 qx2 .


56 Chapter 3. Convexity analysis and extension of Gibbs energy functions

Figure 3.1: Plot of various curves involved in the proof of Proposition 3.2.

Figure 3.2: Region of strict convexity for the parameters of Margules’ law in the pS, Dq-plane.
3.1. Convexity analysis for simple Gibbs functions 57

This is a continuous function over p0, 1q, with

lim gα1 pxq “ ´8, lim gα1 pxq “ `8.


xÓ0 xÒ1

Thus, gα1 has range in R and can be extended to a surjection from r0, 1s to t´8u Y R Y t`8u.
The second derivative of gα , multiplied by xp1 ´ xq to remove singularities, is equal to

hpxq :“ xp1 ´ xqgα2 pxq “ 1 ` px ´ x2 q 2A21 ´ 4A12 ` 6pA12 ´ A21 qx .


“ ‰

` ˘
Let us change the variable to y “ x ´ 12 P ´ 12 , 21 to work with the more symmetric function
ˆ ˙ ˆ ˙
1 1 2
“ ‰
Hpyq :“ h x ´ “1` ´y 6pA12 ´ A21 qy ´ pA12 ` A21 q .
2 4
Introducing the sum S “ A12 ` A21 and the difference D “ A12 ´ A21 , the above function reads
ˆ ˙
1 2
HS,D pyq “ 1 ` ´ y p6Dy ´ Sq.
4
Our purpose is to look for the region
! )
R “ pS, Dq P R2 | min HS,D ą 0 .
r´1{2,1{2s

Note that since HS,´D pyq “ HS,D p´yq, this region is symmetric with respect to the axis D “ 0.
Therefore, we restrict ourselves to seeking pS, Dq such that D ě 0. For D “ 0, if S ą 0, the
function ˆ ˙
1 2
HS,0 pyq “ 1 ´ S ´y
4
reaches its minimum value at y “ 0, for which HS,0 p0q “ 1 ´ S{4; if S ď 0, the minimum is
achieved on the boundary y “ ˘1{2, where HS,0 p˘1{2q “ 1 ą 0. Therefore, pS, 0q P R if and
only if S ă 4. Assume now D ą 0. The derivative
ˆ ˙
3 3
1
HS,D pyq “ D ´ 18y ` 2Sy “ ´18Dy 2 ` 2Sy ` D
2
2 2
is cancelled at the two points ?
S˘ S 2 ` 27D2
y˘ “ .
18D
At least one of the two values y˘ must belong to p´1{2, 1{2q, since HS,D p´1{2q “ HS,D p1{2q “ 1
and by Rolle’s theorem. More accurately, it is easily proven that: (a) in the subregion 0 ă
D ă ´S{3, only y` P p´1{2, 1{2q; (b) in the subregion D ě |S|{3, both y´ and y` belong to
p´1{2, 1{2q; (c) in the subregion 0 ă D ă S{3, only y´ P p´1{2, 1{2q.
Case (a) can be settled quickly, without calculating HS,D py` q. Thanks to 0 ă D ă ´S{3, we
have 6Dy ´ S ą 0 for all y P r´1{2, 1{2s, hence HS,D1 ą 0 on this interval. This entails HS,D pyq ě
HS,D p´1{2q “ 1 ą 0. Thus, the subregion 0 ă D ă ´S{3 is contained inside R. In cases (b)
and (c), a more careful inspection involving HS,D1 p1{2q “ ´3D ´ S and HS,D 1 p1{2q “ ´3D ` S
shows that the minimum of HS,D is achieved at y´ . Let us compute HS,D py´ q by using not only
its value but also the identity
2 S 1
y´ “ y´ ` ,
9D 12
58 Chapter 3. Convexity analysis and extension of Gibbs energy functions

1
which comes from HS,D py´ q “ 0. After simplification, we end up with
?
S2
ˆ ˙
2 S ´ S 2 ` 27D2
HS,D py´ q “ 1 ´ S ` D ` .
9 27D 18D

After multiplication by 486D2 , the requirement HS,D py´ q ą 0 is equivalent to

pS 2 ` 27D2 q3{2 ă 486D2 ´ 81D2 S ` S 3 . (3.8)

The right-hand side can be shown to be positive in cases (b) et (c) and under the additional
condition S ă 4. Indeed, for S ą 0, 486D2 ´ 81D2 S ` S 3 “ 81D2 p6 ´ Sq ` S 3 ě 162D2 ` S 3 ą 0;
for S ă 0, 81D2 p6 ´ Sq ` S 3 ą 9S 2 p6 ´ Sq ` S 3 “ 2S 2 p27 ´ 4Sq ą 0. Note, however, that the
condition S ă 4 is necessary for all points in R. This is because HS,D p0q “ 1 ´ S{4 must be
positive. Therefore, S ă 4 can be taken for granted and the inequality (3.8) becomes equivalent
to its squared version, i.e., pS 2 ` 27D2 q3 ă p486D2 ´ 81D2 S ` S 3 q2 . Expanding both sides and
simplifying, we obtain

p3Dq4 ´ 2rS 2 ´ 18S ` 54sp3Dq2 ` S 3 pS ´ 4q ă 0.

The reduced discriminant of this quadratic inequation in p3Dq2 is equal to 4p9 ´ 2Sq3 . It is
positive, since S ă 4. Then, the solution is given by

S 2 ´ 18S ` 54 ´ 2p9 ´ 2Sq3{2 ă p3Dq2 ă S 2 ´ 18S ` 54 ` 2p9 ´ 2Sq3{2 . (3.9)

From the observation that S 2 ´ 18S ` 54 ` 2p9 ´ 2Sq3{2 ą 0 for S ă 4, we conclude that the
second inequality of (3.9) is equivalent to
1“ 2 ‰1{2
Dă S ´ 18S ` 54 ` 2p9 ´ 2Sq3{2 . (3.10)
3
The upperbound is plotted as the red curve in Figure 3.1. Regarding the first inequality of (3.9),
it is equivalent to S ě 0 or S ă 0 and
1“ 2 ‰1{2
Dą S ´ 18S ` 54 ´ 2p9 ´ 2Sq3{2 .
3
The lowerbound is plotted as the blue curve in Figure 3.1. It can be shown that this curve
lies inside the region 0 ă D ă ´S{3 of case (a). Therefore, the previous inequality is trivially
satisfied. The last detail to be checked is that the half-line D “ ´S{3 for S ă 0 is included in
the area bounded by the left part of the red curve, so that case (a) is algebraically contained in
the desired inequality (3.10). This is left to the reader.

3.1.3 Van Laar’s law


Van Laar’s law is also a model for activity coefficients of a liquid [100]. The excess Gibbs function
associated with it is
A12 A21 xp1 ´ xq
Ψα pxq “ , (3.11)
A12 x ` A21 p1 ´ xq
where pA12 , A21 q P pR˚ q2 are two nonzero constants. By (3.2), the fugacity coefficients are
„ 2
I A21 p1 ´ xq
ln Φα pxq “ A12 , (3.12a)
A12 x ` A21 p1 ´ xq
3.1. Convexity analysis for simple Gibbs functions 59

Figure 3.3: Region of strict convexity for the parameters of Van Laar’s law.

„ 2
A12 x
ln ΦII
α pxq “ A21 . (3.12b)
A12 x ` A21 p1 ´ xq

To make sure that formulas (3.11)–(3.12) are well-defined over x P p0, 1q, the denominator
A12 x ` A21 p1 ´ xq must keep the same sign. This amounts to requiring that

A12 A21 ą 0. (3.13)

In addition to (3.13), the pair of parameters pA12 , A21 q must be further restricted in order to
comply with Hypotheses 2.3. Again, Lai Nguyen [76] obtained the following result in his Master’s
internship within the PhD team.

Proposition 3.3. Let S “ A12 `A21 and D “ A12 ´A21 . Then, the molar Gibbs energy function
gα associated with Van Laar’s law fulfills Hypotheses 2.3 if and only if

pS, Dq P R´ Y R` , (3.14a)

where
(
R´ “ S ă 0 and |D| ă ´S , (3.14b)
2 3{2 1{2
(
R` “ 0 ă S ă 4 and |D| ă minpS; rS ´ 18S ` 54 ` 2p9 ´ 2Sq s q . (3.14c)

The “good” region indicated by (3.14) is colored in yellow in Figure 3.3. It lies inside the
cone D2 ă S 2 that corresponds to condition (3.13). The origin p0, 0q must be excluded.
60 Chapter 3. Convexity analysis and extension of Gibbs energy functions

Chứng minh. Although the proof is supplied in [76], we summarize it here, for this part to be
self-contained. The first derivative of gα is
A21 p1 ´ xq2 ´ A12 x2
gα1 pxq “ ln x ´ lnp1 ´ xq ` A12 A21 .
rA12 x ` A21 p1 ´ xqs2
Under assumption (3.13), this is a continuous function over p0, 1q, with

lim gα1 pxq “ ´8, lim gα1 pxq “ `8.


xÓ0 xÒ1

Thus, gα1 has range in R and can be extended to a surjection from r0, 1s to t´8u Y R Y t`8u.
The second derivative of gα , multiplied by xp1 ´ xq to get rid of singularities, is equal to
xp1 ´ xq
hpxq :“ xp1 ´ xqgα2 pxq “ 1 ´ 2A212 A221 .
pA12 x ` A21 p1 ´ xqq3
` ˘
Let us change the variable to y “ x ´ 12 P ´ 12 , 12 to work with the more symmetric function
ˆ ˙ 1 2
1 4 ´y
Hpyq :“ h x ´ “ 1 ´ 2A212 A221 “ ‰3 .
2 1
pA12 ` A21 q ` pA12 ´ A21 qy
2

Introducing the sum S “ A12 ` A21 and the difference D “ A12 ´ A21 , the above function reads
1{4 ´ y 2
HS,D pyq “ 1 ´ pS 2 ´ D2 q2 .
pS ` 2Dyq3
Our purpose is to look for the region
! )
R “ pS, Dq P R2 | D2 ă S 2 and min HS,D ą 0 ,
r´1{2,1{2s

where D2 ă S 2 is the expression of (3.13) in terms of pS, Dq. Note that since HS,´D pyq “
HS,D p´yq, this region is symmetric with respect to the axis D “ 0. Therefore, we restrict
ourselves to seeking pS, Dq such that D ě 0. For D “ 0, if S ą 0, the function
ˆ ˙
1 2
HS,0 pyq “ 1 ´ S ´y
4
reaches its minimum value at y “ 0, for which HS,0 p0q “ 1 ´ S{4; if S ď 0, the minimum
is achieved on the boundary y “ ˘1{2, where HS,0 p˘1{2q “ 1 ą 0. Therefore, pS, 0q P R if
and only if S ‰ 0 and S ă 4. Assume now D ą 0. Divide the upper half-plane D ą 0 into 3
subregions: (a) 0 ă D ă ´S; (b) |S| ď D; (c) 0 ă D ă S. Subregion (b) is ruled out by (3.13).
In subregion (a), S ` 2Dy ď S ` D ă 0 for all y P r´1{2, 1{2s, so that HS,D pyq ě 1 for all
y P r´1{2, 1{2s. Thus, the subregion 0 ă D ă ´S is a subset of R.
It remains to see what happens in region (c). The derivative

´4Dy 2 ` 4Sy ` 3D
1
HS,D pyq “ pS 2 ´ D2 q2
2pS ` 2Dyq4
is cancelled at the two points
" „ˆ ˙2 1{2 *
1 S S
y˘ “ ˘ `3 .
2 D D
3.2. Cubic equations of state from a numerical perspective 61

At least one of the two values y˘ must belong to p´1{2, 1{2q, since HS,D p´1{2q “ HS,D p1{2q “ 1
and by Rolle’s theorem. More accurately, it can be proven that in region (c) where 0 ă D ă S,
only y´ belongs to p´1{2, 1{2q and this is where HS,D attains its minimum. Let us compute
HS,D py´ q by using not only its value but also the identities

2 S 3 D ` 2Sy´ 2y´ 1 2 Sy´ 1 D ` 2Sy´


y´ “ y´ ` , “ , ´ y´ “´ ´ “´ ,
D 4 S ` 2Dy´ 3 4 D 2 2D
1
which all come from HS,D py´ q “ 0. After simplification, we end up with
? ?
pS ´ S 2 ` 3D2 qp2S ` S 2 ` 3D2 q2
HS,D py´ q “ 1 ` .
54D2
? ?
Then, HS,D py´ q ą 0 is equivalent to 54D2 ` pS ´ S 2 ` 3D2 qp2S ` S 2 ` 3D2 q2 ą 0. After
expansion and cancellations, the inequality can be reduced to

9D2 p6 ´ Sq ` S 3 ą pS 2 ` 3D2 q3{2 . (3.15)

Contrary to the proof of Proposition 3.2 for Margules’ law, at this point we are not sure that
the left-hand side of (3.15) is positive in region (c), since the additional condition S ă 4 cannot
be proven a priori (here HS,D p0q is not as simple as before). However, the positivity of the
left-hand side can be checked a posteriori, after squaring (3.15) to obtain

D4 ´ 2pS 2 ´ 18S ` 54qD2 ` S 4 ´ 4S 3 ă 0. (3.16)

Arguing in the same fashion as for Margules, with now D instead of 3D, the above inequation
can be turned into
D2 ă S 2 ´ 18S ` 54 ` 2p9 ´ 2Sq3{2 .
The right-hand side vanishes for S “ 4 and is negative for S ą 4. This implies S ă 4. The
corresponding curve is plotted in red in Figure 3.3.

3.2 Cubic equations of state from a numerical perspective


The fugacity laws investigated in §3.1 are simple and apply to a selected phase α, regardless of
the remaining ones. We are now going to revisit a prominent category of laws for a two-phase
(gas and liquid) mixture, in which the fugacity coefficients for both phases are computed in a
“simultaneous” way. The coupling between the two phases is achieved through a third-degree
polynomial equation, called cubic equation of state (EOS). Although there are many interesting
physical aspects underlying the design of such laws, our presentation will rather focus on their
computational structures and the mathematical issues that arise from their construction.

3.2.1 General principle


An equation of state is a formula that relates the state variables of a system under a given set
of conditions, such as pressure, volume and temperature. To understand the mechanism that
goes from an EOS to the fugacity coefficients via the excess Gibbs energy function, it is useful
to first consider the case of a pure component system.
62 Chapter 3. Convexity analysis and extension of Gibbs energy functions

3.2.1.1 For a pure component


The most popular equation of state is probably Boyle-Mariotte’s law for an ideal gas

RT
P“ , (3.17)
V
where P denotes the pressure, V the molar volume, T the temperature and R the universal
gas constant1 . Several corrections to (3.17) have been attempted in order to better reflect the
behavior of a real gas. Let us enumerate a few of them in historical order:

• Van der Waals [114]


RT a
P“ ´ ; (3.18)
V ´ b V2
• Redlich-Kwong-Soave [108, 111]

RT a
P“ ´ ; (3.19)
V ´ b VpV ` bq

• Peng-Robinson [99]
RT a
P“ ´ 2 . (3.20)
V ´ b V ` 2Vb ´ b2

Each of the relations (3.18)–(3.20) involves a pair of parameters pa, bq P pR˚` q2 that characterize
some physical properties of the pure component under study. However, depending on the type
of law, these are not the same! For each approximation, a long sequence of additional empiri-
cal formulas are usually provided to compute a and b from other quantities such as viscosity,
acentricity... In this work, the parameters pa, bq will be considered as fixed constants.
For later purposes, it is convenient to cast (3.17)–(3.20) in a dimensionless form. To this end,
let us introduce the dimensionless quantities

PV Pa Pb
Z“ , A“ , B“ . (3.21)
RT pRTq2 RT

The first quantity Z, called compressibility factor, will play a major role in the sequel. The last
two quantities pA, Bq P pR˚` q2 can be thought of as two dimensionless parameters that charac-
terize the pure component under study at fixed pressure and temperature. In the same spirit as
in chapter §2, we shall never write down explicitly the dependency of pA, Bq on pP, Tq. Then, a
straightforward calculation shows that equations (3.17)–(3.20) are respectively equivalent to:

• Boyle-Mariotte
Z ´ 1 “ 0; (3.22)

• Van der Waals


Z 3 ´ pB ` 1qZ 2 ` AZ ´ AB “ 0; (3.23)

• Redlich-Kwong-Soave

Z 3 ´ Z 2 ` pA ´ B ´ B 2 qZ ´ AB “ 0; (3.24)
1
R “ 8.314462618 S.I.
3.2. Cubic equations of state from a numerical perspective 63

• Peng-Robinson

Z 3 ` pB ´ 1qZ 2 ` pA ´ 2B ´ 3B 2 qZ ` pB 2 ` B 3 ´ ABq “ 0. (3.25)

Except for the first equation (3.22), the last three equations (3.23)–(3.25) are cubic polynomials
in Z. This is the rationale for the name “cubic EOS.”
Given a law and a pair pA, Bq P pR˚` q2 , let us suppose that the corresponding cubic equation
has three distinct real roots, all greater than B. These are then named

B ă ZL ă ZI ă ZG . (3.26)

In other words, the smallest root is associated with the liquid phase L, while the largest one
is associated with the gas phase G. From the physics point of view, at the same pressure and
temperature, the gas phase occupies a larger volume the liquid phase, which by (3.21) implies
that ZG ą ZL . As for the intermediate root ZI , it does not have any physical meaning2 . Like
pA, Bq, the physically significant roots pZG , ZL q can also be viewed as functions of pP, Tq. This
allows us to define żP
Zα p℘, Tq ´ 1 (
Ψα “ d℘, α P G, L , (3.27)
0 ℘
which also depend on pP, Tq. The Ψα ’s are called excess molar Gibbs energies, insofar as they
measure an integrated amount of non-ideality represented by Zα ´ 1.

Lemma 3.1. Under assumption (3.26) of three real roots greater than B for the cubic equation
of the law considered, the excess molar Gibbs energies Ψα , α P tG, Lu, are given by:

• Van der Waals


“ ‰ A
Ψα “ Zα ´ 1 ´ ln Zα ´ B ´ ; (3.28)

• Redlich-Kwong-Soave
„ 
“ A ‰ B
Ψα “ Zα ´ 1 ´ ln Zα ´ B ´ ln 1 ` ; (3.29)
B Zα

• Peng-Robinson
„ ? 
“ A ‰ Zα ` p 2 ` 1qB
Ψα “ Zα ´ 1 ´ ln Zα ´ B ´ ? ln ? . (3.30)
2 2B Zα ´ p 2 ´ 1qB

Chứng minh. The evaluation of integral (3.27) for the cubic EOS laws (3.23)–(3.25) can be found
in standard textbooks such as [104, 115].

Let us suppose now that the cubic equation has only one real root greater that B. In this
situation, two subcases have to be envisaged. If we manage to assign a “natural” phase label
α “ G or L to the real root, then the corresponding excess Gibbs energy Ψα is defined by
(3.27), leaving its counterpart in the other phase undefined. If we do not succeed in attributing
a “logical” phase label to the real root, then Ψα is undefined in both phases. This process is
intuitive enough to describe with words, but raises many serious mathematical questions:
2
A real root below B is not acceptable either, since b is meant to be the lower limit of the molar volume.
64 Chapter 3. Convexity analysis and extension of Gibbs energy functions

1. When does the cubic equation has three real roots greater than B and when does it have
only one real root greater than B?
2. When can a “natural” phase label be assigned to the unique real root greater than B and
when is it impossible?
These questions will be answered in §3.2.2 for Van der Waals’ law and in §3.2.3 for Peng-
Robinson’s law. For the moment, let us go on to see how the definition of the excess Gibbs
energies Ψα carries over to a multicomponent mixture.

3.2.1.2 For a multicomponent mixture


Let us go back to a multicomponent mixture whose set of species is K “ tI, II, . . . , Ku, with
K ě 2. Each component i P K is characterized by a pair of parameters pai , bi q P pR˚` q2 within
a selected cubic EOS law. At fixed pressure and temperature pP, Tq, this gives rise to a pair of
dimensionless parameters pAi , B i q P pR˚` q2 by the last two relations of (3.21).
The basic tenet here is that the multicomponent mixture behaves approximately as a ficti-
tious pure component endowed with an averaged value for the pair pA, Bq. The latter is computed
from the pAi , B i q’s and the current partial fractions by means of a mixing rule. More specifically,
let x “ pxI , . . . , xK´1 q P Ω be the partial fractions of the mixture in some phase. We deliber-
ately omit the phase subscript because x is a dummy argument at which we want to compute
both ΨG pxq and ΨL pxq. There can be found a wide variety of mixing rules [74, 96]. The most
commonly used one is
ÿÿ ?
xi xi Ai Aj 1 ´ κij ,
` ˘
Apxq “ (3.31a)
iPK jPK
ÿ
Bpxq “ xj B j , (3.31b)
jPK

where the coefficients κij P r0, 1q are coupling parameters and where we remind that xK must
be seen as 1 ´ xI ´ . . . ´ xK´1 . In this manuscript, we shall consider the even simpler version
where κij “ 0, which implies
ˆ ÿ ? ˙2
Apxq “ xj Aj . (3.32)
jPK

Whichever the user’s favorite mixing rule is, the idea is to plug Apxq, Bpxq into the cubic
equations (3.23)–(3.25) to get the real roots Zα pxq, α P tG, Lu, should one of these exist and
be greater than Bpxq. Then, insert Zα pxq into definition (3.27) in order to obtain Ψα pxq. This
amounts, in practice, to directly substituting Zα pxq, Apxq, Bpxq into formulas (3.28)–(3.30).
Finally, apply (3.2) to deduce the fugacity coefficients Φiα pxq. In the upcoming subsections
§3.2.2 and §3.2.3, we write down the explicit formulas for Ψα pxq and ln Φiα pxq and address the
two questions asked earlier.

3.2.2 Van der Waals’ law


Historically, the Van der Waals equation of state was a major breakthrough compared to the
perfect gas equation. Although it is nowadays no longer used in realistic simulations demanding
a great physical accuracy, it remains a valuable reference as a “toy model,” thanks to its relative
mathematical simplicity.
3.2. Cubic equations of state from a numerical perspective 65

3.2.2.1 Expression of fugacity coefficients


Given a smooth mixing rule that computes the parameters pApxq, Bpxqq P pR˚` q2 from the
partial fractions x P Ω, we consider the cubic equation

Z 3 pxq ´ rBpxq ` 1sZ 2 pxq ` ApxqZpxq ´ ApxqBpxq “ 0, (3.33)

which is the multicomponent counterpart of (3.23). Under the same caveats as in the pure
component case, let ZG pxq be the greatest real root and ZL pxq the smallest one, should there
exist three real roots greater than Bpxq. If there is only one real root greater than Bpxq, let
α P tG, Lu be the phase possibly assigned to it. The excess molar Gibbs energy is

Apxq
Ψα pxq “ Zα pxq ´ 1 ´ ln rZα pxq ´ Bpxqs ´ . (3.34)
Zα pxq

Theorem 3.1. The Van der Waals fugacity coefficients are given by

Bpxq ` ∇x Bpxq ¨ pδ i ´ xq
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs
Bpxq
Bpxq ` ∇x Bpxq ¨ pδ i ´ xq 2Apxq ` ∇x Apxq ¨ pδ i ´ xq Apxq
„ 
` ´ , (3.35)
Bpxq Apxq Zα pxq

for all i P K and for any phase α P tG, Lu in which Zα pxq ą Bpxq is well-defined.

We recall that the components of δ i “ pδi,1 , . . . , δi,K´1 q P RK´1 are Kronecker symbols and
we stress out that this result is valid for all smooth mixing rules.

Chứng minh. Taking the gradient of (3.34), we have


„ 
1 A 1 1
∇Ψα “ 1 ´ ` 2 ∇Zα ` ∇B ´ ∇A,
Zα ´ B Zα Zα ´ B Zα

in which we dropped the variable x for clarity. By virtue of the cubic equation (3.33),

1 A 1 Zα ´ 1 A
1´ ` 2 “ 0, “ ` .
Zα ´ B Zα Zα ´ B B BZα

Thus, „ 
Zα ´ 1 A 1 1
∇Ψα “ ∇B ` ∇B ´ ∇A .
B Zα B A
Applying (3.2) and using (3.34), we arrive at the desired result.

For the mixing rule (3.31b)–(3.32), let us define the “matrix-vector” product

? ˆÿ ? ˙
i j
A pxq “ Ai x Aj (3.36)
jPK

for all i P K, in order to state the following result.


66 Chapter 3. Convexity analysis and extension of Gibbs energy functions

Corollary 3.1. For the mixing rule (3.31b)–(3.32), the Van der Waals fugacity coefficients are
given by

Bi
„ i
2Ai pxq Apxq

i B
ln Φα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs ` ´ , (3.37)
Bpxq Bpxq Apxq Zα pxq

for all i P K and for any phase α P tG, Lu in which Zα pxq ą Bpxq is well-defined.

Chứng minh. From (3.31b), we infer that ∇B “ pB I ´ B K , . . . , B K´1 ´ B K q, so that


K´1
ÿ K´1
ÿ
Bpxq ` ∇x Bpxq ¨ pδ i ´ xq “ pB j ´ B K qxj ` B K ` pB j ´ B K qpδi,j ´ xj q “ B i ,
j“I j“I

řK´1
the last equality being due to j“I δi,j “ 1 ´ δi,K . By the chain rule, we can check that

K´1
BA ÿ
j
pxq “ 2 rAi pxq ´ AK pxqsδj,i ,
Bx i“I

with Ai pxq defined in (3.36). It then follows that


K´1
ÿ K´1
ÿ K´1
ÿ
∇x Apxq ¨ pδ i ´ xq “ 2 rAi pxq ´ AK pxqsδj,k pδi,j ´ xj q “ 2 rAk pxq ´ AK pxqspδi,k ´ xk q.
j“1 k“1 k“1

On the other hand,


K
ÿ K´1
ÿ
2Apxq “ 2 Ak pxqxk “ 2 rAk pxq ´ AK pxqsxk ` 2AK pxq.
k“1 k“1

Combining the last two equalities, we end up with


K´1
ÿ
2Apxq ` ∇x Apxq ¨ pδ i ´ xq “ 2 rAk pxq ´ AK pxqsδi,k ` 2AK pxq “ 2Ai pxq.
k“1

In view of (3.35) [Theorem 3.1], the proof is completed.

3.2.2.2 Critical parameters, subcritical and supercritical regimes


We now tackle the two questions formulated earlier about the number of real roots greater than
B and the assignability of a phase label to a real root, should it be the only one greater than
B. Part of these issues is already addressed in [80]. The available answers are always expressed
in terms of pP, Tq. What we wish, however, is to prove results in terms of pA, Bq, since these
dimensionless parameters are more useful to our numerical simulations.
Let pA, Bq P pR˚` q2 be a fixed pair of dimensionless parameters. Instead of working with the
polynomial
ΥA,B pZq “ Z 3 ´ pB ` 1qZ 2 ` AZ ´ AB, (3.38)
it is more convenient to work with the rational function
1 A
ΠA,B pZq “ ´ 2 ´1 (3.39)
Z ´B Z
3.2. Cubic equations of state from a numerical perspective 67

over pB, `8q. As ΥA,B pZq “ ´Z 2 pZ ´ BqΠA,B pZq, ΠA,B and ΥA,B have the same roots over
pB, `8q. Since
lim ΥA,B pZq “ `8, lim ΥA,B pZq “ ´1, (3.40)
ZÓB ZÑ`8

there is at least one root larger than B. In order to study ΠA,B more carefully, the following
notion will be most helpful.
Definition 3.1 (Critical point). A triplet pZc , Ac , Bc q P pB, `8qˆ pR˚` q2 is said to be a critical
point if
ΠAc ,Bc pZc q “ 0, Π1Ac ,Bc pZc q “ 0, Π2Ac ,Bc pZc q “ 0. (3.41)
Conditions (3.41), which are required on ΠA,B and not ΥA,B , mean that the graph of ΠAc ,Bc
has an inflection point at Zc , as examplified in Figure 3.4. From the critical triplet pZc , Ac , Bc q
and from (3.21), it can be deduced the critical pressure, molar volume and temperature

a Bc2 Zc a Bc
Pc “ , Vc “ b , Tc “ . (3.42)
b2 Ac Bc bR Ac

Lemma 3.2. For Van der Waals’ law, there is a unique critical point given by
3 27 1
Zc “ , Ac “ , Bc “ . (3.43)
8 64 8
Chứng minh. The last two conditions of (3.41), i.e., Π1Ac ,Bc pZc q “ Π2Ac ,Bc pZc q “ 0, are equivalent
to
1 2Ac 2 6Ac
2
“ 3, 3
“ 4,
pZc ´ Bc q Zc pZc ´ Bc q Zc
from which we draw 21 pZc ´ Bc q “ 31 Zc and

Zc “ 3Bc . (3.44)

Therefore, Ac “ Zc3 {r2pZc ´ Bc q2 s “ 27Bc3 {8Bc2 “ 27Bc {8 and


Bc 8
“ . (3.45)
Ac 27
Combining (3.44)–(3.45) with the first condition of (3.41), that is, ΠAc ,Bc pZc q “ 0, we find
Bc “ 1{8. This results in the critical values given by (3.43).

Using the critical values, the next statement is a first step in clarifying the behavior of ΠA,B .
Theorem 3.2 (Supercritical and subcritical regimes).
1. If B{A ą Bc {Ac “ 8{27, the function ΠA,B is decreasing over pB, `8q and has only one
zero greater than B.

2. If B{A ă Bc {Ac “ 8{27, the function ΠA,B has two disctinct local extrema. In other words,
there exist two distinct values ζL ă ζG in pB, `8q such that

Π1A,B pζL q “ Π1A,B pζG q “ 0.

Then, ΠA,B is decreasing on pB, ζL q, increasing on pζL , ζG q and decreasing on pζG , `8q.
It may have one or three distinct zeroes over pB, `8q.
68 Chapter 3. Convexity analysis and extension of Gibbs energy functions

Function when A = 0.42188, B = 0.125


5

ZC
0 B

-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Z

Figure 3.4: At critical values, ΠAc ,Bc has an inflection point at Zc .

1
A/B > 27/8

A/B = 27/8
-1

-2

-3 A/B < 27/8

-4

-5

-0.5 0 0.5 1 1.5 2 2.5 3

Figure 3.5: Plot of the function T ÞÑ qA,B pTq for various values of A{B.
3.2. Cubic equations of state from a numerical perspective 69

The practical and fundamental interest of Theorem 3.2 lies in the following phase assignment
procedure for a root, depending to its location.
Definition 3.2 (Phase label assignment). The region 0 ă B ă pBc {Ac qA “ p8{27qA is said to
be subcritical. In the subcritical region, a root Z ą B of the cubic equation (3.23) is said to be
associated with the liquid phase L if Z ă ζL ; a root Z ą B of the cubic equation (3.23) is said
to be associated with the gas phase G if Z ą ζG .
Let us elaborate on this Definition before proving Theorem 3.2. If there is only one root
Z ą B, this root cannot belong to pζL , ζG q. Therefore, either Z P pB, ζL q as in Figure 3.7, or
Z P pζG , `8q as in Figure 3.8. This way of assigning a phase label to Z is most natural, since
it extends by continuity the “topological” pattern observed in the case of three roots.
The region B ą pBc {Ac qA “ p8{27q is said to be supercritical. The graph of ΠA,B no longer
has two discernable branches, as shown in Figure 3.9. In this configuration, there is no natural
way to associate Z with a phase. We shall not venture into supercritical fluids in this thesis.
Physically speaking, the critical threshold Bc {Ac corresponds to a critical temperature Tc by
(3.42). Above the critical temperature, the distinction between gas and liquid phases no longer
holds [39] and it does not make sense to talk about phase transition.

Chứng minh. (of Theorem 3.2) To find the local extrema of ΠA,B on pB, `8q, we search for the
zeros on pB, `8q of its dervivative
1 2A
Π1A,B pZq “ ´ 2 ` Z3 ,
pZ ´ Bq
or equivalently, of the polynomial

QA,B pZq :“ Z 3 pZ ´ Bq2 Π1A,B pZq “ ´Z 3 ` 2A pZ ´ Bq2 .

An even more convenient choice is to set T “ pZ ´ Bq{B P p0, `8q and to study
1 A
qA,B pTq :“ 3
QA,B pBT ` Bq “ ´pT ` 1q3 ` 2 T2 .
B B
By inserting Ac {Bc , the latter function can be recast as
„  ˆ ˙
3 Ac 2 A Ac
qA,B pTq “ ´ pT ` 1q ` 2 T `2 ´ T2
Bc B Bc

The polynomial in the bracket of the right-hand side, equal to qAc ,Bc , can be factored by pT´2q2 .
This follows from the definition of the critical values, according to which Tc “ Zc {Bc ´ 1 “ 2 is
a double zero of the qAc ,Bc . After using Ac {Bc “ 27{8 and factoring the bracket, we have
ˆ ˙ ˆ ˙ ˆ ˙
2 1 A Ac 2 A Ac
qA,B pTq “ ´pT ´ 2q T ` `2 ´ T “ qAc ,Bc pTq ` 2 ´ T2 . (3.46)
4 B Bc B Bc

Note that qA,B p0q “ ´1 and limTÑ`8 qA,B pTq “ ´8 for all pA, Bq P pR˚` q2 . For pAc , Bc q, the
graph of qAc ,Bc is tangent to the T-axis at T “ 2 while taking nonnegative values qAc ,Bc pTq ď 0
for T ě 0, as shown in Figure 3.5.
If A{B ą Ac {Bc , then qA,B p2q ą 0 and qA,B vanhishes twice on p0, `8q. If A{B ă Ac {Bc ,
then qA,B pTq ă qAc ,Bc pTq for all T ą 0 (3.46) and qA,B does not vanish on p0, `8q. These two
cases are also depicted in Figure 3.5. This completes the proof.
70 Chapter 3. Convexity analysis and extension of Gibbs energy functions

Function when A = 0.36, B = 0.1

2.5

1.5

0.5

0
BZ ZI ZG
L

-0.5

-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Z

Figure 3.6: 3 roots B ă ZL ă ZI ă ZG .

Function when A = 0.39, B = 0.1

1.5

0.5

0
B ZL

-0.5

-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Z

Figure 3.7: 1 subcritical root, assigned to phase L.


3.2. Cubic equations of state from a numerical perspective 71

Function when A = 0.35, B = 0.1

2.5

1.5

0.5

0
B ZG
-0.5

-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Z

Figure 3.8: 1 subcritical root, assigned to phase G.

Function when A = 0.3, B = 0.1

0
B Z0

-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Z

Figure 3.9: 1 supercritical root, not assignable to any phase.


72 Chapter 3. Convexity analysis and extension of Gibbs energy functions

3.2.2.3 Three-root and one-root regions


In terms of pA, Bq, we are also able to derive a necessary and sufficient condition for the existence
of three real roots greater than B. This result does not seem to be well-known in the literature.

Theorem 3.3. In the quarter-plane pA, Bq P pR˚` q2 , the region for which Van der Waals’ cubic
equation (3.23) has three real roots, all greater than B, is determined by
(
0 ă B ă 1{8, AG pBq ă A ă AL pBq , (3.47a)

where 5 1 ´1 ¯3{2
AG pBq “ ´B 2 ` B ` ´ ´ 2B , (3.47b)
2 8 4
5 1 ´1 ¯3{2
AL pBq “ ´B 2 ` B ` ` ´ 2B . (3.47c)
2 8 4
This three-root region lies entirely inside the subcritical domain 0 ă p27{8qB ă A. Moreover,
(
• for 0 ă B ă 1{8, p27{8qB ă A ă AG pBq , the only real root is associated with the gas
phase G, in the sense of Definition 3.2;
(
• for 0 ă B ă 1{8, AL pBq ă Au or t1{8 ă B, p27{8qB ă A , the only real root is
associated with the liquid phase L, in the sense of Definition 3.2.

Figure 3.10: Number of roots for Van der Waal’s law in the pA, Bq-quarter plane.

The three-root region characterized by (3.47) is colored in cyan in Figure 3.10. The first
branch AG p¨q starts at pA, Bq “ p0, 0q with slope A1G pB “ 0q “ 4. The second branch AL p¨q starts
at pA, Bq “ p1{4, 0q with slope A1L pB “ 0q “ 1. Both branches end at pA, Bq “ p27{64, 1{8q,
with the common slope A1G pB “ 1{8q “ A1L pB “ 1{8q “ 9{4.

Chứng minh. The discriminant of the cubic equation (3.23) is3

∆pA, Bq “ pB ` 1q2 A2 ´ 4A3 ´ 4 pB ` 1q3 AB ´ 27A2 B 2 ` 18 pB ` 1q A2 B.

Since A ą 0, we can consider ∆{A and arrange it as a second-degree polynomial in A, that is,

∆pA, Bq{A “ ´4A2 ` p1 ` 20B ´ 8B 2 qA ´ 4BpB ` 1q3 . (3.48)


3
The discriminant of the cubic equation aX 3 ` bX 2 ` cX ` d “ 0 is ∆ “ b2 c2 ´ 4ac3 ´ 4b3 d ´ 27a2 d2 ` 18abcd.
3.2. Cubic equations of state from a numerical perspective 73

For the cubic equation (3.23) to have three distinct real roots, ∆pA, Bq{A must be positive. For
this to happen, since its leading coefficient ´4 is negative, the quadratic polynmial (3.48) must
have two distinct real roots and A must lie between these two roots. But the discriminant of
(3.48) with respect to A is
∆A pBq “ p1 ` 20B ´ 8B 2 q2 ´ 64BpB ` 1q3 “ ´512B 3 ` 192B 2 ´ 24B ` 1 “ p1 ´ 8Bq3 .
A necessary and sufficient condition for the quadratic polynomial (3.48) to have two distinct
real roots is 0 ă B ă 1{8. When this occurs, the two roots of (3.48) are precisely AG pBq and
AL pBq defined by (3.47b)–(3.47c). Therefore, the region defined in (3.47) characterizes those
pA, Bq P pR˚` q2 for which Van der Waals’ cubic equation (3.23) has three distinct real roots.
Nevertheless, we still have to verify that these three real roots are all greater than B. We
already know that at least one of them, say Z0 , is greater than B ą 0. Since the product of the
roots are equal to AB ą 0, the two remaing roots Z1 ă Z2 must have the same sign. We claim
that this common sign cannot be negative. Indeed, let ΥA,B be the Van der Waals polynomial
defined in (3.38). Since ΥA,B pZ1 q “ ΥA,B pZ2 q “ 0, there exists by Rolle’s theorem ζ P pZ1 , Z2 q
such that Υ1A,B pζq “ 0. Assume that Z1 ă 0 and Z2 ă 0. Then ζ ă 0. But then it is obvious
that Υ1A,B pζq “ 3ζ 2 ´ 2pB ` 1qζ ` A ą 0. This is a contradiction.
Next, we claim that the commun sign shared by Z1 and Z2 cannot be positive either. For
one, we observe that it is not possible to have Z1 ă B and Z2 ą B: otherwise, there will be
exactly two roots on pB, `8q, we contradicts what we already know. For another, assume that
both Z1 and Z2 belong to p0, Bq. As before, there exists ζ P pZ1 , Z2 q Ă p0, Bq such that
Υ1A,B pζq “ 3ζ 2 ´ 2pB ` 1qζ ` A “ 0. (3.49)
Since ΥA,B p0q “ ´AB ă 0 and ΥA,B pBq “ ´B 2 ă 0, we must have ΥA,B pζq ą 0. Using
repeatedly ζ 2 “ 23 pB ` 1qζ ´ 13 A, we have ζ 3 “ 23 ζ 2 ´ 31 Aζ “ r 49 pB ` 1q2 ´ 31 Asζ ´ 23 pB ` 1qA,
and finally (after some tedious algebra)
2“
pB ` 1q2 ´ 3A ζ ´ 2AB ´ A.

ΥA,B pζq “ ´
9
On the other hand, solving the quadratic equation (3.49), we find
a
B ` 1 ´ pB ` 1q2 ´ 3A
ζ“ . (3.50)
3
Note that pB ` 1q2 ´ 3A ě 0 in the region defined by (3.47) and that we have to select the
minus sign in (3.50), as the plus sign is for the other root of Υ1A,B that lies between Z2 ă B and
Z0 ą B. Pluggin (3.50) into (3.49), we end up with
2“ 2
‰! “ 2
‰1{2 )
ΥA,B pζq “ ´ pB ` 1q ´ 3A pB ` 1q ´ pB ` 1q ´ 3A ´ 2AB ´ A.
27
The right-hand side is negative, since B ` 1 ą rpB ` 1q2 ´ 3As1{2 . Again, this is a contradiction.
A study of the function B ÞÑ AG pBq ´ p27{8qB shows that it is positive for B P p0, 1{8q.
Hence, the graph of AG lies inside the subsonic domain. The same is true for AL ą AG . We
leave the statements regarding the phase labels of the one-root regions to the readers.

3.2.3 Peng-Robinson’s law


By today’s standard, Peng-Robinson’s law is the most advanced EOS in terms of accuracy. It is
very widely used in industrial codes, including those of IFPEN.
74 Chapter 3. Convexity analysis and extension of Gibbs energy functions

3.2.3.1 Expression of fugacity coefficients


Given a smooth mixing rule that computes the parameters pApxq, Bpxqq P pR˚` q2 from the
partial fractions x P Ω, we consider the cubic equation
Z 3 pxq ` pBpxq ´ 1qZ 2 pxq
` rApxq ´ 2Bpxq ´ 3B 2 pxqsZpxq ` rB 2 pxq ` B 3 pxq ´ ApxqBpxqs “ 0, (3.51)
which is the multicomponent counterpart of (3.23). Let ZG pxq be the greatest real root and
ZL pxq the smallest one, should there exist three real roots greater than Bpxq. If there is only
one real root greater than Bpxq, let α P tG, Lu be the phase possibly assigned to it. The excess
molar Gibbs energy is
„ ? 
Apxq Zα pxq ` p1 ` 2qBpxq
Ψα pxq “ Zα pxq ´ 1 ´ ln rZα pxq ´ Bpxqs ´ ? ln ? . (3.52)
2 2Bpxq Zα pxq ´ p 2 ´ 1qBpxq
Theorem 3.4. The Peng-Robinson fugacity coefficients are given by
Bpxq ` ∇x Bpxq ¨ pδ i ´ xq
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs
Bpxq
Bpxq ` ∇x Bpxq ¨ pδ i ´ xq 2Apxq ` ∇x Apxq ¨ pδ i ´ xq
„ 
` ´
Bpxq Apxq
„ ? 
Apxq Zα pxq ` p1 ` 2qBpxq
¨ ? ln ? , (3.53)
2 2Bpxq Zα pxq ´ p 2 ´ 1qBpxq
for all i P K and for any phase α P tG, Lu in which Zα pxq ą Bpxq is well-defined.
Chứng minh. Taking the gradient of (3.52), we have
" *
1 A A
∇Ψα “ 1 ´ ´ ? ? ` ? ? ∇Zα
Zα ´ B 2 2BrZ ` p 2 ` 1qBs 2 2BrZ ´ p 2 ` 1qBs
" ? ?
1 Ap 2 ` 1q Ap 2 ´ 1q
` ´ ? ? ´ ? ?
Zα ´ B 2 2rZ ` p 2 ` 1qBs 2 2rZ ´ p 2 ` 1qBs
„ ? *
A Zα pxq ` p1 ` 2qBpxq
` ? 2 ln ? ∇B
2 2B Zα pxq ´ p 2 ´ 1qBpxq
„ ? 
1 Zα pxq ` p1 ` 2qBpxq
´ ? ln ? ∇A,
2 2B Zα pxq ´ p 2 ´ 1qBpxq
in which we dropped the variable x for clarity. By virtue of the cubic equation (3.51),
1 A A
1´ ´ ? ? ` ? ? “0
Zα ´ B 2 2BrZ ` p 2 ` 1qBs 2 2BrZ ´ p 2 ` 1qBs
and ? ?
1 Ap 2 ` 1q Ap 2 ´ 1q Zα ´ 1
´ ? ? ´ ? ? “ .
Zα ´ B 2 2rZ ` p 2 ` 1qBs 2 2rZ ´ p 2 ` 1qBs B
Thus,
„ ? " *
Zα ´ 1 A Zα pxq ` p1 ` 2qBpxq 1 1
∇Ψα “ ∇B ` ? ln ? ∇B ´ ∇A .
B 2 2B Zα pxq ´ p 2 ´ 1qBpxq B A
Applying (3.2) and using (3.52), we arrive at the desired result.
3.2. Cubic equations of state from a numerical perspective 75

Theorem 3.4 is valid for all smooth mixing rules. For the mixing rule (3.31b)–(3.32), and
using the notation Ai pxq defined in (3.36), we have the following result.
Corollary 3.2. For the mixing rule (3.31b)–(3.32), the Peng-Robinson fugacity coefficients are
given by

Bi
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs
Bpxq
„ i ?
2Ai pxq
 „ 
B Apxq Zα pxq ` p1 ` 2qBpxq
` ´ ? ln ? , (3.54)
Bpxq Apxq 2 2Bp xq Zα pxq ´ p 2 ´ 1qBpxq

for all i P K and for any phase α P tG, Lu in which Zα pxq ą Bpxq is well-defined.
Chứng minh. Identical to Corollary 3.1.

3.2.3.2 Critical point, supersonic and subsonic regimes


The questions about the number of roots of Peng-Robinson’s cubic equation (3.25) and the
assignability of a phase label to a root can be dealt with in the same fashion as in the Van der
Waals case, even though the calculations are slightly more technical. Let

ΥA,B pZq “ Z 3 ` pB ´ 1qZ 2 ` pA ´ 2B ´ 3B 2 qZ ` pB 2 ` B 3 ´ ABq (3.55)

be the Peng-Robinson polynomial for a fixed pair pA, Bq P pR˚` q2 . Introduce the rational function

1 A
ΠA,B pZq “ ´ 2 ´ 1, (3.56)
Z ´ B Z ` 2BZ ´ B 2
obtained from ΥA,B through division
? by ´pZ?´ BqpZ 2 ` 2BZ ´ B 2 q. Insofar as the roots of
Z 2 ` 2BZ ´ B 2 , namely, ´Bp 2 ` 1q and Bp 2 ´ 1q, are both lesser than B, ΠA,B and ΥA,B
have the same roots over pB, `8q. Since

lim ΥA,B pZq “ `8, lim ΥA,B pZq “ ´1, (3.57)


ZÓB ZÑ`8

there is at least one root larger than B. As in Definition 3.1, a triplet pZc , Ac , Bc q P pB, `8q ˆ
pR˚` q2 is said to be a critical point if

ΠAc ,Bc pZc q “ 0, Π1Ac ,Bc pZc q “ 0, Π2Ac ,Bc pZc q “ 0. (3.58)

Lemma 3.3. For Peng-Robinson’ law, there is a unique critical point given by
„ b b 
1 3 ? 3 ?
Zc “ 11 ` 16 2 ´ 13 ´ 16 2 ` 13 , (3.59a)
32
„ b b 
1 3 ? 3 ?
Ac “ ´ 59 ` 3 276831 ´ 192512 2 ` 3 276231 ` 192512 2 , (3.59b)
512
„ b b 
1 3 ? 3 ?
Bc “ ´ 1 ´ 3 16 2 ´ 13 ` 3 16 2 ` 13 . (3.59c)
32
Approximately,

Zc « 0.307401308, Ac « 0.457235529, Bc « 0.077796073. (3.59d)


76 Chapter 3. Convexity analysis and extension of Gibbs energy functions

Chứng minh. The last two conditions of (3.58), i.e., Π1Ac ,Bc pZc q “ Π2Ac ,Bc pZc q “ 0, are equivalent
to

pZc2 ` 2Bc Zc ´ Bc2 q2 “ 2Ac pZc ` Bc qpZc ´ Bc q2 , (3.60a)


4pZc ` Bc qpZc2 ` 2Bc Zc ` Bc2 q “ 2Ac pZc ´ Bc qp3Zc ` Bc q. (3.60b)

By eliminating Ac from (3.60), we have

4pZc ´ Bc qpZc ` Bc q2 “ p3Zc ` Bc q2 pZc2 ` 2Bc Zc ´ Bc2 q.

Setting zc “ Zc {Bc , the above equation becomes 4pzc ´ 1qpzc ` 1q2 “ p3zc ` 1qpzc2 ` 2zc ´ 1q and
reduces to zc3 ´ 3zc2 ´ 3zc ´ 3 “ 0. The only real root is
b b
3 ? 3 ?
zc “ 1 ` 4 ´ 2 2 ` 4 ` 2 2 « 3.951373036. (3.61)

Dividing (3.60b) by Bc3 yields

Ac 2pzc ` 1qpzc2 ` 2zc ´ 1q


“ .
Bc pzc ´ 1qp3zc ` 1q

Plugging the value (3.61) of zc into this expression, we obtain


„ b b 
Ac 1 3 ? 3 ?
“ 41 ` 3 827 ´ 384 2 ` 3 827 ` 384 2 « 5.877359949 (3.62)
Bc 16

The first condition of (3.58), i.e., ΠAc ,Bc pZc q “ 0, reads

1 Ac {Bc
´ 2
“ 1.
Bc pzc ´ 1q Bc pzc ` 2zc ´ 1q

Knowing zc and Ac {Bc from (3.61)–(3.62), we can infer Bc from the previous equation. Once
this is done, we can compute Zc “ zc Bc and Ac “ pAc {Bc qBc to retrieve (3.59).

The behavior of ΠA,B for Peng-Robinson’s law is similar to that of Van der Waals’ law.
Before stating the corresponding theorem, let us remark that by taking the inverse of (3.62), we
have „ b b 
Bc 1 3 ? 3 ?
“ 8 ´ 3 8 ` 6 2 ` 3 ´8 ` 6 2 « 0.170144420 (3.63)
Ac 16
Theorem 3.5 (Supercritical and subcritical regimes).

1. If B{A ą Bc {Ac « 0.170144420, the function ΠA,B is decreasing over pB, `8q and has
only one zero greater than B.

2. If B{A ă Bc {Ac « 0.170144420, the function ΠA,B has two disctinct local extrema. In
other words, there exist two distinct values ζL ă ζG in pB, `8q such that

Π1A,B pζL q “ Π1A,B pζG q “ 0.

Then, ΠA,B is decreasing on pB, ζL q, increasing on pζL , ζG q and decreasing on pζG , `8q.
It may have one or three distinct zeros over pB, `8q.
3.2. Cubic equations of state from a numerical perspective 77

As was the case for Theorem 3.2, Theorem 3.5 paves the way to a natural association of a
root with a phase in the subcritical regime.
Definition 3.3 (Phase label assignment). The region 0 ă B ă pBc {Ac qA is said to be subcritical.
In the subcritical region, a root Z ą B of the cubic equation (3.25) is said to be associated with
the liquid phase L if Z ă ζL ; a root Z ą B of the cubic equation (3.25) is said to be associated
with the gas phase G if Z ą ζG .
Let us now prove Theorem 3.5.

Chứng minh. To find the local extrema of ΠA,B on pB, `8q, we search for the zeros on pB, `8q
of its dervivative
1 Ap2Z ` 2Bq
Π1A,B pZq “ ´ 2
` 2 ,
pZ ´ Bq pZ ` 2BZ ´ B 2 q2
or equivalently, of the polynomial

QA,B pZq :“ pZ ´ Bq2 pZ 2 ` 2BZ ´ B 2 q2 Π1A,B pZq


“ ´pZ 2 ` 2BZ ´ B 2 q2 ` 2ApZ ` BqpZ ´ Bq2 .

An even more convenient choice is to set T “ pZ ´ Bq{B P p0, `8q and to study
1 A
qA,B pTq :“ 4
QA,B pBT ` Bq “ ´pT2 ` 4T ` 2q2 ` 2 pT ` 2qT2 . (3.64)
B B
By inserting Ac {Bc , the latter function can be recast as
„  ˆ ˙
Ac A Ac
qA,B pTq “ ´ pT2 ` 4T ` 2q2 ` 2 pT ` 2qT2 ` 2 ´ pT ` 2qT2
Bc B Bc

The polynomial in the bracket of the right-hand side, equal to qAc ,Bc , can be factored by pT´Tc q2 ,
where Tc “ zc ´ 1. This follows from the definition of the critical values, according to which
Tc “ Zc {Bc ´ 1 “ 2 is a double zero of the qAc ,Bc . The difficulty here is that, contrary to the Van
der Waals case, factorization is not easy to carry out by hand, because Ac {Bc is irrational. To
circumvent this difficulty, let us use another technique. Since qAc ,Bc is a fourth-degree polynomial,
it is equal to its fourth-order Taylor expansion at T “ Tc , that is,
1
qAc ,Bc pTq “ qAc ,Bc pTc q ` qA c ,Bc
pTc qpT ´ Tc q
p3q 1 p4q
` 21 qA
2
c ,Bc
pTc qpT ´ Tc q2 ` 16 qAc ,Bc pTc qpT ´ Tc q3 ` 24 qAc ,Bc pTc qpT ´ TC q4 .
1
In view of qAc ,Bc pTc q “ qA pTc q “ 0, the factorization sought for is
c ,Bc

1
“ 2 p3q p4q ‰
qAc ,Bc pTq “ 24 pT ´ Tc q2 12qA c ,B c
pTc q ` 4q A ,B pTc qpT ´ Tc q ` q Ac ,Bc pTc qpT ´ Tc q2

1
“ ‰ c c
“ 24 pT ´ Tc q2 q0 ` q1 T ` q2 T2 ,

where the coefficients of the rearrangement in the second line are


p3q p4q
2
q0 “ 12qA c ,Bc
pTc q ´ 4qAc ,Bc pTc qTc ` qAc ,Bc pTc qT2C
p3q p4q
q1 “ 4qAc ,Bc pTc q ´ 2qAc ,Bc pTc qTc ,
p4q
q2 “ qAc ,Bc pTc q.
78 Chapter 3. Convexity analysis and extension of Gibbs energy functions

If we could prove that the coefficients of the polynomial in the bracket are all negative, i.e.,
q0 ă 0, q1 ă 0 and q2 ă 0, then it would be plain that qAc ,Bc pTq ă 0 for all T ą 0, except at the
double zero T “ Tc . Then, the end of the proof would be similar to that of Theorem 3.2. Upon
differentiating (3.64) repeatedly, we have
Ac
2
qA c ,Bc
pTc q “ ´4p3T2c ` 12Tc ` 10q ` 4 p3Tc ´ 2q,
Bc
p3q Ac
qAc ,Bc pTc q “ ´24pTc ` 2q ` 12 ,
Bc
p4q
qAc ,Bc pTc q “ ´24.

By a brute-force calculation relying on the values (3.61)–(3.62) for zc and Ac {Bc , we end up
with q0 « ´11.02105, q1 « ´437.98968, q2 “ ´24. This completes the proof.

3.2.3.3 Three-root and one-root regions


In terms of pA, Bq, we are going to derive a necessary (and perhaps sufficient) condition for the
existence of three real roots greater than B.
Theorem 3.6. In the quarter-plane pA, Bq P pR˚` q2 , the region for which Peng-Robinson’s cubic
equation (3.25) has three real roots, all greater than B, is contained in the region
(
0 ă B ă Bc , AG pBq ă A ă AL pBq , (3.65a)

where AG pBq and AL pBq are respectively the middle root and greatest roots of the cubic equation

´4A3 ´ p8B 2 ´ 40B ´ 1qA2 ` p16B 4 ´ 112B 3 ´ 88B 2 ´ 8BqA


` p32B 6 ` 128B 5 ` 160B 4 ` 64B 3 ` 8B 2 q “ 0. (3.65b)

The region (3.65) lies itself inside the subcritical domain 0 ă B ă pBc {Ac qA. Moreover,
(
• for 0 ă B ă Bc , pAc {Bc qB ă A ă AG pBq , the only real root is associated with the gas
phase G, in the sense of Definition 3.3;
(
• for 0 ă B ă Bc , AL pBq ă Au or tBc ă B, pAc {Bc qB ă A , the only real root is
associated with the liquid phase L, in the sense of Definition 3.3.

Figure 3.11: Number of roots for Peng-Robinson’s law in the pA, Bq-quarter plane.

The region characterized by (3.65) is colored in cyan in Figure 3.11. Inside it, Peng-Robinson’s
cubic equation (3.25) has three real roots. Nevertheless, we could not prove that all the roots
3.2. Cubic equations of state from a numerical perspective 79

are greater than B, despite abundant numerical evidences supporting the validity? of this claim.
The first branch AG p¨q starts at pA, Bq “ p0, 0q with slope A1G pB “ 0q “ 4 ` 2 2. The second
branch AL p¨q starts at pA, Bq “ p1{4, 0q with slope A1L pB “ 0q “ 2. Both branches end at
pA, Bq “ pAc , Bc q, with the common slope A1G pB “ Bc q “ A1L pB “ Bc q « 2.95686087.

Chứng minh. The discriminant of the cubic equation (3.25) is

∆pA, Bq “ ´4A3 ´ p8B 2 ´ 40B ´ 1qA2 ` p16B 4 ´ 112B 3 ´ 88B 2 ´ 8BqA


` p32B 6 ` 128B 5 ` 160B 4 ` 64B 3 ` 8B 2 q. (3.66)

For the cubic equation (3.25) to have three distinct real roots, ∆pA, Bq must be positive. If
the cubic polynomial (3.66) has only one real root A0 pBq, since the leading coefficient ´4 is
negative, we must have A ă A0 pBq to ensure ∆pA, Bq ą 0. If the cubic polynomial (3.66) has
three real roots A0 pBq ă AG pBq ă AL pBq, we must have A ă A0 pBq or A P pAG pBq, AL pBqq.
The discriminant of (3.66) with respect to A is equal to

∆A pBq “ ´32B 2 p64B 3 ` 6B 2 ` 12B ´ 1q


¨ p4096B 6 ` 768B 5 ` 1572B 4 ` 16B 3 ` 132B 2 ´ 24B ` 1q.

It can be shown that ∆A pBq ą 0 for B P p0, Bc q, ∆A pBc q “ 04 and ∆A pBq ă 0 for B ą Bc .
Therefore, if B ą Bc , only A0 pBq exists. If B P p0, Bc q, there exist A0 pBq ă AG pBq ă AL pBq.
Let us show that A0 pBq ą 0. First, assume B P p0, Bc q. Then, it is easily proven that

´8B 2 ` 40B ` 1 ą 0,
16B 4 ´ 112B 3 ´ 88B 2 ´ 8B ă 0,
32B 6 ` 128B 5 ` 160B 4 ` 64B 3 ` 8B 2 ą 0.

As a consequence, ∆pA, Bq ą 0 for all A ď 0. This implies A0 pBq ą 0. Next, assume B ą Bc .


Since ∆pA “ 0, Bq ą 0 and limAÑ`8 ∆pA, Bq “ ´8, ∆p¨, Bq has a positive root. But as said
earlier, ∆A pBq ă 0 and the only root of ∆p¨, Bq must be A0 pBq. Hence, A0 pBq ą 0.
A study of the function B ÞÑ ∆ppAc {Bc qB, Bq shows that is is negative for B P p0, Bc q. As
∆p0, Bq ą 0, this means that for B P p0, Bc q, either A0 pBq is the only root of ∆p¨, Bq between 0
and pAc {Bc qB, or the three roots A0 pBq, AG pBq, AL pBq all belong to p0, pAc {Bc qBq. Anyhow,
for A P p0, A0 pBqq, the point pA, Bq lies in the supercritical region where we know by Theorem
3.5 that there is only one real root greater than B for (3.25). Thus, the possibility A ă A0 pBq
must be ruled out when B P p0, Bc q.
The function B ÞÑ ∆ppAc {Bc qB, Bq vanishes at its double root Bc and remains negative for
a while, until it vanishes again at B “ B˚ « 2.435425 and becomes positive. This means that
A0 pBq ą pAc {Bc qB for B ą B˚ and the graph of A0 p¨q, now the only root of (3.66), enters the
subcritical region. Let A P ppAc {Bc qB, A0 pBqq. At pA, Bq, there are three real roots for (3.25)
and at least one is greater than B. If all of the roots are greater than B, their sum is greater
than 3B. But for (3.25), this sum is equal to 1 ´ B. The inequality 1 ´ B ą 3B entails B ă 1{4,
which contradicts B ě B˚ « 2.435425.
To summarize, the only way for (3.25) to have three real roots, all greater than B, is that
B P p0, Bc q and A P pAG pBq, AL pBqq. It remains to show that this region is contained in
the subcritical domain. Assume that AG pBq ă pAc {Bc qB. In view of the previous discussion
4
As a matter of fact, 64B 3 ` 6B 2 ` 12B ´ 1 is the minimal polynomial of Bc .
80 Chapter 3. Convexity analysis and extension of Gibbs energy functions

on the number of roots for ∆p¨, Bq, we must also have AL pBq ă pAc {Bc qB. Then A0 pBq `
AG pBq ` AL pBq ă 3pAc {Bc qB. But by (3.66), this sum is equal to ´8B 2 ` 40B ` 1. Hence,
´8B 2 `r40´3pAc {Bc qsB `1 ă 0. But a study of the function B ÞÑ ´8B 2 `r40´3pAc {Bc qsB `1
reveals that it is positive for all B P p0, Bc q. The statements regarding the phase labels of the
one-root regions are left to the readers.

3.3 Domain extension for cubic EOS-based Gibbs functions


In §3.2, we insisted on the fact that, for a pure component, the cubic equations (3.23)–(3.25)
do not always have three real roots greater than B. This implies that, for a multicomponent
mixture subject to a given mixing rule, the cubic equations (3.33), (3.51) do not always have
three real roots greater than Bpxq for all x P Ω. As a consequence, the domain of definition
for the functions Ψα , Φiα for a given phase α does not always cover the whole simplex Ω. This
physical feature turns out to be detrimental to the unified formulation introduced in §2.2.2.

3.3.1 Trouble ahead


In a nutshell, the molar Gibbs energy functions gα associated with cubic equations of state grossly
violate Hypotheses 2.2. To give a visual picture of the nature of the obstruction, let us consider
the simplistic case of a two-phase binary mixture, governed by the mixing rule (3.31b)–(3.32),
namely,
“ ? ? ‰2
Apxq “ x AI ` p1 ´ xq AII , (3.67a)
Bpxq “ xB I ` p1 ´ xqB II . (3.67b)

The mixture is assumed to obey Van der Waals’ law. Thus, for x P r0, 1s and α P tG, Lu, the
value of the excess molar Gibbs energy
Apxq
Ψα pxq “ Zα pxq ´ 1 ´ ln rZα pxq ´ Bpxqs ´
Zα pxq
and that of the molar Gibbs energy

gα pxq “ x ln x ` p1 ´ xq lnp1 ´ xq ` Ψα pxq

are defined whenever there exists a real root Zα pxq of the cubic equation

Z 3 pxq ´ rBpxq ` 1sZ 2 pxq ` ApxqZpxq ´ ApxqBpxq “ 0

that is greater that Bpxq and that can be assigned to phase α. In such a case, we are able to
define the fugacity coefficients by
Bi
„ i
2Ai pxq Apxq

B
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs ` ´
Bpxq Bpxq Apxq Zα pxq
for the components i P tI, IIu, with
? ?
AI pxq “ xAI ` p1 ´ xq AI AII , AII pxq “ x AI AII ` p1 ´ xqAII .

For an arbitrary choice of the two pairs pAI , B I q and pAII , B II q in the subcritical region
0 ă B ă p8{27qA, the parametrized curve γ : r0, 1s Q x Ñ Þ pApxq, Bpxqq P pR˚` q2 is an arc
3.3. Domain extension for cubic EOS-based Gibbs functions 81

Figure 3.12: Curve γ defined by the mixing rule in the pA, Bq-plane.

Figure 3.13: Typical situation where the fraction in the absent phase cannot be computed.
82 Chapter 3. Convexity analysis and extension of Gibbs energy functions

of parabola, as illustrated in Figure 3.12. We are not guaranteed that γ remains inside the
subcritical region. Even if it does, because we have restricted ourselves to a choice of parameters
that is meaningful to physicists, other unfavorable phenomena are likely to occur.
Assume that for pAI , B I q, the Van der Waals cubic equation (3.23) has only one real root
greater than B I , associate with phase G. Assume that for pAII , B II q, the Van der Waals cubic
equation (3.23) has only one real root greater than B II , associated with phase L. At x “ 0, the
curve γ starts from pAII , B II q in the L-root region. At some parameter value x “ x5 P p0, 1q,
it enters the three-root region. At some furhter value x “ x7 P px5 , 1q, it exits the three-root
region. At x “ 1, it finally meets pAI , B I q in the G-root region. It is not difficult to realize that:
• the quantities ZL pxq, ΨL pxq, gL pxq are well-defined only for x P r0, x7 s; gL px´ 1 ´
7 q and gL px7 q
remain bounded, while gL2 px´ 1 ´
7 q and ZL px7 q blow up; moreover, there is no guarantee that
gL is strictly convex over r0, x7 s;
• the quantities ZG pxq, ΨG pxq, gG pxq are well-defined only for x P rx5 , 1s; gG px` 1 `
5 q and gG px5 q
2 ` 1 `
remain bounded, while gG px5 q and ZG px5 q blow up; moreover, there is no guarantee that
gG is strictly convex over rx5 , 1s.
Since gG1 px` q and g 1 px´ q are finite, the image sets g 1 prx , 1qq and g 1 pp0, x sq are not equal
5 L 7 G 5 L 7
to R. This prevents us from assigning a correct value to the fractions of a vanishing phase.
Indeed, according to Gibbs’ geometric construction described in Theorem 2.5, when the global
composition c is sufficiently close to 0, the solution of system (2.83) is in the single phase L, with
Ys “ 0, ξsL “ xsL “ c. But as limxÓ0 gL1 pxq “ ´8, it is expected that gL1 pcq R gG 1 prx , 1qq. In other
5
words, it is impossible to find x 1 1
xG q “ gL pcq. Likewise, when the global
sG P rx5 , 1q such that gG ps
composition c is sufficiently close to 1, the solution of system (2.83) is in the single phase G,
with Ys “ 1, ξsG “ x sG “ c. But as limxÒ1 gG 1 pxq “ `8, it is expected that g 1 pcq R g 1 pp0, x sq. In
G L 7
other words, it is impossible to find x sL P p0, x7 s such that gL1 ps 1 pcq. The latter situation
xL q “ gG
is depicted in Figure 3.13.
It could be argued that the same flaws of cubic EOS laws should cause the same prejudice
to the natural variable (or variable-switching) formulation of §2.2.1. Nothing could be further
from the truth. In the variable-switching formulation, if the context is correctly guessed, we do
not need to compute anything from the absent phase and the above problem is irrelevant. If the
context is incorrectly alleged, the flash does not converge or may even crash, but there is an
opportunity for us to make up for it by changing the context. The natural variable formulation
does not seek to fathom the dark, invisible and uncharted side of the vanishing phases. The
unified formulation has to do so, by its very vocation to treat all phases on an equal footing.
To give the unified formulation a fighting chance, it is essential that the domains of definition
for the excess functions Ψα ’s be properly extended to Ω. By “properly,” we mean that the
corresponding extended Gibbs energy functions gα fulfill Hypotheses (2.2). If strict convexity
is too difficult to satisfy, at least we should require surjectivity of the extended gradient maps
∇x gα from Ω onto RK ´ 1.

3.3.2 Direct method for binary mixture


For the two-phase binary mixture considered in §3.3.1, a natural workaround is to differentiably
1 pr0, 1sq “ g 1 pr0, 1sq “ t´8u Y
extend gG over r0, x5 q and gL over px7 , 1s, in such a way that gG L
R Y t`8u, together with strict convexity of gG and gL over r0, 1s. More accurately, let ω ą 0 be
a small width such that
0 ă x5 ` ω ă x7 ´ ω ă 1.
3.3. Domain extension for cubic EOS-based Gibbs functions 83

Over the domain r0, 1s, we propose to extend the excess Gibbs functions by
#
ΨL pxq if x P r0, x7 ´ ωs,
ΨL rωspxq “ (3.68a)
ΨL,ω pxq if x P rx7 ´ ω, 1s,
#
ΨG,ω pxq if x P r0, x5 ` ωs,
ΨG rωspxq “ (3.68b)
ΨG pxq if x P rx5 ` ω, 1s,

in which the “artificial” parts are defined by the second-order Taylor expansions
1
ΨL,ω pxq “ ΨL px7 ´ ωq ` Ψ1L px7 ´ ωqrx ´ px7 ´ ωqs ` Ψ2L px7 ´ ωqrx ´ px7 ´ ωqs2 , (3.69a)
2
1
ΨG,ω pxq “ ΨG px5 ` ωq ` Ψ1G px5 ` ωqrx ´ px5 ` ωqs ` Ψ2G px5 ` ωqrx ´ px5 ` ωqs2 . (3.69b)
2
The reason why we cannot take ω “ 0 is that Ψ2L blows up at x´ 2 `
7 and ΨG blows up at x5 .
From the extended excess functions (3.68)–(3.69), we can deduce the extended Gibbs energies
by applying (2.31), i.e.,

gα rωspxq “ x ln x ` p1 ´ xq lnp1 ´ xq ` Ψα rωspxq,

for α P tG, Lu. We can also infer the extended fugacity coefficients by applying (2.33a), i.e.,

ln ΦIα rωspxq “ Ψα rωspxq ` p1 ´ xqΨ1α rωspxq, (3.70a)


ln ΦII 1
α rωspxq “ Ψα rωspxq ´ xΨα rωspxq, (3.70b)

for α P tG, Lu. This direct approach enjoys the following property.

Proposition 3.4. Assume that the original Gibbs energy functions gL and gG are strictly convex
on their respective intervals of definition r0, x7 s and rx5 , 1s. Then, for all ω ą 0 small enough,
their extended versions gL rωs and gG rωs fulfill Hypotheses 2.3.

Chứng minh. The proof of this Proposition is very easy and is left to the readers.

Figures 3.14–3.15 examplify the direct method of extension for two 4-tuple pAI , B I , AII , B II q
and two parameters ω. Figures 3.16–3.17 provide a close-up comparison between the extended
Gibbs functions and their derivatives for two width parameters ω.

3.3.3 Indirect method for multicomponent mixtures


The extension strategy developed in §3.3.2 is suitable for a binary mixture. For a multicomponent
mixture, it appears to be most impractical: (i) we have to know in advance the boundary of the
three-root region in Ω; (ii) we have to construct C 2 -hypersurfaces starting this boundary and
joining BΩ. we need another extension for the model with more than two components.
Instead of working with x P Ω, it is more judicious to work with Zα pxq P R. When the cubic
equation does not have three real roots greater than B, our idea is to use the arithmetic mean
of the two other roots, which is also their common real part if these are complex conjugates. In
place of the undefined Zα pxq, we plug this “surrogate” value into the expression of the excess
Gibbs function for the missing phase α. From this ansatz, the fugacity coefficients can be derived
accordingly.
84 Chapter 3. Convexity analysis and extension of Gibbs energy functions

-0.2 Gibbs Gas -0.2 Gibbs Gas


Gibbs Liquid Gibbs Liquid
-0.3 Gibbs Gas extended Gibbs Gas extended
Gibbs Liquid extended -0.4 Gibbs Liquid extended
-0.4
Gibbs free energy

Gibbs free energy


-0.5 -0.6

-0.6
-0.8
-0.7

-0.8 -1

-0.9
-1.2
-1

-1.1 -1.4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
First-component standard partial fraction x First-component standard partial fraction x

Figure 3.14: Extended Gibbs energy functions gL rωs (blue) and gG rωs (red) for Van der Waals’
law by the direct method, with ω “ 0.001. Left panel: pAI , B I q “ p0.33, 0.0955q and pAII , B II q “
p0.35, 0.08q. Right panel: pAI , B I q “ p0.32, 0.09q and pAII , B II q “ p0.37, 0.072q.

-0.2 Gibbs Gas -0.2 Gibbs Gas


Gibbs Liquid Gibbs Liquid
-0.3 Gibbs Gas extended Gibbs Gas extended
Gibbs Liquid extended -0.4 Gibbs Liquid extended
-0.4
Gibbs free energy

Gibbs free energy

-0.5 -0.6

-0.6
-0.8
-0.7

-0.8 -1

-0.9
-1.2
-1

-1.1 -1.4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
First-component standard partial fraction x First-component standard partial fraction x

Figure 3.15: Extended Gibbs energy functions gL rωs (blue) and gG rωs (red) for Van der Waals’
law by the direct method, with ω “ 0.2. Left panel: pAI , B I q “ p0.33, 0.0955q and pAII , B II q “
p0.35, 0.08q. Right panel: pAI , B I q “ p0.32, 0.09q and pAII , B II q “ p0.37, 0.072q.
3.3. Domain extension for cubic EOS-based Gibbs functions 85

-0.3

-0.4 -0.3

-0.4
-0.5

-0.5

Gibbs Liquid
Gibbs Gas

-0.6
-0.6
-0.7
-0.7

-0.8
-0.8

-0.9 -0.9

-1 -1
0 0.05 0.1 0.15 0.2 0.25 0.3 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1
First-component standard partial fraction x First-component standard partial fraction x

(a) gG (b) gL

Figure 3.16: Close-up comparison of the extended Gibbs functions between ω “ 0.001 and
ω “ 0.2 for Van der Waals’ law with the direct method. pAI , B I q “ p0.33, 0.0955q and pAII , B II q “
p0.35, 0.08q.

7
-1

6
-2
Derivatives of Gibbs Liquid
Derivatives of Gibbs Gas

5
-3

4
-4

3
-5

2
-6

1
-7
0 0.05 0.1 0.15 0.2 0.25 0.3 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1
First-component standard partial fraction x First-component standard partial fraction x
1 1
(a) gG (b) gL

Figure 3.17: Close-up comparison of the derivative of the extended Gibbs funcions between
ω “ 0.001 and ω “ 0.2 for Van der Waals’ law with the direct method. pAI , B I q “ p0.33, 0.0955q
and pAII , B II q “ p0.35, 0.08q.
86 Chapter 3. Convexity analysis and extension of Gibbs energy functions

3.3.3.1 For Van der Waals’ law


Let us explain the idea on Van der Waals’ cubic equation

Z 3 ´ pB ` 1qZ 2 ` AZ ´ AB “ 0.

For convenience, we do not explicitly indicate the dependency of A, B and Z on x.

Construction in the one-root region. We assume that there is only one real root greater
than B and that this root can be assigned a natural phase label α P tG, Lu in the sense of
Definition 3.2, so that we can write it as Zα . Let β be the other phase, that is, β “ L if α “ G
and β “ G if α “ L. If the two remaining roots of the cubic equation are complex conjugates,
their common real part is
B ` 1 ´ Zα
Wβ “ , (3.71)
2
since the sum of the three roots must be equal to B ` 1. In any case, Wβ defined in (3.71) is the
arithmetic mean of the two “bad” roots. The following favorable properties of Wβ help convince
us that it can be used as a substitute for Zβ , which does not exist.

Lemma 3.4. Let pA, Bq be a pair in the subcritical region 0 ă B ă p8{27qA and assume that
Van der Waal’s cubic equation has only one real root Zα ą B that corresponds to phase α.
1
?
1. If B ă 16 p3 33 ´ 11q « 0.389605496, then

Wβ ą B. (3.72a)
?
2. If B ă 14 p9 57 ´ 67q « 0.237127479, then

Zα ă Wβ if α “ L, Wβ ă Zα if α “ G. (3.72b)

Chứng minh. In view of (3.71), the condition Wβ ą B is tantamount to 1 ´ B ą Zα . This


implies 1 ´ B ą B and B ă 1{2. Using the rational function

1 A
ΠA,B pZq “ ´ 2 ´1
Z ´B Z

introduced in (3.39) and in light of Theorem 3.2 about its behavior, the condition 1 ´ B ą Zα
is itself equivalent to ΠA,B p1 ´ Bq ă 0. But

1 A
ΠA,B p1 ´ Bq “ ´ ´1ă0
1 ´ 2B p1 ´ Bq2

can be reduced after simplification to

2Bp1 ´ Bq2
Aą .
1 ´ 2B

In the subsonic region, A ą p27{8qB.


? The sufficient condition p27{8qB ą 2Bp1 ´ Bq2 {p1 ´ 2Bq
1
is satisfied for all B P p0, 16 p3 33 ´ 11qq.
3.3. Domain extension for cubic EOS-based Gibbs functions 87

In view of (3.71), the condition Zα ž Wβ is tantamount to Zα ž 13 pB ` 1q. Assuming


pB ` 1q{3 ą B, that is, B ă 1{2, the previous equality is also equivalent to ΠA,B ppB ` 1q{3q ž 0.
But ˆ ˙
B`1 3 9A
ΠA,B “ ´ ´1ž0
3 1 ´ 2B pB ` 1q2
can be simplified to
2pB ` 1q3
Aż . (3.73)
9p1 ´ 2Bq
By studying the function defined in the right-hand side, we can show that for all B P p0, 1{8q,
2pB ` 1q3
AG pBq ă ă AL pBq. (3.74)
9p1 ´ 2Bq
The three curves meet at the critical point pAc , Bc q “ p27{64, 1{8q where they have a common
tangent.
Let us assume first that α “ G. This occurs only if B P p0, 1{8q and p27{8qB ă A ă AG pBq.
By (3.74), we have (3.73) with the “ă” sign, which implies ZG ą WL . Let us assume now that
α “ L. This occurs only if: (i) B P p0, 1{8q and A ą AL pBq, or (ii) B ą 1{8 and A ą p27{8qB.
In case (i), we have (3.73) with the “ą” sign, which ? implies ZL ă WG . In case (ii), notice that
2 1
2Bp1 ´ Bq {p1 ´ 2Bq ă p27{8qB for all B P p1{8, 4 p9 57 ´ 67qq, so that for B in this range we
still have (3.73) with the “ą” sign and can reach the same conclusion.
?
From now on, we shall restrict ourselves to B ă p9 57 ´ 67q{4. Physically speaking, this is
a reasonable assumption, since Bc “ 1{8 is almost twice smaller. When Zα is the only real root
greater than B for Van der Waals’ cubic equation, the excess Gibbs energy Ψα is defined for
phase α by the usual formula (3.34). For the other phase β, we stipulate that
A
Ψβ “ Wβ ´ 1 ´ ln rWβ ´ Bs ´ , (3.75)

which is well-defined thanks to Lemma 3.4. This is what we refer to as the “indirect” extension
of the excess Gibbs energy Ψβ when the root Zβ no longer exists. When applying (3.2) to (3.75)
in order to derive the fugacity coefficients, we need to be careful.
Theorem 3.7. When the indirect extension (3.75) is applied to phase β, the Van der Waals
fugacity coefficients in this phase are given by
B ` ∇B ¨ pδ i ´ xq
ln Φiβ “ rWβ ´ 1s ´ ln rWβ ´ Bs
B
B ` ∇B ¨ pδ i ´ xq 2A ` ∇x A ¨ pδ i ´ xq A
„ 
` ´
B A Wβ
„ i i 
∇Wβ ¨ pδ ´ xq ∇B ¨ pδ ´ xq ΥA,B pWβ q
` ´ (3.76)
Wβ B Wβ pWβ ´ Bq
for all i P K, with ΥA,B pW q “ W 3 ´ pB ` 1qW 2 ` AW ´ AB as defined in (3.38).
Chứng minh. The proof is similar to that of Theorem 3.1, except for the fact that now
1 A ΥA,B pWβ q 1 Wβ ´ 1 A ΥA,B pWβ q
1´ ` “ 2 , “ ` ´ ,
Wβ ´ B Wβ2 Wβ pWβ ´ Bq Wβ ´ B B BWβ Wβ pWβ ´ Bq
instead of being 0.
88 Chapter 3. Convexity analysis and extension of Gibbs energy functions

In (3.76), we need the gradient of Wβ with respect to x. After (3.71),


1
∇Wβ “ p∇B ´ ∇Zα q.
2
The gradient of Zα with respect to x can be obtained by differentiating Van der Waals’ cubic
equation. This operation yields

r3Zα2 ´ 2pB ` 1qZα ` As∇Zα “ pB ´ Zα q∇A ` pA ` Zα2 q∇B,

from which ∇Zα can be extracted, since Zα is a simple root and 3Zα2 ´ 2pB ` 1qZα ` A ‰ 0.

Alteration in the three-root region. From the one-root region, let us move towards the
transition boundary where a new real root Zβ appears. In the one-root region, we only have
the notion of the “generalized” root Wβ , whose gradient ∇Wβ remains well-defined. If we start
from the three-root region and move towards the transition boundary where Zβ disappears, the
gradient ∇Zβ does not remain bounded. Indeed, as

r3Zβ2 ´ 2pB ` 1qZβ ` As∇Zβ “ pB ´ Zβ q∇A ` pA ` Zβ2 q∇B,

and as Zβ gets closer to being a double root, ∇Zβ blows up. However, we need a finite gradient
∇Zβ for the numerical resolution of system (2.77) by, say, the Newton method. Such a finite
gradient is indeed required in the lines of the Jacobian matrix corresponding to the equalities of
fugacity (2.77b). To achieve a smooth junction between the two regions, we accept to “sacrifice”
a tiny portion of the three-root region. Let us assume that we are in the three-root region, with
B ă ZL ă ZI ă ZG . We introduce
ZI ´ ZL
ϑ“ P r0, 1s (3.77)
ZG ´ ZL
as an indicator of the closeness to the transition boundary. Indeed, the cubic equation has double
roots when ϑ “ 0 or ϑ “ 1. Let ε P p0, 1{4q be a small threshold.

• If ϑ P r2ε, 1 ´ 2εs, we apply the usual formulas for the case of three real-roots.

• If ϑ P p1 ´ 2ε, 1s, the two roots ZI and ZG are close to each other. We keep ZL but
progressively replace ZG by
B ` 1 ´ ZL ZI ` ZG
WG “ “ , (3.78)
2 2
whose gradient is bounded. Instead of plugging ZG into formula (3.34) for ΨG , we insert

ZrG “ r1 ´ νG pϑqsZG ` νG pθqWG , (3.79)

where
$


’ 0 if ϑ ď 1 ´ 2ε,
& ˆ ϑ ´ p1 ´ 2εq ˙
νG pϑq “ q if ϑ P p1 ´ 2ε, 1 ´ εq, (3.80a)

’ ε

%1 if ϑ ě 1 ´ ε,
qpyq “ y 2 p3 ´ 2yq. (3.80b)
3.3. Domain extension for cubic EOS-based Gibbs functions 89

The rescaled function y ÞÑ qpy{εq serves as a C 1 step function over the interval r0, εs. We
note that qp0q “ 0, qp1q “ 1 and q 1 p0q “ q 1 p1q “ 0. From the modified excess Gibbs energy

A
ΨG “ ZrG ´ 1 ´ ln rZrG ´ Bs ´ , (3.81a)
ZrG
we can derive by (3.2) the fugacity coefficients

B ` ∇B ¨ pδ i ´ xq r
ln ΦiG “ rZG ´ 1s ´ ln rZrG ´ Bs
B
B ` ∇B ¨ pδ i ´ xq 2A ` ∇x A ¨ pδ i ´ xq A
„ 
` ´
B A ZrG
„ r i i 
∇ZG ¨ pδ ´ xq ∇B ¨ pδ ´ xq ΥA,B pZrG q
` ´ . (3.81b)
ZrG B ZrG pZrG ´ Bq

The gradient ∇ZrG in the above formula can be approximated by


$
& ∇ZG
’ if ϑ ď 1 ´ 2ε,
∇ZrG “ r1 ´ νG pϑqs∇ZG ` νG pϑq∇WG if ϑ P p1 ´ 2ε, 1 ´ εq, (3.81c)

∇WG if θ ě 1 ´ ε,
%

where ∇WG “ 12 p∇B ´ ∇ZL q and where the derivatives of νG are neglected.

• If ϑ P r0, 2εq, we proceed in a similar and symmetric fashion to replace ZL by ZrL “


r1 ´ νL pϑqsZL ` νL pϑqWL in the expression of ΨL , while preserving ZG .

Figures 3.18–3.19 display a few examples of the indirect method for the Van der Waals case.
Figures 3.20–3.21 provide a close-up comparison between two choices of ε. It can be seen that ε
has little influence on the extended Gibbs functions for the gas. For the liquid, this influence is
more apparent.

3.3.3.2 For Peng-Robinson’s law


We go through the same process as in the Van der Waals case. Assume that Zα is the only real
root greater than B of Peng-Robinson’s cubic equation

Z 3 ` pB ´ 1qZ 2 ` pA ´ 2B ´ 3B 2 qZ ` pB 2 ` B 3 ´ ABq “ 0.

Construction in the one-root region. As Zα is associated with phase α, let β be the other
phase and let us introduce the arithmetic mean of the two remaining roots

1 ´ B ´ Zα
Wβ “ , (3.82)
2
which is their common real part when these are complex conjugates. We refer the readers to
(3.59) [Lemma 3.3] and (3.62) for the critical values Ac , Bc for Peng-Robinson’s law.

Lemma 3.5. Let pA, Bq be a pair in the subcritical region 0 ă B ă pBc {Ac qA and assume that
Peng-Robinson’s cubic equation has only one real root Zα ą B that corresponds to phase α.
90 Chapter 3. Convexity analysis and extension of Gibbs energy functions

-0.2 Gibbs Gas -0.2 Gibbs Gas


Gibbs Liquid Gibbs Liquid
-0.3 Gibbs Gas extended Gibbs Gas extended
Gibbs Liquid extended -0.4 Gibbs Liquid extended
-0.4
Gibbs free energy

Gibbs free energy


-0.5 -0.6

-0.6
-0.8
-0.7

-0.8 -1

-0.9
-1.2
-1

-1.1 -1.4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
First-component standard partial fraction x First-component standard partial fraction x

Figure 3.18: Extended Gibbs energy functions gL (blue) and gG (red) for Van der Waals’ law
by the indirect method, with ε “ 0.001. Left panel: pAI , B I q “ p0.33, 0.0955q and pAII , B II q “
p0.35, 0.077q. Right panel: pAI , B I q “ p0.32, 0.09q and pAII , B II q “ p0.37, 0.072q.

-0.2 Gibbs Gas -0.2 Gibbs Gas


Gibbs Liquid Gibbs Liquid
-0.3 Gibbs Gas extended Gibbs Gas extended
Gibbs Liquid extended -0.4 Gibbs Liquid extended
-0.4
Gibbs free energy

Gibbs free energy

-0.5 -0.6

-0.6
-0.8
-0.7

-0.8 -1

-0.9
-1.2
-1

-1.1 -1.4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
First-component standard partial fraction x First-component standard partial fraction x

Figure 3.19: Extended Gibbs energy functions gL (blue) and gG (red) for Van der Waals’ law
by the indirect method, with ε “ 0.2. Left panel: pAI , B I q “ p0.33, 0.0955q and pAII , B II q “
p0.35, 0.077q. Right panel: pAI , B I q “ p0.32, 0.09q and pAII , B II q “ p0.37, 0.072q.
3.3. Domain extension for cubic EOS-based Gibbs functions 91

-0.6 -0.6

-0.65
-0.65
-0.7

-0.75
-0.7

Gibbs Liquid
-0.8
Gibbs Gas

-0.75 -0.85

-0.9
-0.8
-0.95

-1
-0.85
-1.05

-0.9 -1.1
0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85
First-component standard partial fraction x First-component standard partial fraction x

(a) gG (b) gL

Figure 3.20: Close-up comparison of the extended Gibbs functions between ε “ 0.001 and ε “ 0.2
for Van der Waals’ law with the indirect method. pAI , B I q “ p0.33, 0.0955q and pAII , B II q “
p0.35, 0.08q.

-1 2

1.8
-1.2
1.6
Derivatives of Gibbs Liquid
Derivatives of Gibbs Gas

-1.4
1.4

1.2
-1.6

-1.8
0.8

-2 0.6

0.4
-2.2
0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85
First-component standard partial fraction x First-component standard partial fraction x
1 1
(a) gG (b) gL

Figure 3.21: Close-up comparison of the derivative of the extended Gibbs functions between
ε “ 0.001 and ε “ 0.2 for Van der Waals’ law with the indirect method. pAI , B I q “ p0.33, 0.0955q
and pAII , B II q “ p0.35, 0.08q.
92 Chapter 3. Convexity analysis and extension of Gibbs energy functions

1. If B ă 0.206813, then
Wβ ą B. (3.83a)

2. If B ă 0.137072, then

Zα ă Wβ if α “ L, Wβ ă Zα if α “ G. (3.83b)

Chứng minh. The proof is similar to that of Lemma 3.4.

By restricing ourselves to B ă 0.137072, which is reasonable since Bc « 0.077796, we can


rely on Lemme 3.5 to stipulate that
„ ? 
“ ‰ A Wβ ` p 2 ` 1qB
Ψβ “ Wβ ´ 1 ´ ln Wβ ´ B ´ ? ln ? . (3.84)
2 2B Wβ ´ p 2 ´ 1qB

for the missing phase β. By virtue of (3.2), we can derive the corresponding fugacity coefficients.
Theorem 3.8. When the indirect extension (3.75) is applied to phase β, the Peng-Robinson
fugacity coefficients in this phase are given by

B ` ∇B ¨ pδ i ´ xq
ln Φiβ “ rWβ ´ 1s ´ ln rWβ ´ Bs
B ?
B ` ∇B ¨ pδ i ´ xq 2A ` ∇x A ¨ pδ i ´ xq
„  „ 
A Wβ ` p 2 ` 1qB
` ´ ? ln ?
B A 2 2B Wβ ´ p 2 ´ 1qB
∇Wβ ¨ pδ i ´ xq ∇B ¨ pδ i ´ xq
„ 
Wβ ΥA,B pWβ q
` ´ (3.85)
Wβ B pWβ ´ BqpWβ2 ` 2BWβ ´ B 2 q

for all i P K, with ΥA,B pW q “ W 3 ` pB ´ 1qW 2 ` pA ´ 2B ´ 3B 2 qW ` pB 2 ` B 3 ´ ABq as


defined in (3.55).

Chứng minh. The proof is similar to that of Theorem 3.7.

The gradient of Wβ with respect to x required by (3.85), can be computed by


1
∇Wβ “ ´ p∇B ` ∇Zα q,
2
in which ∇Zα solves

r3Zα2 ` 2pB ´ 1qZα ` pA ´ 2B ´ 3B 2 qs∇Zα “ pB ´ Zα q∇A


` pA ´ 2B ´ 3B 2 ` 6BZα ` 2Zα ´ Zα2 q∇B.

Alteration in the three-root region. For the same reasons as those mentioned in the Van
der Waals case, the usual formulas need to be altered in the three-root region, where Zβ gets
close to being a double root. The changes are aimed at circumventing the difficulty due to the
blowing up of ∇Zβ and at enforcing a smooth junction between the two regions. We follow the
same strategy as in the Van der Waals case. When there are three roots B ă ZL ă ZI ă ZG ,
we define the indicator ϑ as in (3.77). Let ε P p0, 1{4q be a small threshold.
• If ϑ P r2ε, 1 ´ 2εs, no change is necessary.
3.3. Domain extension for cubic EOS-based Gibbs functions 93

0
-0.2 Gibbs Gas
Gibbs Liquid
-0.4 -0.2 Gibbs Gas extended
Gibbs Liquid extended
-0.6
-0.4
Gibbs free energy

Gibbs free energy


-0.8
-0.6
-1

-1.2 -0.8

-1.4
-1
-1.6 Gibbs Gas
Gibbs Liquid -1.2
-1.8 Gibbs Gas extended
Gibbs Liquid extended
-2 -1.4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
First-component standard partial fraction x First-component standard partial fraction x

Figure 3.22: Extended Gibbs energy functions gL (blue) and gG (red) for Peng-Robinson’s law
by the indirect method, with ε “ 0.001. Left panel: pAI , B I q “ p0.322, 0.053q and pAII , B II q “
p0.33, 0.03q. Right panel: pAI , B I q “ p0.275, 0.045q and pAII , B II q “ p0.35, 0.04q.

0
-0.2 Gibbs Gas
Gibbs Liquid
-0.4 -0.2 Gibbs Gas extended
Gibbs Liquid extended
-0.6
-0.4
Gibbs free energy

Gibbs free energy

-0.8
-0.6
-1

-1.2 -0.8

-1.4
-1
-1.6 Gibbs Gas
Gibbs Liquid -1.2
-1.8 Gibbs Gas extended
Gibbs Liquid extended
-2 -1.4
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
First-component standard partial fraction x First-component standard partial fraction x

Figure 3.23: Extended Gibbs energy functions gL (blue) and gG (red) for Peng-Robinson’s law
by the indirect method, with ε “ 0.2. Left panel: pAI , B I q “ p0.322, 0.053q and pAII , B II q “
p0.33, 0.03q. Right panel: pAI , B I q “ p0.275, 0.045q and pAII , B II q “ p0.35, 0.04q.
94 Chapter 3. Convexity analysis and extension of Gibbs energy functions

-0.4
-0.66
-0.5
-0.68
-0.6
-0.7
-0.7
-0.72

Gibbs Liquid
Gibbs Gas

-0.8
-0.74

-0.9
-0.76

-0.78 -1

-0.8 -1.1

-0.82 -1.2

-0.84 -1.3
0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9
First-component standard partial fraction x First-component standard partial fraction x

(a) gG (b) gL

Figure 3.24: Close-up comparison of the extended Gibbs functions between ε “ 0.001 and ε “ 0.2
for Peng-Robinson’ law with the indirect method. pAI , B I q “ p0.275, 0.045q and pAII , B II q “
p0.35, 0.04q.

-1.3 3

-1.4

2.5
-1.5
Derivatives of Gibbs Liquid
Derivatives of Gibbs Gas

-1.6
2
-1.7

-1.8
1.5
-1.9

-2
1

-2.1

-2.2 0.5
0.09 0.1 0.11 0.12 0.13 0.14 0.15 0.16 0.17 0.18 0.19 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9
First-component standard partial fraction x First-component standard partial fraction x
1 1
(a) gG (b) gL

Figure 3.25: Close-up comparison of the derivative of the extended Gibbs functions between
ε “ 0.001 and ε “ 0.2 for Peng-Robinson’ law with the indirect method. pAI , B I q “ p0.275, 0.045q
and pAII , B II q “ p0.35, 0.04q.
3.3. Domain extension for cubic EOS-based Gibbs functions 95

• If ϑ P p1 ´ 2ε, 1s, we keep ZL but progressively replace ZG by

1 ´ B ´ ZL ZI ` ZG
WG “ “ . (3.86)
2 2
Instead of plugging ZG into formula (3.52) for ΨG , we insert

ZrG “ r1 ´ νG pϑqsZG ` νG pθqWG , (3.87a)

where νG is given by (3.80). From the modified excess Gibbs energy


„r ? 
“ ‰ A ZG ` p 2 ` 1qB
ΨG “ ZG ´ 1 ´ ln ZG ´ B ´ ?
r r ln ? , (3.87b)
2 2B ZrG ´ p 2 ´ 1qB

the fugacity coefficients can be inferred by (3.2) as

B ` ∇B ¨ pδ i ´ xq r
ln ΦiG “ rZG ´ 1s ´ ln rZrG ´ Bs
B
?
B ` ∇B ¨ pδ i ´ xq 2A ` ∇x A ¨ pδ i ´ xq
„  „r 
A ZG ` p 2 ` 1qB
` ´ ? ln ?
B A 2 2B ZrG ´ p 2 ´ 1qB
∇ZG ¨ pδ i ´ xq ∇B ¨ pδ i ´ xq
„ r 
ZrG ΥA,B pZrG q
` ´ (3.87c)
ZrG B pZrG ´ BqpZrG2 ` 2B ZrG ´ B 2 q

The gradient ∇ZrG in the above formula can be approximated by (3.81c), in which ∇WG “
´ 21 p∇B ` ∇ZL q.

• If ϑ P r0, 2εq, we proceed in a similar and symmetric fashion.

Figures 3.22–3.23 display a few examples of the indirect method for the Peng-Robinson case.
Figures 3.24–3.25 provide a close-up comparison between two choices of ε. In comparison with
Van der Waals case, here the width parameter ε seems to have a slightly stronger influence on
the extended Gibbs functions. Similarly to the Van der Waals case, this inflence is more visible
for liquid phase.
96 Chapter 3. Convexity analysis and extension of Gibbs energy functions
Part II

Numerical methods and simulations

97
Chapter 4

Existing methods for sytems with


complementarity conditions
Contents
4.1 Background on complementarity problems . . . . . . . . . . . . . . . 100
4.1.1 Classes of problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
4.1.2 Classes of methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
4.2 Nonsmooth approach to generalized equations . . . . . . . . . . . . . 105
4.2.1 Nonsmooth Newton method . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.2.2 Semismooth Newton method . . . . . . . . . . . . . . . . . . . . . . . . 108
4.2.3 Newton-min method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.3 Smoothing methods for nonsmooth equations . . . . . . . . . . . . . 112
4.3.1 Newton’s method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
4.3.2 Smoothing functions for complementarity conditions . . . . . . . . . . . 119
4.3.3 Standard and modified interior-point methods . . . . . . . . . . . . . . 124
4.4 What may go wrong? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.4.1 Issues with nonsmooth methods . . . . . . . . . . . . . . . . . . . . . . . 133
4.4.2 Issues with smoothing methods . . . . . . . . . . . . . . . . . . . . . . . 134

Nous entamons cette seconde partie, consacrée au numérique, par un panorama des méthodes susceptibles
de résoudre le problème thermodynamique posé dans la première partie. Pour cela, un survol des prob-
lèmes de complémentarité “purs” en §4.1 constitue une étape préliminaire indispensable pour connaı̂tre
les principales classes de méthodes à explorer.
La non-différentiabilité du problème nous amène à examiner d’abord les méthodes non-lisses et semi-
lisses en §4.2. Parmi celles-ci figure la méthode de Newton-min, qui est actuellement l’algorithme par
défaut dans les prototypes d’IFPEN utilisant la formulation unifiée. Nous nous intéressons ensuite en
§4.3 aux méthodes de régularisation, qui transforment le problème non-lisse de départ en une suite de
problèmes lisses au moyen d’un paramètre destiné à tendre vers zéro. Après un retour sur la méthode
de Newton classique et ses théorèmes de convergence locale, nous mettrons l’accent sur la technique de
lissage par des θ-fonctions ainsi que la méthode des points intérieurs.
Pour terminer, mais aussi pour motiver la conception d’une méthode mieux adaptée, nous énumérons
en §4.4 les problèmes de convergence des méthodes considérées sur des contre-exemples.

99
100 Chapter 4. Existing methods for sytems with complementarity conditions

The phase equilibrium problem (2.42) or (2.77), studied in chapter §2, comes within the following
abstract framework: find X P D, where D Ă R` is an open domain, such that

ΛpXq “ 0, P R`´m , (4.1a)


m
minpGpXq, HpXqq “ 0, PR . (4.1b)

Here, the given functions Λ : D Ă R` Ñ R`´m and G, H : D Ă R` Ñ Rm , where 0 ă m ď `, are


assumed to be continuously differentiable on D. The first ` ´ m equations (4.1a) are “ordinary”
algebraic equations. By contrast, the last m equations (4.1b) are rather “special” in that they
are nondifferentiable, because of the componentwise min function. They represent the so-called
complementarity conditions, the exact significance of which is

0 ď GpXq K HpXq ě 0, (4.2a)

or equivalently,
GpXq ě 0, HpXq ě 0, GpXqT HpXq “ 0. (4.2b)
This name is justified by the observation that for each index α P t1, . . . , mu, at least one of the
two quantities Gα pXq and Hα pXq vanishes while the other remains nonnegative.
Our objective is to work out an efficient and robust numerical method to solve (4.1). The most
severe difficulty that awaits us is the non-differentiability of the complementarity conditions.
Therefore, before embarking on the quest for numerical methods, we have to fully understand
the essence of this difficulty by stepping back to the simpler case of a “pure” complementarity
problem.

4.1 Background on complementarity problems


A complementarity problem1 is a specialized version of (4.1), in which

m “ `, GpXq “ X. (4.3)

Over the last half-century, complementarity problems have grown into a vast discipline with
many deep notions and rich results. A comprehensive survey can be found in the book of Acary
and Brogliato [2] or the two-volume collection of Facchinei and Pang [46, 47]. In this section, we
just intend to provide some standard theoretical rudiments that will be useful in the sequel.

4.1.1 Classes of problems


We begin with a very basic notion, that of a cone. A subset K Ă R` is said to be a cone if

@X P K, @t ą 0, tX P K.

If K Ă R` is a cone, its dual cone is defined as

K˝ :“ td P R` | @v P K, v T d ě 0u.

These notions are actually defined in analysis, independently of complementarity problems. They
enable us to properly introduce the general complementarity problem (GCP) associated with a
cone.
1
We sometimes add the adjective “pure” to mark the difference with the original “mixed” problem (4.1).
4.1. Background on complementarity problems 101

4.1.1.1 GCP and VIP


Definition 4.1 (GCP). Given a cone K Ă R` and a mapping H : K Ñ R` , the general
complementarity problem CpK, Hq consists in finding a vector X P R` that satisfies the conditions

K Q X K HpXq P K˝ , (4.4)

where the notation “K" means “perpendicular", i.e., X T HpXq “ 0 in the matrix language.
This formulation of (GCP) includes a wide range of problems encountered in mathematical
programming. It can be further extended to the infinite-dimensional setting by replacing R` a
pair of locally convex Hausdorff spaces related to each other by real-valued bilinear form [66].
Beside the world of mathematical programming, there is also another community in applied
mathematics whose primary interest is focused on the unilateral conditions for nonlinear partial
differential equations arising from mechanics, especially in elasticity and plasticity. The theo-
retical tool to study this type of free boundary problems is the variational inequality problem.
We refer the readers to the monographs of Kinderlehrer and Stampacchia [69] and Glowinski et
al. [53] for a broad review of this realm. Below we formulate the variational inequality problem
(VIP) associated with a subset of R` which is not necessarily a cone.
Definition 4.2 (VIP). Given a subset K Ă R` and a mapping H : K Ñ R` , the variational
inequality problem V pK, Hq consists in finding a vector X P K such that

@Y P K, pY ´ XqT HpXq ě 0. (4.5)

This formulation of (VIP) includes a wide range of problems encountered in mechanical


engineering. It can be further extended to the infinite-dimensional setting, where it actually
comes from [60]. Originally, the relationship between (VIP) and (GCP) has been noted by many
authors. However, it was Karamardian [66] who proved that if the set K involved in Definition
4.2 is a cone, then the two problems are equivalent.
Proposition 4.1. Let K Ă R` be a cone and H be a mapping from K to RN . A vector X P K
solves V pK, Hq if and only if it solves CpK, Hq.
Chứng minh. See [66] or [46, §1.1.3].

4.1.1.2 GCP, NCP and LCP


Many special cases of (GCP) are worth considering for their role in practical problems. When K
is the nonnegative orthant of R` , the general complementarity problem (GCP) gives rise to the
nonlinear complementarity problem (NCP).
Definition 4.3 (NCP). Given a mapping H : R`` Ñ R` , the nonlinear complementarity problem
associated with H consists in finding a vector X P R` such that

0 ď X K HpXq ě 0, (NCP)

which means
X ě 0, HpXq ě 0, X T HpXq “ 0. (4.6a)
The nonlinear complementarity problem was introduced by Cottle [33], at about the same
time as (VIP). Among the class of (NCP), it is customary to consider those for which H is
102 Chapter 4. Existing methods for sytems with complementarity conditions

• a P0 -function, that is,

@X ‰ Y P R`` , max pXα ´ Yα qpHα pXq ´ Hα pY qq ě 0; (4.7a)


1ďαď`
Xα ‰Yα

• or a P -function, that is,

@X ‰ Y P R`` , max pXα ´ Yα qpHα pXq ´ Hα pY qq ą 0. (4.7b)


1ďαď`

Indeed, uniqueness can be proven for the latter case.

Theorem 4.1. If H is a P -function in the sense of (4.7b), then (NCP) has at most one solution.

Chứng minh. See [46, §3.5.10]

When H is an affine function, that is, HpXq ” M X ` q for some matrix M P R`ˆ` and
vector q P R` , the problem has a dedicated name.

Definition 4.4 (LCP). Given M P R`ˆ` and q P R` , the linear complementarity problem
LCpM, qq consists in finding a vector X P R` such that

0 ď X K M X ` q ě 0, (4.8a)

which means
X ě 0, M X ` q ě 0, X T pM X ` qq “ 0. (4.8b)

As a matter of fact, (LCP) was the first type of complementarity problem to have been
formalized in the literature. The motivation for this comes from the observation that KKT
optimality conditions for linear and quadratic programs constitute an (LCP). After Lemke and
Howson [82] showed that the problem of computing a Nash equilibrium point of a bimatrix game
can be posed as an (LCP), Cottle and Dantzig [34] unified linear and quadratic programs and
bimatrix games under the (LCP). Since then, (LCP) has gained considerable momentum. The
history of the development of (LCP) is available in Cottle et al. [35].
In the case of (LCP), the P0 and P properties of H can be detected at the level of the matrix
M . A matrix M P R`ˆ` is said to be:

• a P0 -matrix if for all X ‰ 0, there exists an index α P t1, . . . , `u such that Xα ‰ 0 and
pM Xqα ě 0;

• a P -matrix if the inequality X T M X ď 0 implies X “ 0.

A P0 -matrix generalizes a positive semi-definite (symmetric) matrix. There are many equivalent
characterizations to the above definition, as enumerated in [11, §2.2.4] and [49]. A P -matrix
generalizes a positive definite (symmetric) matrix and there are also many equivalent character-
izations [11, §2.2.5]. Determining whether or not a given matrix is a P -matrix is an expensive
task. In fact, this is a co-NP-complete problem [36].
Going back to the (NCP), let us assume that the mapping H is continuously differentiable.
Then, the P0 (resp. P ) property of H is equivalent to that of its Jacobian matrix ∇H for all X
in the domain [46, §3.5.9].
4.1. Background on complementarity problems 103

4.1.2 Classes of methods


Once the main classes of complementarity problems have been identified, we are now concerned
with the numerical methods that can be used to solve them. Again, this will be a brief glimpse,
but the overview we will have had in the case of complementarity problems will serve as a guiding
outline for the more sophisticated case of (4.1) in later sections.

4.1.2.1 Early approaches


The first difficulty to point out with complementarity conditions in the general case (4.1) is
their combinatorial nature. Anecdotally, some instances of (LCP) have been proved [29, 70] to
be NP-complete in the strong sense.
For each index α P t1, . . . , mu, the equation 0 ď Gα pXq K Hα pXq ě 0 expresses two possible
operating regimes, depending on either Gα pXq ě 0 or Hα pXq ě 0. In the phase equilibrium
system (2.77), for instance, the two regimes correspond to whether or not phase α is present
in the mixture. Since there are m complementarity conditions, the total number of possible
configurations for the physical system is 2m . In the model problem (2.77), where m “ P , the
total number of possible contexts is 2P ´ 1 (the difference of one unit comes from the fact that
the phases cannot be all absent). In realistic reservoir simulations, since the phase equilibrium
problems of the cells are coupled to each other, m is equal to the product of the number of
possible phases P by the number of cells in the mesh, which could reach ten million. Thus, any
method by which it is proposed to explore all possible configurations is doomed to failure when
m is large.

Pivotal methods. The situation described above naturally reminds us of KKT conditions for
constrained optimization and of linear programming, for which the active-set methods and the
simplex algorithm enable us to update the guessed configuration in a “smart” way, instead of
visiting them all. The class of conceptually equivalent methods for (LCP) is known as pivotal
methods. These are essentially variants of the so-called complementarity pivot method by Lemke
and Howson [82]. The most well-known methods among them are the Lemke algorithm [81] and
the criss-cross algorithm [40]. The common feature of all pivotal methods is that the worst-case
complexity is exponential. We refer the readers to Billups and Murty [20] and Cottle et al. [35]
for a more thorough review.

Nonsmooth methods. Pang [98] is credited for having developed the first globally convergent
and locally superlinearly convergent B-differentiable Newton method with line search. It was
followed by the path search method of Ralph [107] and a method for PC1 -functions by Kojima
and Shindo [71], while Kummer [73] studied this method for general nondifferentiable functions.
In §4.2.1, we will supply some elements of the general theory of nonsmooth Newton.

4.1.2.2 Recent approaches


Semismooth methods. Semismooth functions are an important special case of nonsmooth
functions. The theory of semismooth functions was developed by Miflin [92] in the scalar case
and extended to the vector case by Qi and Sun [105]. This class of methods involves reformu-
lating the problem as a system of nonlinear equations by means of C-functions (C stands for
complementarity). A function ψ is said to be a C-function if
ψpa, bq “ 0 ô 0 ď a K b ě 0. (4.9)
104 Chapter 4. Existing methods for sytems with complementarity conditions

Using a C-function, the complementarity problem (NCP) can be stated as the system of equa-
tions
F pXq “ 0, (4.10a)
where F : R` Ñ R` is defined component-wise by

Fα pXq “ ψpXα , Hα pXqq. (4.10b)

System (4.10) remains to be solved by a semi-smooth Newton-type method. Below is a non-


exhaustive list of the most frequently used C-functions.

• Fischer-Burmeister function:
a
ψFB pa, bq “ a2 ` b2 ´ pa ` bq.

This C-function is differentiable everywhere except at p0, 0q. In addition, its square ψF2 B pa, bq
is continuously differentiable on the entire plane. Introduced in [50], the Fischer-Burmeister
function soon attracted the attention of many researchers [38,48] and played a central role
in the development of efficient algorithms. The corresponding semi-smooth method to solve
(4.10) is called Newton-FB.

• Minimum function:
ψmin pa, bq “ minpa, bq.
This C-function is a Lipschitz function, but not differentiable when a “ b. The earliest
use of the min function in complementarity problems dates back to Aganagić [3]. The
corresponding semi-smooth method to solve (4.10) is called Newton-min. In the context of
(LCP) and (NCP), its convergence properties were analyzed by [51, 59]. According to the
numerical tests of [37,65], Newton-min gives better results than Newton-FB. Ben Gharbia
and her co-authors [14–17] used it extensively in the context of mixed systems.

• Mangasarian function:
ψM pa, bq “ ζp|a ´ b|q ´ ζpbq ´ ζpaq
where ζ : R Ñ R is a strictly increasing function and ζp0q “ 0. It can be made differen-
tiable everywhere by an appropriate choice of ζ, for instance ζptq “ t3 . Mangasarian [85]
introduced this family of C-functions with the intention of solving (NCP), but the core-
sponding Newton-M method does not seem to be very popular. This is probably due to the
fact that all smooth C-functions share the same deficiency: ∇ψp0, 0q “ p0, 0q. This implies
that for every index α P t1, . . . , `u for which Xα “ Hα pXq “ 0, we have ∇Fα pXq “ 0 and
the α-th row of the Jacobian matrix consists of zero entries, which makes it singular.

In §4.2.2, we will provide some basic notions on semismooth methods, with a focus on the
Newton-min method in §4.2.3.

Smoothing methods. A complementarity condition can also be regularized by a smooth


function, which introduces a regularization parameter. The idea is to apply smooth methods to
the smoothed equations and to gradually drive the regularization parameter to zero. Chen and
Mangasarian [27] were probably the first to come up with this strategy, that we will present in
§4.3. Smoothing methods also include the large family of interior-point methods, a brief survey
of which will be given in §4.3.3.
4.2. Nonsmooth approach to generalized equations 105

4.2 Nonsmooth approach to generalized equations


Let us return to the original mixed problem (4.1). We want to numerically solve

F pXq “ 0, (4.11)

where the function F : D Ă R` Ñ R` is not necessarily smooth, that is, not necessarily con-
tinuously Fréchet-differentiable everywhere its domain. We recall that Fréchet-differentiability2
at X P D means that there exists a linear map ∇F pXq : R` Ñ R` , or equivalently a matrix
∇F pXq P R`ˆ` in the canonical basis, such that

kF pX ` dq ´ F pXq ´ ∇F pXqd k
lim “ 0.
dÑ0 kdk

For system (4.1), we have F pXq “ rΛpXq, minpGpXq, HpXqqsT , but let us work with a general
nonsmooth function F .
In the smooth case, the Newton method is based on the idea of replacing F by successive local
models that are easier to solve. These local models rest upon the first-order Taylor expansion.
More specifically, given some X k P D, we consider the local model

s ÞÑ F pX k q ` ∇F pX k qpX
X s ´ Xkq (4.12)

as an approximation of F pXq s when X s is close to X k , and search for X k`1 as the zero of (4.12)
instead of (4.11). In the nonsmooth case, the philosophy of the nonsmooth approach is to attempt
some generalization of the above process. We have to face many challenges. On the one hand,
it is highly unlikely that we would be able to design a method for all nonsmooth functions.
Reasonably, additional assumptions on F will have to be made. On the other hand, it is not
clear what alternate local model could be used as a nonsmooth analog for the first-order Taylor
expansion.
In this section, we are going to present a theory developed for nonsmooth functions that are
locally Lipschitz-continuous. We recall that F is locally Lipschitz-continuous at X P D if there
exists a neighborhood BpX, X q of X and a constant LX such that

kF pXq r ď LX kX
q ´ F pXqk q ´ Xk,
r @pX,
q Xq
r P BpX, X q ˆ BpX, X q.

In §4.2.1, an abstract framework for the local model is introduced, which gives rise to an abstract
nonsmooth Newton method. In §4.2.2, at the price of further restricting ourselves to the subclass
of semismooth functions, a concrete instance of this theory is provided, which gives rise to the
semismooth Newton method.

4.2.1 Nonsmooth Newton method


4.2.1.1 Local model and algorithm
The generalization of the smooth local model (4.12) takes the form

s ÞÑ F pX k q ` T pX k , X
X s ´ X k q, (4.13)
2
In a finite-dimensional space, Fréchet-differentiability is equivalent to the usual notion of differentiability.
This is why we shall simply speak about “differentiability” throughout the remainder of the manuscirpt.
106 Chapter 4. Existing methods for sytems with complementarity conditions

where T pX k , ¨q represents some abstract function. To account for the dependency of this ap-
proximation on the current point X k , we need to consider a family of functions T pXq to which
each possible T pX, ¨q belongs. This is clarified in the following Definition, where we designate
by T pR` q the set of functions from R` to R` . No further property is required on T pR` q.
Definition 4.5 (Newton approximation scheme). Let F : D Ă R` Ñ R` be a locally Lipschitz-
continuous function.
1. A Newton approximation scheme of F is a set-valued mapping T : D Ñ T pR` q such that

T pX, 0q “ 0, for all T pX, ¨q P T pXq, (4.14a)

and
k F pXq ` T pX, X s k
s ´ Xq ´ F pXq
s P D.
lim sup “ 0, for all X (4.14b)
XÑX s kX ´ Xsk
T pX,¨q PT pXq

2. A strong Newton approximation scheme of F is a Newton approximation of F strengthened


by the condition
k F pXq ` T pX, X s k
s ´ Xq ´ F pXq
s P D.
lim sup s k2 ă 8, for all X (4.14c)
XÑX s kX ´ X
T pX,¨qPT pXq

3. A (strong) nonsingular Newton approximation of F is a (strong) Newton approximation of


F strengthened by the condition that T is a family of uniformly Lipschitz homeomorphisms
on D, by which we mean that there exist positive constants LT and εT such that for each
X P D and for each T pX, ¨q P T pXq, there are two open sets UX and VX , both containing
Bp0, εT q, such that T pX, ¨q is a Lipschitz homeomorphism mapping UX onto VX with LT
being the Lipschitz modulus of the inverse of the restricted map T pX, ¨q|UX .
Condition (4.14a) means that the local model

d ÞÑ F pXq ` T pX, dq, (4.15)

aimed at approximating F pX ` dq around X, must return the exact value F pXq for d “ 0.
This is quite natural. Condition (4.14b)–(4.14c) expresses that the local model must possess
good aproximation properties for d ‰ 0 small enough. As for the notion of singular Newton
approximation in the third item, it postulates that the local model must be invertible with
respect to d, at least locally. This is where the locally Lipschitz-continuous assumption on F is
really needed.
With the above definition, a natural extension of the Newton method is described in Al-
gorithm 4.1 for nonsmooth equations. This algorithm is very abstract. We do not know what
T pX, ¨q looks like. It is not even required to be linear. Our only hope is that in Step 3, solving
for dk in (4.16) is easier than coping with the original problem. Otherwise, the local model is
irrelevant. Notice, however, that there may not be a unique solution dk in Step 3. For one, we
may pick another element T pX k , ¨q P T pX k q if T pX k q is not a singleton. For another, equation
(4.16) may have several solutions dk for the same T pX k , ¨q. Some authors [47, §7.2.4] recommend
looking for dk P Bp0, q instead of R` , where  is a user-prescribed maximal radius, in order to
not get out of the “good” neighborhood. But the problem is then that equation (4.16) may not
have any solution.
4.2. Nonsmooth approach to generalized equations 107

Algorithm 4.1 Nonsmooth Newton algorithm

1. Choose X 0 P D Ă R` . Set k “ 0.

2. If F pX k q “ 0, stop.

3. Select an element T pX k , ¨q P T pX k q. Find a direction dk P R` such that

F pX k q ` T pX k , dk q “ 0. (4.16)

4. Set X k`1 “ X k ` dk and k Ð k ` 1. Go to step 2.

4.2.1.2 Well-definedness and convergence


Nonsingularity of the Newton approximation scheme is crucial for the sequence of iterates
tX k ukPN in Algorithm 4.1 to be well-defined. This turns out to be the hardest point to ver-
ify in practice. The following Theorem provides a sufficient condition for nonsingularity based
on an assumption of pointwise singularity at the solution X.
s

Theorem 4.2. Let F : D Ă R` Ñ R` be a locally Lipschitz-continuous function and let X


s PD
be a solution of F pXq “ 0. Assume that T is a Newton approximation scheme of F for which
s
there exist three positive constants ε1 , ε2 and L satisfying

(A) for each T pX,s ¨q P T pXq


s there are two sets U and V containing Bp0, ε1 q and Bp0, ε2 q
s ¨q is a Lipschitz homeomorphism from U to V and T ´1 pX,
respectively, such that T pX, s ¨q
has Lipschitz modulus L.

Assume further that a function L : R˚` Ñ R` with limtÓ0 Lptq “ 0 and a neighborhood N of X
s
exist such that either one of the following two conditions holds:

(a) for every X P N and every T pX, ¨q P T pXq, there exists a member T pX,s ¨q in T pXq
s such
that T pX, ¨q ´ T pX, ¨q is Lipschitz-continuous with modulus LpkX ´ Xkq on U ; or
s s

(b) for every X P N , T pXq “ tT pX, ¨qu is single valued and TrpX, ¨q ´ T pX,
s ¨q is Lipschitz-
continuous with modulus LpkX ´ Xkq
s on U , where TrpX, dq ” T pX, X s ´ X ` dq.

Then the Newton approximation scheme T is nonsingular.

Chứng minh. See [47, §7.2.12–§7.2.13].

Once the sequence of iterates is well-defined, the next question is about its convergence.
Before stating the main result, we recall the following defintions regarding convergence rates
that will be useful for other methods as well.

Definition 4.6 (Rates of convergence). Let tX k ukPN˚ Ă R` be a sequence converging to X


s P R` ,
with X k ‰ X
s for all k ě 0. We say that tX k ukPN˚ converges to X:
s

1. Q-linearly if
kX k`1 ´ Xk
s
0 ă lim sup s ă 1. (4.17a)
kÑ8 kX k ´ Xk
108 Chapter 4. Existing methods for sytems with complementarity conditions

2. Q-superlinearly if
kX k`1 ´ Xk
s
lim sup s “ 0. (4.17b)
kÑ8 kX k ´ Xk

3. Q-quadratically if
kX k`1 ´ Xk
s
0 ă lim sup s 2 ă 8. (4.17c)
kÑ8 kX k ´ Xk

The upcoming theorem recapitulates the key properties of Algorithm 4.1.

Theorem 4.3. Let F : D Ă R` Ñ R` be a locally Lipschitz-continuous function and let X s PD


s “ 0. Assume that F admits a nonsingular Newton approximation T .
be a solution of F pXq
Then, for every ε P p0, εT s, there exists δ ą 0 such that if X 0 P BpX,
s δq, then Algorithm 4.1
k
generates a unique sequence tX ukPN that converges Q-superlinearly to X. s Furthermore, if the
Newton approximation scheme T is strong, the rate of convergence is Q-quadratic.

Chứng minh. See [47, §7.2.5].

4.2.2 Semismooth Newton method


As said earlier, although the nonsmooth Newton method of §4.2.1 is a convenient theoretical
tool, it is too generic a construction. To be of any practical use, the Newton approximation
scheme T must be specified in a more substantial way. This can be achieved for semismooth
functions [92,105], the definition of which requires some preliminary notions on subdifferentials.

4.2.2.1 Local model and algorithm


By Rademacher’s theorem [31, §3.4.1], every locally Lipschitz-continuous function is continuously
differentiable almost everywhere. Put another way, the set CF of points X P D where ∇F pXq
exists in the classical sense is non-empty and its complement DzCF has measure zero. This
property lies at the foundation of the following definitions.

Definition 4.7 (Bouligand and Clarke subdifferentials). Let F : D Ď R` Ñ R` be a locally


Lipschitz-continuous function and CF Ă D be the set of points at which F is differentiable.

1. The B-subdifferential or the limiting Jacobian of F at X is the set-valued mapping BB F :


D Ñ R`ˆ` defined as

BB F pXq “ M P R`ˆ` | DpX k qkPN Ă CF , X k Ñ X, ∇F pX k q Ñ M .


(
(4.18a)

In other words, the Bouligand subdifferential BB F pXq is the set of all matrices M are the
limits of the Frechet differentials ∇F pX k q for a sequence X k converging to X.

2. The C-subdifferential or the generalized Jacobian of F at X is the set-valued mapping


BF : D Ñ R`ˆ` given by
BF pXq “ convpBB F pXqq. (4.18b)
In other words, the Clarke subdifferential BF pXq is the convex hull of the Bouligand
subdifferential BB F pXq.
4.2. Nonsmooth approach to generalized equations 109

As a classical example, let us consider f pxq “ |x| for x P R. Then, BB f p0q “ t´1, 1u
and Bf p0q “ r´1, 1s. The generalized Jacobian BF latter allows many classical results valid
for smooth functions to be extended to locally Lipschitz-continuous functions. Regarding the
Newton method, if the function F at hand is locally Lipschitz-continuous, it is of course tempting
to associate each M P BF pXq with the function TM pX, ¨q : R` Ñ R` defined by

TM pX, dq “ M d, @d P R` , (4.19a)

and to create the family (


T pXq “ TM pX, ¨q, M P BF pXq (4.19b)
in order to obtain a Newton approximation scheme T : : D Ñ T pR` q in the sense of Defini-
tion 4.5. This Newton approximation scheme would then have the huge advantage the local
model
d ÞÑ F pXq ` M d (4.20)
is linear! Unfortunately, in general the linear model (4.19) does not satisfy the limit conditions
(4.14b)–(4.14c). This is why we have to restrict ourselves to a subclass of locally Lipschitz-
continuous functions. Semismooth functions are precisely the class of locally Lipschitz-continuous
functions for which the generalized Jacobian furnishes a bona fide first-order approximation.

Definition 4.8 (Semismooth function). Let F : D Ď R` Ñ R` be a locally Lipschitz-continuous


function. We say that:

• F is semismooth at X
s P D if

kF pXq ` M pX
s ´ Xq ´ F pXqk
s
lim sup “ 0. (4.21a)
XÑX s kX ´ Xk
s
M PBF pXq

• F is strongly semismooth at X
s if the above requirement is strengthened to

kF pXq ` M pX
s ´ Xq ´ F pXqk
s
lim sup s 2 ă 8, (4.21b)
XÑX s kX ´ Xk
M PBF pXq

The original definition of semismooth functions given in [92] and adopted in [47, §7.4.2]
require F to be directionally differentiable at X. Here, following [110] we employ the equivalent
definition (4.21a) in order to condense the narrative. For semismooth functions, the identification
T ” BF by means of (4.19) is legitimate. Definition 4.8 may seem to rule out a lot of locally
Lipschitz-continuous functions, but in fact the subclass of semismooth mappings is rich enough
to include many functions of interest in real applications.
The semismooth Newton algorithm is described in Algorithm 4.2. In Step 3, we select a matrix
M k in BF pX k q. As BB F pX k q Ă BF pX k q, some authors [63] advocate picking M k in BB F pX k q
instead, when it is difficult to identify the generic element of BF pX k q. We will encounter an
instance of this situation in §4.2.3 for the Newton-min method. If the matrix M k is nonsingular,
there is a unique solution dk to the linear system (4.22). But there may be many choices for
M k if BB F pX k q or BF pX k q is not a singleton. Note that the generalized Jacobian BF pX k q is a
singleton if and only if F is differentiable at X k . In this case BFB pX k q “ BF pX k q “ t∇F pX k qu
and we recover the smooth Newton method, at least for the current iteration.
110 Chapter 4. Existing methods for sytems with complementarity conditions

Algorithm 4.2 Semismooth Newton algorithm

1. Choose X 0 P D Ă R` . Set k “ 0.

2. If F pX k q “ 0, stop.

3. Select an element M k P BF pX k q. Find a direction dk P R` such that

F pX k q ` M k dk “ 0. (4.22)

4. Set X k`1 “ X k ` dk and k Ð k ` 1. Go to step 2.

4.2.2.2 Well-definedness and convergence


For Algorithm 4.2 to be well-defined, the linear system (4.22) in the unknown dk must be
nonsingular at each iteration. The next Lemma guarantees that M k is nonsingular provided that
s are nonsingular and that X k is sufficiently
all the elements of the generalized Jacobians BF pXq
close to X.
s

Theorem 4.4. Let F : D Ă R` Ñ R` be a semismooth function. Suppose that at a point X s P D,


all the matrices of BF pXq are nonsingular. Then, there exists a constant δ ą 0 such that, for
s
any X P BpX,s δq, all the matrices of BF pXq are nonsingular.

Chứng minh. This follows from the fact that the generalized Jacobian mapping X ÞÑ BF pXq
is compact-valued and upper semicontinuous [47, §7.1.4], and from the technical result of [47,
§7.5.2].

Now, we state a local convergence theorem with convergence rates for the semismooth Newton
method. We recall that the notions of Q-superlinear and Q-quadratic convergence have been
introduced in (4.17b)–(4.17c) [Definition 4.6].

Theorem 4.5. Let F : D Ă R` Ñ R` be a semismooth function and let X s P D be a solution of


F pXq
s “ 0. If all the matrices of BF pXq
s are nonsingular, then there exists a δ ą 0 such that, if
0 k
X P BpX, δq, the sequence tX ukPN generated by Algorithm 4.2 is well-defined and converges
s
Q-superlinearly to X.
s Furthermore, if F is strongly semismooth at X,
s then the convergence rate
is Q-quadratic.

Chứng minh. See [47, §7.5.3].

4.2.3 Newton-min method


As an application of the previous theory, let us consider the mixed problem (4.1), in which
the complementarity conditions are expressed by the min function. The system to be solved is
F pXq “ 0, with „ 
ΛpXq
F pXq “ . (4.23)
minpGpXq, HpXqq

Proposition 4.2. If Λ, G, H : D Ă R` Ñ R` are continuously differentiable, then F is


semismooth.
4.2. Nonsmooth approach to generalized equations 111

When F corresponds to the phase equilibrium problems (2.42) or (2.77), its B-subdifferential
consists of all matrices M P R`ˆ` of the form
" „  *
∇ΛpXq mˆ`
BB F pXq “ M “ , ∇
{ PR , (4.24a)
∇{

where the α-th row of ∇{ for α P t1, . . . , mu is


$
& ∇Gα pXq
’ if Gα pXq ă Hα pXq,
∇{ α “ ∇Gα pXq or ∇Hα pXq if Gα pXq “ Hα pXq, (4.24b)

∇Hα pXq if Gα pXq ą Hα pXq.
%

Chứng minh. A smooth (i.e., continuously differentiable) function is also a semismooth function.
The compononentwise minimum of two semismooth functions is a semismooth function [63,
§1.75]. The second part of the Proposition can readily be proven by verifying Definition 4.7 or
by applying more general results on the B-subdifferential of a vector-valued function [63, §1.54]
and of the componentwise minimum mapping [63, §1.55].
For the latter result on the B-subdifferential of the min function, a technical condition is
required: if Gα pXq “ Hα pXq for some α P t1, . . . , mu and X P D, there must exist two sequences
tXq k ukPN˚ Ă D and tX p k ukPN˚ Ă D both converging to X such that Gα pX q k q ă Hα pX
q k q and
Gα pX k
p q ą Hα pX k ˚
p q for all k P N . In the case of (2.42) or (2.77), this can be checked by a direct
inspection of the equations.

The corresponding semismooth Newton method, in which a matrix M k P BB F pX k q is chosen


to define the local model, is called the Newton-min algorithm and described in Algorithm 4.3.
Note that, in this problem, it is not easy to work out an explicit form for the generic matrix of
the Clarke subdifferential BF pX k q.

Algorithm 4.3 Newton-min algorithm

1. Choose X 0 P D Ă R` . Set k “ 0.

2. If F pX k q “ 0, stop.

3. Select an element M k P BB F pX k q as in (4.24). Find a direction dk P R` such that

F pX k q ` M k dk “ 0. (4.25)

4. Set X k`1 “ X k ` dk and k Ð k ` 1. Go to step 2.

By virtue of Theorem 4.5, the Newton-min algorithm converges if `the˘ initial iterate is close
enough to a solution X s of F pXq “ 0, for which all the elements of BF X s are nonsingular. It is
tempting to resort to a line search technique [22, 94] in an effort to ensure a globally convergent
behavior, by which we mean that the sequence of iterates always converges to some limit (which
is not necessarily the sought-after solution). The idea of line search is to apply a damping factor
ς k P p0, 1q to the Newton-min direction dk determined in (4.25), so that the updated state in
Step 4 is now
X k`1 “ X k ` ς k dk ,
112 Chapter 4. Existing methods for sytems with complementarity conditions

along with the guarantee that ΘpX k`1 q ă ΘpX k q for some merit function whose minimum
s More on this can be found in §4.3.1.3 for the smooth
value is achieved precisely at the zero X.
equations and in [47, §8.3 and §9.2] for nonsmooth equations.
Regarding the Newton-min method, the utmost difficulty is that the direction dk computed
by (4.25) is not always a descent direction for the least-squares merit function

1
ΘpXq :“ kF pXqk2 , (4.26)
2
as observed by Ben Gharbia [11]. Globalization of Newton-min remains therefore a delicated
issue. In this respect, a recent work by Dussault et al. [44] is worth mentioning, where the
authors proposed a variant called the polyhedral Newton-min algorithm and for which some
globalization process becomes possible.

4.3 Smoothing methods for nonsmooth equations


Instead of deploying a nonsmooth Newton method to solve nonsmooth equations, an alternative
would be to approximate the nonsmooth system by a smooth one, to which a smooth Newton
method with enhanced properties can be applied.
The privileged tool for producing a smooth approximation of a nonsmooth function is reg-
ularization, which usually introduces a small regularization parameter. Informally, let F : D Ă
R` Ñ R` be the nonsmooth function for which we look for a zero X s P D such that F pXq
s “ 0. A
regularization of F is a family of functions

Frp¨; νq : D Ă R` Ñ R` , ν ą 0
(
(4.27)

such that

• Frp¨; νq is a smooth (continuously differentiable) function of X, for all ν ą 0;

• Frp¨; νq is continuous with respect to ν, in some functional sense;

• limνÓ0 Frp¨; νq “ F p¨q, in some functional sense.

Starting from a current pair of values pX k , ν k q, the overall strategy of a smoothing method is to

1. Solve FrpX k`1 ; ν k q “ 0 in the unknown X k`1 by means of the smooth Newton method,
using X k as the initial point.

2. Decrease the regularization parameter from ν k to ν k`1 by some “rule of thumb.” Start over
the process until F pX k`1 q “ 0.

If the nonlinear system in Step 1 is solved “exactly” by letting the smooth Newton algorithm go
until convergence, the smoothing method is said to be full Newton. A full Newton resolution is
in perfect agreement with the smoothing philosophy, which is to replace the original “difficult”
problem by a sequence of “easier” problems and to gradually push the easy problem towards
the difficult one. However, the price to be paid for the full Newton resolution is very expensive,
since the full Newton method must be executed for each parameter ν. The computational cost
can be lowered if the nonlinear system in Step 1 is solved “approximately” by letting the smooth
Newton algorithm do just one iteration. In this case, the method is said to be diagonal Newton.
4.3. Smoothing methods for nonsmooth equations 113

The diagonal Newton resolution naturally induces more approximation error, but it is obviously
of great practical interest.
Although we shall not consider full Newton smoothing methods in this work, we take this
opportunity to briefly survey the smooth Newton method and the numerous convergence the-
orems associated with it in §4.3.1. Then, in §4.3.2, we review a family of smoothing functions
called θ-functions for complementarity conditions. Finally, in §4.3.3, we turn our attention to
interior-point methods, from which a new method will be designed in chapter §5.

4.3.1 Newton’s method


For conciseness, we shall be using the notation F instead of Frp¨, νq for the smoothed out function
at some fixed parameter ν ą 0.

4.3.1.1 Algorithm
The idea of Newton’s method is to construct a sequence tX k ukPN˚ by successively linearizing
the equation F pXq “ 0 at the current iterate by invoking the first-order local model

X ÞÑ F pX k q ` ∇F pX k qpX ´ X k q (4.28a)

to approximate F pXq when X is close to X k . The local model can equivalently be thought of
as the mapping
d ÞÑ F pX k q ` ∇F pX k qd, (4.28b)

meant to approximate F pX k ` dq for kdk small. Our purpose is then shifted to looking for the
zero of the local model (4.28b). If the Jacobian matrix ∇F pX k q is invertible, the unique zero of
(4.28b) can be seen to be
dk “ ´r∇F pX k qs´1 F pX k q, (4.29a)

so that the new iterate is


X k`1 “ X k ´ r∇F pX k qs´1 F pX k q. (4.29b)

The sequence (4.29b) is said to be well-defined if at each iteration k, the matrix ∇F pX k q is


invertible and the updated state X k`1 remains in the domain D of F . For later analysis, it is
convenient to introduce another concept.

Definition 4.9 (Newton direction). At any point X P D where the Jacobian matrix ∇F pXq is
invertible, the vector
dpXq “ ´r∇F pXqs´1 F pXq (4.30)

is called the Newton direction for F at X.

Using this notation, the Newton method can be written as

X k`1 “ X k ` dpX k q. (4.31)

The two issues to be addressed now relate to the well-definedness of the sequence tX k ukPN˚ and
its (local and global) convergence. With respect to local convergence, several classical theorems
are at our disposal. Below we go through some of them, emphasizing their differences.
114 Chapter 4. Existing methods for sytems with complementarity conditions

4.3.1.2 Local convergence analysis


The first theorem is what we qualify as the regular-zero Newton theorem. To state this theorem,
we need the following definition.

Definition 4.10 (Regular zero). Let X s P D Ă R` be a zero of F , that is, F pXq


s “ 0. If the
Jacobian matrix ∇F pXq is nonsingular, X is said to be a regular zero of F .
s s

In the scalar case ` “ 1, a regular zero means a simple zero. The regular-zero Newton
theorem assumes that a regular zero X s exists, together with the Lipschitz-continuity of the
Jacobian mapping X ÞÑ ∇F pXq in a neighborhood of X. s The conclusion is that if the initial
0
point X is close enough to the solution X, then the iterates are well-defined and converge
s
Q-quadratically. The constant involved in this Q-quadractic convergence is the product of the
s ´1 with the Lipschitz modulus γ of ∇F .
norm β of the inverse r∇F pXqs

Theorem 4.6 (regular-zero Newton). Let F : D Ă R` Ñ R` be continuously differentiable on


the open convex domain D. Assume that there exists a regular zero X
s P D, i.e.,

F pXq
s “ 0, det ∇F pXq
s ‰ 0,

and that there exist r, β, γ ą 0 such that

s rq Ă D,
BpX, s ´1 k ď β,
k r∇F pXqs ∇F P Lipγ pBpX,
s rqq. (4.32)

Then, there exists ε ą 0 such that, for all X 0 P BpX,


s εq, the sequence tX k ukPN˚ generated by
(4.29b) is well-defined, converges to X and obeys
s

kX k`1 ´ Xk
s ď βγ kX k ´ Xk
s 2. (4.33)

Chứng minh. See [41, §5.2].

There is another famous convergence theorem for Newton’s method, due to Kantorovich.
Contrary to the regular-zero theorem, the Newton-Kantorovich theorem does not make any
requirement about the existence of a zero X. s Its assumptions are rather focused on the initial
0 0
point X . It asserts that if ∇F pX q is nonsingular, ∇F is Lipschitz-continuous in a neighborhood
of X 0 , and the first Newton step is small enough relative to the nonlinearity of F , then there must
be a root X s in this region, and furthermore it is unique. In exchange for these broader hypotheses,
the rate of convergence is slightly weaker: it is only R-quadratic instead of Q-quadratic. This
means that the error sequence can be bounded by kX k ´ Xk s ď ρk , where tρk ukPN˚ converges
Q-quadratically to zero.

Theorem 4.7 (Newton-Kantorovich). Let F : D Ă R` Ñ R` be continuously differentiable on


the open convex domain D. Assume that ∇F pX 0 q is nonsignular and that there exist r0 , β,
γ ą 0 and η ě 0 such that
?
1 0 1 ´ 1 ´ 2βγη
βγη ď , r ě r´ :“ , BpX 0 , r0 q Ă D, (4.34a)
2 βγ
and

kr∇F pX 0 qs´1 k ď β, kr∇F pX 0 qs´1 F pX 0 qk ď η, ∇F P Lipγ pBpX 0 , r0 qq. (4.34b)


4.3. Smoothing methods for nonsmooth equations 115

s of F in BpX 0 , r´ q. The sequence tX k ukPN˚ generated by (4.29b)


Then, there is a unique root X
is well-defined and converges to X.
s If βγη ă 1{2, then X s is also the unique zero of F in
0 0
BpX , minpr , r` qq, where ?
1 ´ 1 ` 2βγη
r` :“ ,
βγ
and the sequence of iterates obeys
2 k
ks ď p2βγηq .
kX ´ Xk (4.35)
2k βγ

Chứng minh. See [41, §5.3] and [68, §5.5].

The Newton-Mysovskikh3 theorem, a third one, resembles the Newton-Kantorovich theorem


in that: (i) it does not make any requirement about the existence of a solution, and (ii) it assumes
that the first Newton step is sufficiently small. However, it differs from the Newton-Kantorovich
in three aspects. Firstly, it explicitly makes the stronger assumption on the invertibility of
∇F pXq in a neighborhood of the initial point X 0 . Secondly, it ensures the existence of a zero Xs
but does not make any claim about uniqueness. Thirdly, it supplies us not only with a nearly
quadractic rate of convergence (4.37a), but also with an a posteriori error estimate (4.37b) for
the current iterate. Indeed, the upperbound in (4.37b) can be computed even if the exact solution
Xs is not known, but provided that the various constants are known.

Theorem 4.8 (Newton-Mysovskikh). Let F : D Ă R` Ñ R` be continuously differentiable on


the open convex domain D. Assume that there exist r0 , β, γ ą 0 and η ě 0 such that
η
βγη ă 2, r0 ě , BpX 0 , r0 q Ă D, (4.36a)
1 ´ 12 βγη

and

kr∇F pXqs´1 k ď β, kr∇F pX 0 qs´1 F pX 0 qk ď η, ∇F P Lipγ pBpX 0 , r0 qq, (4.36b)

for all X P BpX 0 , r0 q. Then, the sequence tX k ukPN˚ generated by (4.29b) is well-defined and
converges to a zero Xs P BpX 0 , r0 q of F . Moreover, the sequence of iterates obeys
` 1 ˘2k ´1
k η 2 βγ
kX ´ Xk
s ď
` ˘2k , (4.37a)
1 ´ 21 βγη
1
2 βγ
kX k ´ Xk
s ď
`1 ˘2k kX k ´ X k´1 k2 . (4.37b)
1´ 2 βγη

Chứng minh. See [97, §12.4.6]

There are many possible improvements and other theorems born out of other motivations.
A summary can be found in [52, 120], along with the historical developments of the convergence
theory of smooth Newton’s method. Another series of results, due to Deuflhard [42], is worth
mentioning. Deuflhard investigated the question of affine invariance for the convergence theo-
rems of Newton’s method. This questions comes from the observation that Newton’s method is
3
also spelled “Mysovskii”
116 Chapter 4. Existing methods for sytems with complementarity conditions

invariant with respect to affine transformation of the variables and of the equations. In other
words, let MX and MF are two invertible matrices of R`ˆ` . If we perform the change of vari-
ables X “ MX X p (e.g., by adopting other units of measurements) and the change of equations
Fp “ MF F (e.g., by rescaling the laws of physics), the Newton iterates for the system

FppXq
p “ MF F pMX Xq
p “0 (4.38)

are

p k`1 “ X
X p k ´ r∇ p FppX
p k qs´1 FppXp kq
X
“Xp k ´ rMF ∇X F pMX X p k qMX s´1 MF F pMX X
p kq
p k ´ M ´1 r∇X F pMX X
“X xk qs´1 F pM X
X
p k q,
X

and exactly match those of the original system F pXq “ 0, up to the same transformation of
variable MX . Affine invariance of the Newton method is fundamental for industrial codes to be
robust with respect to a change of units in the quantities computed and to a rescaling of the
equations.
However, the convergence theorems such as Newton-Kantorovich and Newton-Mysovskikh
are not affine invariant, in that they are not automatically preserved by affine transforma-
tions. In fact, the inequaltities still hold but with a different set of constants which can be
much more defavorable than the original ones. It is therefore a serious research topic to find an
affine-invariant formulation for the classical theorems. Below we write down the affine covariant
versions of the last two theorems. By “affine covariant,” we mean invariance with respect to an
arbitrary rescaling MF of the equations (but no change of variables is considered, i.e., MX “ I).

Theorem 4.9 (affine covariant Newton-Kantorovich). Let F : D Ă R` Ñ R` be a continuously


differentiable on the open convex domain D. Assume that ∇F pX 0 q is nonsignular and that there
exist r0 , ω ą 0 and η ě 0 such that
?
1 0 1 ´ 1 ´ 2ωη
ωη ď , r ě r´ :“ , BpX 0 , r0 q Ă D, (4.39a)
2 ω
and

kr∇F pX 0 qs´1 p∇F pXq


q ´ ∇F pXqqk
kr∇F pX 0 qs´1 F pX 0 qk ď η, ď ω, (4.39b)
kX q ´ Xk

q P BpX 0 , r0 q. Then, the sequence tX k ukPN˚ generated by (4.29b) is well-defined


for all X ‰ X
s P BpX 0 , r´ q of F . If ωη ă 1{2, the convergence is R-quadratic.
and converges to a zero X

Chứng minh. See [42, Theorem 2.1].

In comparison with the formulation of Theorem 4.8, the two conditions kr∇F pX 0 qs´1 k ď β
and ∇F P Lipγ pBpX 0 , r0 qq have been merged into the single covariant condition

kr∇F pX 0 qs´1 p∇F pXq


q ´ ∇F pXqqk ď ωkX
q ´ Xk.

Likewise, the constants β and γ have been telescoped into the single constant ω. In the same
spirit, we have the following reformulation of Theorem 4.8.
4.3. Smoothing methods for nonsmooth equations 117

Theorem 4.10 (affine covariant Newton-Mysovskikh). Let F : D Ă R` Ñ R` be continuously


differentiable on the open convex domain D. Assume that there exist r0 , ω ą 0 and η ě 0 such
that
η
ωη ă 2, r0 ě , BpX 0 , r0 q Ă D, (4.40a)
1 ´ 12 ωη
and
r ´1 p∇F pXq
kr∇F pXqs q ´ ∇F pXqqpX
q ´ Xqk
kr∇F pX 0 qs´1 F pX 0 qk ď η, ď ω, (4.40b)
kX q ´ Xk2

for all collinear X ‰ X,


q Xr P BpX 0 , r0 q. Then, the sequence tX k ukPN˚ generated by (4.29b) is
well-defined and converges to a zero Xs P BpX 0 , r0 q of F . Moreover, the sequence of iterates
obeys

kX k`1 ´ X k k ď 21 ωkX k ´ X k´1 k2 , (4.41a)


kX k`1 ´ Xkk
kX k ´ Xk
s ď
1 k`1
. (4.41b)
1´ 2 ωkX ´ Xkk

Chứng minh. See [42, Theorem 2.2].

4.3.1.3 Globalization with line search


The above Theorems testify to an excellent theoretical rate of convergence in a neighborhood
of a zero of F . However, Newton’s method may fail to converge if the starting point is too far
from the desired zero. In an effort to improve its behavior, we can use a globalization strategy
such as line search or trust region [32]. In this thesis, we will focus on the line search technique.
To this end, let us consider the least-squares potential
1
Θ pXq :“ kF pXqk2 (4.42)
2
s P D of F , then minXPD ΘpXq “ 0 and X
as the merit function. If there exists a zero X s is a
solution of the minimization problem whose objective function is Θ. The next Lemma provides
the gradient ∇Θ, represented as a row vector, and defines a descent direction for Θ.

Lemma 4.1. If F is smooth, then the function Θ defined by (4.42) is also smooth and

∇ΘpXq d “ xF pXq, ∇F pXqdy

for all d P R` , where x¨, ¨y denotes the dot product in R` . In particular, if ∇F pXq is invertible,
then the Newton direction (4.30) exists and

∇ΘpXq dpXq “ ´2ΘpXq. (4.43)

We say that d P R` is a descent direction for Θ at X if ∇ΘpXqd ă 0. Lemma 4.1 implies


that Newton direction, whenever it is well-defined, is a descent direction for the least-squares
potential. The idea is then to replace the full increment dpX k q by ς k dpX k q, where ς k P p0, 1q, in
the update formula (4.31), which yields the damped Newton iteration

X k`1 “ X k ` ς k dpX k q.
118 Chapter 4. Existing methods for sytems with complementarity conditions

The flexibility of being able to choose ς k P p0, 1q is vital for global convergence. Usually, this
damping parameter is selected so as to decrease the potential, i.e.,

ΘpX k ` ς k dpX k qq ď ΘpX k q ` tsome negative termu.

This will always be possible for ς k ą 0 small enough, because the Newton direction is a descent
direction. Nevertheless, it is interesting to take ς k as close to 1 as possible, in order to benefit
from superlinear convergence.
Algorithm 4.4 sketches out the Newton method with a line search technique due to Armijo [5].
This technique rests upon a backtracking procedure described in Step 4, the purpose of which
is to meet the Armijo condition

ΘpX k ` ς k dk q ď ΘpX k q ` κς k r∇ΘpX k q dk s (4.44)

for some constant κ P p0, 1{2q. For the least-squares potential (4.42), the Armijo condition is
equivalent to (4.46).

Algorithm 4.4 Newton algorithm with Armijo line search

1. Choose X 0 P D Ă R` , κ P p0, 1{2q, % P p0, 1q. Set k “ 0.

2. If F pX k q “ 0, stop.

3. Find a direction dk P R` such that

F pX k q ` ∇F pX k qdk “ 0. (4.45)

4. Choose ς k “ %jk P p0, 1q, where jk P N is the smallest integer such that

ΘpX k ` %jk dk q ď ΘpX k q ` κς k r∇ΘpX k q dk s “ p1 ´ 2κ%jk q ΘpX k q. (4.46)

5. Set X k`1 “ X k ` ς k dk and k Ð k ` 1. Go to step 2.

It has to be pointed out that there are many other possible conditions [94, §3.1] for line
search, such as

• the Wolfe conditions:

ΘpX k ` ς k dk q ď ΘpX k q ` κς k r∇ΘpX k q dk s,


∇ΘpX k ` ς k dk q dk ě λ r∇ΘpX k q dk s,

where 0 ă κ ă λ ă 1.

• the Goldstein conditions:

ΘpX k q ` p1 ´ κqς k r∇ΘpX k q dk s ď ΘpX k ` ς k dk q ď ΘpX k q ` κς k r∇ΘpX k q dk s,

where 0 ă κ ă 1{2.
4.3. Smoothing methods for nonsmooth equations 119

The theoretical advantage of the Wolfe or Goldstein conditions is that by Zoutendijk’s theorem
[94, Theorem 3.2], it can be guaranteed that, for any initial point X 0 , the sequence of iterates
is globally convergent in the sense that

lim k∇ΘpX k qk “ 0.
kÑ`8

It is important to be aware that this does not mean that the iterates converge to a minimizer
X,
s but only that they are attracted by stationary points. For stronger global results, we need
stronger assumptions. In practice, however, our preference goes to Armijo’s condition and the
associated backtracking procedure for its greater efficiency, despite the lack of theoretical results.

4.3.2 Smoothing functions for complementarity conditions


In the previous section, we revisisted the smooth Newton method for computing a root of the
regularized function Frp¨; νq hypothetically set up in (4.27). In this section, we elaborate on
how such a regularized function can be actually built up from the initial function (4.23). Our
smoothing technique is based on the continuous approximation of a more elementary object,
namely, the step function.

4.3.2.1 θ-smoothing of the step function


The step function is understood to be the function S : R` Ñ t0, 1u defined as
#
0 if t “ 0,
Sptq “ (4.47)
1 if t ą 0.

As an indicator of positive arguments t ą 0 over R` , the step function S “discriminates” the


argument t “ 0 by assigning a zero value to it. The price to be paid for this sharp detection is
the discontinuity of S at t “ 0. Analogously to (4.27), we wish to have a regularization of S,
that is, a family of functions
(
r νq : R` Ñ r0, 1q, ν ą 0 ,
Sp¨; (4.48)

such that

• Sp¨;
r νq is a smooth function of t ě 0, for all ν ą 0;

• Sp¨;
r νq is continuous with respect to ν, in some functional sense;

• limνÓ0 Sp¨;
r νq “ Sp¨q, in some functional sense.

To obtain such a family, we follow the methodology developed by Haddou and his coauthors
[7, 55], the key ingredient of which is a smoothing function. This notion turned out to be a
versatile tool in a wide variety of pure and applied mathematical problems [19, 56, 57, 93]. We
begin with a “father” function, from which all other regularized functions will be generated.

Definition 4.11 (θ-smoothing function). A function θ : R` Ñ r0, 1q is said to be a θ-smoothing


function if it is continuous, nondecreasing, concave, and

θp0q “ 0, (4.49a)
120 Chapter 4. Existing methods for sytems with complementarity conditions

lim θptq “ 1. (4.49b)


tÑ`8

Furthermore, if θ can be defined for negative arguments t P p´T, 0q, with T ą 0, while remaining
continuous, nondecreasing and concave, it is required that
θptq ă 0 for t P p´T, 0q. (4.49c)
The two most common examples of smoothing functions are:
1. the rational function θ1 : p´1, `8q Ñ p´8, 1q defined by
t
θ1 ptq “ . (4.50a)
t`1

2. the exponential function θ2 : R Ñ p´8, 1q defined by


θ2 ptq “ 1 ´ expp´tq. (4.50b)

A more general “recipe” to build θ-smoothing functions is to consider nondecreasing probabil-


ity density functions f : R` Ñ R` and then take the corresponding cumulative distribution
function, i.e., ż t
θptq “ f pyq dy, t ě 0, (4.51)
0
to get a continuous, nondecreasing function. The nonincreasing assumption on f gives the con-
cavity of θ. Finally, it is straightforward to check that conditions (4.49) are satisfied by the
function (4.51). Once a favorite θ-smoothing has been selected, the next step is to dilate and to
compress it in order to produce a family of regularized functions for the step function S.
Definition 4.12 (θ-smoothing family). Let θ be a θ-smoothing function. The family of functions
" ˆ ˙ *
t
θν ptq :“ θ , νą0 (4.52)
ν
is said to be the θ-smoothing family associated with θ.
Obviously, θν is a smooth function of t ě 0 for all ν ą 0. It is also continuous with respect
to ν at each fixed t ě 0. From the defining properties (4.49), it can be readily shown that
lim θν ptq “ Sptq, @t ě 0. (4.53)
νÓ0

In other words, S is the limit of θν in the sense of pointwise convergence. Thus, tSp¨, νq “
θν , ν ą 0u is a good family of regularized functions in the sense of (4.48). Associated with the
two examples (4.50) are:
1. the rational family θν1 : p´ν, `8q Ñ p´8, 1q defined by
t
θν1 ptq “ . (4.54a)
t`ν

2. the exponential family θ2 : R Ñ p´8, 1q defined by


θν2 ptq “ 1 ´ expp´t{νq. (4.54b)

Figures 4.1–4.2 display the two families (4.54) for a few parameters ν. We can see that the
smaller ν is, the steeper is the slope at t “ 0 and the closer to S the function is.
4.3. Smoothing methods for nonsmooth equations 121

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10

Figure 4.1: Function θν1 for a few values of ν.

0.9

0.8

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10

Figure 4.2: Function θν2 for a few values of ν.


122 Chapter 4. Existing methods for sytems with complementarity conditions

4.3.2.2 θ-smoothing of a complementarity condition


A θ-smoothing family of the step function paves the way for a smooth approximation of a
complementarity condition. Let pv, wq P R2 be two scalars such that

0 ď v K w ě 0, (4.55a)

that is,
v ě 0, w ě 0, vw “ 0. (4.55b)
In the pv, wq-plane, the set of points obeying (4.55) is the union of the two semi-axes tv ě 0, w “
0u and tv “ 0, w ě 0u. Visually, the nonsmoothness of (4.55) is manifested by the “kink” at the
corner pv, wq “ p0, 0q. We consider two possible smooth approximations of (4.55), depending
how it is rewritten in terms of the step function S.

“Sum-to-one.” The first approximation, to which we give the name sum-to-one, comes from
the following observation.

Lemma 4.2. Assuming v ě 0 and w ě 0, we have the equivalence

vw “ 0 ô Spvq ` Spwq ď 1. (4.56)

Chứng minh. If v “ 0 for instance, then Spvq ` Spwq “ Spwq P t0, 1u because Sp0q “ 0. This
proves “ñ”. Conversely, the inequality Spvq ` Spwq ď 1 forbids Spvq ` Spwq to take the value 2.
But this is precisely the value reached by the sum when v ą 0 and w ą 0. This proves “ð”.

The equivalence (4.56) suggests us to impose

v ě 0, w ě 0, θν pvq ` θν pwq “ 1 (4.57)

for ν ą 0, as a smooth approximation of (4.55). Replacing S by θν in (4.56) is logical. Replacing


“ď” by “=” in (4.56) seems to be a bold move, but this is motivated by the fact that we want
an equality to be mounted into the system of equations. Let us examine the impact of this
“sum-to-one” approach on the examples (4.54).

1. For the rational family (4.54a), we have the remarkable equivalence

θν1 pvq ` θν1 pwq “ 1 ô vw “ ν 2 , (4.58a)

as can be shown by a straightforward calculation. The equality vw “ ν 2 appears to be a


natural relaxation of vw “ 0, which could have been worked out directly, without resorting
any θ-smoothing function! As will be seen later, this is the smoothing paradigm used in
interior-point methods, with ν in the right-hand side instead of ν 2 though.

2. For the exponential family (4.54b), the equality θν2 pvq ` θν2 pwq “ 1 leads to the equivalence

θν2 pvq ` θν2 pwq “ 1 ô ´ν lnrexpp´v{νq ` expp´w{νqs “ 0, (4.58b)

as can be shown by a straightforward calculation. In the left-hand side, the function

minν pv, wq :“ ´ν lnrexpp´v{νq ` expp´w{νqs


4.3. Smoothing methods for nonsmooth equations 123

can be interpreted as a smooth approximation of minpv, wq. Indeed, assuming 0 ď v ă w,


we can see that expp´v{νq prevails over the other term when ν Ó 0. Therefore, this is a
natural relaxation of minpv, wq “ 0. It could have been worked out without the help of
any θ-smoothing function, since the smooth approximation

maxν pv, wq :“ ν lnrexppv{νq ` exppw{νqs

of maxpv, wq is rather well-known in the literature [10, 18].

“Sum-to-theta.” The second smooth approximation, which we refer to as sum-to-theta, comes


from another observation.

Lemma 4.3. Assuming v ě 0 and w ě 0, we have the equivalence

vw “ 0 ô Spvq ` Spwq “ Spv ` wq. (4.59)

Chứng minh. If v “ 0 for instance, the left-hand side is equal to Sp0q ` Spwq “ Spwq, while
the right-hand is also equal to Spwq. This proves “ñ”. Conversely, the equality Spvq ` Spwq “
Spv ` wq prevents the sum Spvq ` Spwq from being equal to 2. But this is precisely the value
reached by the sum when v ą 0 and w ą 0. This proves “ð”.

The equivalence (4.59) suggests us to impose

v ě 0, w ě 0, θν pvq ` θν pwq “ θν pv ` wq (4.60)

for ν ą 0, as a smooth approximation of (4.55). But this time, the approximation turns out to
be exact, as demonstrated by the following Proposition.

Proposition 4.3. For all ν ą 0 and for all v, w ě 0, we have

θν pvq ` θν pwq ě θν pv ` wq. (4.61)

Equality holds if and only if vw “ 0.

Chứng minh. By the concavity of θν which follows from that of θ, we have

θν pγtq “ θν pγt ` p1 ´ γq0q ě γ θν pvq ` p1 ´ γq θν p0q “ γ θν ptq (4.62)

for all γ P r0, 1s and t P R` , with equality if and only if γ P t0, 1u or t “ 0. If v “ w “ 0,


inequality (4.61) is obvious, since θν p0q “ 0. Assume that at least one of the two quantities v, w
is positive, so that v ` w ą 0. Then, owing to (4.62),
´ v ¯ ´ w ¯
θν pvq ` θν pwq “ θν pv ` wq ` θν pv ` wq
v`w v`w
v w
ě θν pv ` wq ` θν pv ` wq
v`w v`w
“ θν pv ` wq.

Equality holds if and and only if v “ 0 or w “ 0. This completes the proof.


124 Chapter 4. Existing methods for sytems with complementarity conditions

The exactness of the sum-to-theta smoothing (4.60) looks attractive at first sight. A close
inspection reveals, however, that this comes at the price of a singularity at pv, wq “ p0, 0q.
Indeed, let
ψν pv, wq “ θν pvq ` θν pwq ´ θν pv ` wq.
Then, ∇ψν p0, 0q “ p0, 0q, where the gradient is taken with respect to v, w. This phenomenon
is similar to what was already pointed out for the Mangasarian C-function in §4.1.2. Let us
contemplate the impact of this “sum-to-theta” approach on the examples (4.54).

1. For the rational family (4.54a), we have the equivalence

θν1 pvq ` θν1 pwq “ θν1 pv ` wq ô vwpv ` w ` 2νq “ 0, (4.63)

which follows from a simple but tedious calculation. The latter condition is also equivalent
to the exact condition vw “ 0.

2. For the exponential family (4.54b), we have the remarkable equivalence

θν2 pvq ` θν2 pwq “ θν2 pv ` wq ô r1 ´ expp´v{νqsr1 ´ expp´w{νqs “ 0, (4.64)

as can be shown by a factorization procedure. From the latter, we can see the exactness
of the smoothing in this particular case.

4.3.2.3 Integration into the system of equations


The “sum-to-theta” smoothing approach will not be used in this thesis due to this singularity.
Restricting ourselves to the “sum-to-one” approximation, we consider the family tFrp¨, νq, ν ą 0u,
where „ 
ΛpXq
FrpX , νq “ (4.65)
ν pθν pGpXqq ` θν pHpXqq ´ 1q
is a regularized function of F defined in (4.23). Here, it is understood that θν operates compo-
nentwise on GpXq and HpXq, while 1 P Rm is the vector whose entries are all equal to 1. It is
highly recommended that the smoothed complementarity equations in (4.65) be premultiplied
by ν, so as to control the magnitude of their partial derivatives. Indeed, for all t ě 0,
ˆ ˙
1 1 1 t
θν ptq “ θ
ν ν

can be seen to blow up when ν Ó 0, while νθν1 ptq tends to the finite limit θ1 p0q.

4.3.3 Standard and modified interior-point methods


The general philosophy of smoothing, presented at the beginning of §4.3, also lies at the heart of
an important category of algorithms for constrainted optimization called interior-point methods.
Despite some pioneering work in 1967 by Dikin [43], which remained unknown for a long time,
the field really took off in 1984 with the publication by Karmakar [67] of an algorithm with
polynomial-time complexity for linear programming, capable of outperforming even the simplex
method. For a historical review of interior-point methods, see [54, 118].
Karmakar’s algorithm is primal, i.e., it is crafted only in terms of primal variables, without
any reference to the dual problem. It was not long before theoreticians realized the power and
4.3. Smoothing methods for nonsmooth equations 125

the superiority of primal-dual methods [119], in which the primal variables (original unknowns)
and the dual ones (Lagrange multipliers) are put on an equal footing. A primal-dual method
is then none other than a “clever” way to solve the system of equations made up by the KKT
optimality conditions of the minimization problem. The idea is therefore natural to draw inspira-
tion from existing primal-dual methods in order to solve nonlinear algebraic systems containing
complementarity equations that do not necessarily come from any minimization problem.

4.3.3.1 General principle


Let us consider the family of regularized problems

ΛpXq “ 0, (4.66a)
GpXq d HpXq “ ν1, (4.66b)

where ν ě 0 is the smoothing parameter, 1 P Rm is the vector whose components are all equal
to 1, and d denotes Hadamard’s componentwise product. System (4.66) takes the abstract form

FrpX; νq “ 0, (4.67a)
with „ 
ΛpXq
FrpX; νq “ P R` . (4.67b)
GpXq d HpXq ´ ν1
Equation (4.66b), which can be explicitly written as

Gα pXqHα pXq “ ν, @α P t1, . . . , mu,

means that we are using the same parameter ν for all the complementarity equations. This
common practice corresponds to what is known as the central path in the theory of interior-
point methods. In considering (4.66), we have somehow “forgotten” the positivity conditions

GpXq ě 0, HpXq ě 0.

In reality, these conditions will be specifically taken into account in the algorithm. We will go
back to this later.
To unfold the mechanism of interior-point methods to our system, it is more convenient to
reformulate system (4.66) as

ΛpXq “ 0, (4.68a)
GpXq ´ V “ 0, (4.68b)
HpXq ´ W “ 0, (4.68c)
V d W “ ν1, (4.68d)

where pV, W q P Rm ˆ Rm are called slack variables. These are of course subject to the compo-
nentwise positivity conditions
V ě 0, W ě 0, (4.69)
which must be constantly “remembered” during the algorithm. System (4.68) can be given the
abstract form
FpX ; νq “ 0, (4.70a)
126 Chapter 4. Existing methods for sytems with complementarity conditions

where
» fi
» fi ΛpXq
X — GpXq ´ V ffi
X “ – V fl P D ˆ Rm ˆ Rm Ă R``2m , FpX ; νq “ —
– HpXq ´ W fl P R
ffi ``2m
. (4.70b)
W
V d W ´ ν1

Enlarging the size of the system and the number of unknowns does not change the determinant
of the Jacobian matrix at the corresponding solution. Let us formally state this result, since it
will be useful later. Due to definitions (4.67b) and (4.70b), the Jacobian matrices ∇X FrpX; νq
and ∇X FpX; νq do not depend on ν. For short, they will be denoted by ∇FrpXq and ∇FpXq.

Lemma 4.4. Let X P D and X “ pX, V, W q P D ˆ Rm ˆ Rm such that V “ GpXq and


W “ HpXq. Then,
det ∇FpXq “ det ∇FrpXq. (4.71)
In particular, the two Jacobian matrices are singular or nonsigular at the same time.

Chứng minh. The determinant of the Jacobian matrix of Frp¨; νq is equal to

∇ΛpXq
det ∇FrpXq “ , (4.72)
∇GpXq d HpXq ` ∇HpXq d GpXq

where the Hadamard product ∇GpXq d HpXq between the m ˆ `-matrix ∇GpXq and the m-
vector HpXq is defined as the m ˆ `-matrix whose each column is the Hadamard product of
a column of ∇GpXq and HpXq, and similarly for ∇HpXq d GpXq. The determinant of the
Jacobian matrix of FpX ; νq is equal to

∇ΛpXq 0 0
∇GpXq ´Im 0
det ∇FpXq “ ,
∇HpXq 0 ´Im
0 Im d W Im d V

with the same definition for Im d V and Im d W . By linear combination of the last (block)-row
with the second and third (block)-rows, this can be shown to be equal to

∇ΛpXq 0 0
∇GpXq ´Im 0
det ∇FpXq “ .
∇HpXq 0 ´Im
∇GpXq d W ` ∇HpXq d V 0 0

By means of 2m row permutations, we end up with

∇ΛpXq 0 0
∇GpXq d W ` ∇HpXq d V 0 0 ∇ΛpXq
det ∇FpXq “ “ .
∇GpXq ´Im 0 ∇GpXq d W ` ∇HpXq d V
∇HpXq 0 ´Im

Invoking V “ GpXq, W “ HpXq and comparing with (4.72), we have the desired conclusion.
Note that the Lemma does not require X to be a solution of (4.67).
4.3. Smoothing methods for nonsmooth equations 127

A primal-dual interior-point method strives to generate a sequence tXk “ pX k , V k , W k qukPN


Ă R``2m and an auxiliary sequence tν k ukPN Ă R˚` such that

pX k , V k , W k q Ñ pX,
s GpXq,
s HpXqq,
s ν k Ñ 0,

where X s P D is a zero of F “ Frp¨; 0q. This sequence must satisfy the componentwise strict
positivity condition
V k ą 0, W k ą 0,
for all k ě 0. Another way to express this strict positivity condition is to define the interior
region
I “ X “ pX, V, W q P R``2m | V ą 0, W ą 0 ,
(
(4.73a)
and to require
Xk “ pX k , V k , W k q P I (4.73b)
for all k ě 0. The interest of enforcing these strict bounds is to avoid spurious solutions, which
satisfy FpX, V, W q “ 0 but not V ě 0 and W ě 0. Some interior-point methods require the
iterates to be strictly feasible, that is, pV k , W k q “ pGpX k q, HpX k qq for all k ě 0. We shall not
request feasibility.
To go from current iterate Xk to the next one Xk`1 , primal-dual interior-point methods
modify the Newton algorithm in some judicious way to compute a search direction

dk “ pdX k , dV k , dW k q

as the solution of a linear system of the form

∇FpXk q dk ` tsomething homogeneous to Fu “ 0.

Usually, the full step along this direction is not acceptable, since the corresponding update would
violate (4.73). To circumvent this difficulty, a truncation is performed so that

Xk ` ς k d k P I

for some ς k P p0, 1s, as close to 1 as possible. This operation can also be viewed as a damped
Newton iteration, as in §4.3.1.3 where the purpose was not positivity but global convergence.
We are now going to scrutinize two embodiments of this general principle: a simplistic version
called single-stage method and a highly sophisticated version known as Mehrotra’s predictor-
corrector method. From now on, we use the notation
m
ÿ
xV, W y “ V α Wα (4.74)
α“1

to designate the dot product in Rm .

4.3.3.2 Single-stage interior-point method


We first consider a very simple interior-point method, perhaps the simplest that could possibly
be imagined. It is described in Algorithm 4.5 and consists primarily of one Newton iteration
(Step 3) followed by a truncation (Step 4) and an update for the regularization parameter (Step
6). Let us comment the steps in more details.
128 Chapter 4. Existing methods for sytems with complementarity conditions

Algorithm 4.5 Single-stage interior-point algorithm

1. Choose X0 P I. Set k “ 0, ν 0 “ xV 0 , W 0 y { m, γ “ 0.99.

2. If FpXk ; 0q “ 0, stop.

3. Find a direction dk “ pdX k , dV k , dW k q P R``2m such that

FpXk ; ν k q ` ∇FpXk q dk “ 0. (4.75)

4. Compute ς k P p0, 1q such that Xk ` ς k dk P I by

ς k “ γ ¨ arg max ς P r0, 1s | V k ` ς dV k ě 0, W k ` ς dW k ě 0 .


(
(4.76)

5. Set Xk`1 “ Xk ` ς k dk .

6. Set ν k`1 “ one of the heuristic strategies (4.77).

7. Set k Ð k ` 1. Go to step 2.

The name of the method comes from the fact that there is only one linear system to be
solved at each iteration. This single Newton iteration (4.75), in Step 3, is aimed at finding an
approximate solution to FpX ; ν k q “ 0, starting from Xk . The full Newton step dk is truncated in
Step 4, where we look for the largest possible reduction factor ς k in the interval p0, 1q. The initial
value ν 0 of the regularization parameter, set to xV 0 , W 0 y { m, has the flavor of centrality. But
this will be soon forgotten in the course of the iterations, where ν k is no longer required to be
xV k , W k y { m. Instead, the parameter ν k “lives its own life” according to an a priori procedure.
Below are a few common heuristic ways to progressively drive ν k to 0:

• A geometric sequence
ν k`1 “ 0.5 ν k , (4.77a)
the advantage of which is to go slowly to zero, which is useful when ν k is still large;

• A power sequence
ν k`1 “ pν k q2 , (4.77b)
the advantage of which is to go quickly to zero, which is useful when ν k is already small;

• A hybrid geometric-power sequence

ν k`1 “ min 0.5 ν k , pν k q2 ,


` ˘
(4.77c)

which combines the advantages of the first two strategies.

• A hybrid geometric-power sequence compared to a duality measure

ν k`1 “ min 0.5 ν k , pν k q2 , xV k`1 , W k`1 y { m ,


` ˘
(4.77d)

the interest of which is to reconnect the sequence to some current “reality” [56, §5].
4.3. Smoothing methods for nonsmooth equations 129

Unfortunately, there is no universal magic formula to monitor the sequence of regularization


parameter tν k u. A heuristic strategy that works fine with one problem may fail miserably with
another. We have to try several sequences tν k u before knowing which one is best suited to the
problem at hand. This seems to be the Achilles heel of such smoothing methods, for which we
will propose a novel approach in chapter §5.

4.3.3.3 Mehrotra’s predictor–corrector method


Most of today’s interior-point general-purpose softwares for linear programming are based on
Mehrotra’s predictor-corrector algorithm [88]. In Algorithm 4.6, we have extended it to our
equation-solving problem. Unlike the previous single-stage method, each iteration of Mehrotra’s
method consists of two stages, namely, the prediction stage (from Step 3 to Step 7) and the
correction stage (from Step 8 to Step 11). In each stage, there is a linear system to be solved.
Nevertheless, the two linear systems (4.78) and (4.80) share the same matrix, which allows for
some cost-savings by means of factorization.
Mehrotra’s original algorithm for linear programming combines several key ingredients that
had been separately suggested and implemented by other authors before [119, §10]. But the
subtle order in which these ingredients are assembled and organized, as well as some ingenious
heuristics of his own for the adaptive centering parameter and the step lengths, are the real
assets that have contributed to its outstanding success. These ingredients are still present in the
extended version. Let us comment on Algorithm 4.6 step-by-step.

Prediction stage. The algorithm starts by computing an affine-scaling direction dkaff . By


“affine-scaling,” it is meant that we leave the current parameter ν k aside and set our sights
on the ultimate goal ν “ 0 right away. This accounts for equation (4.78) in Step 3, which is
the first-order linearization of FpXk ` dkaff ; 0q “ 0 around Xk . We recall that here the Jacobian
matrix ∇FpXk q does not depend on ν and thus can be viewed as being located at ν “ 0. After
truncation in Step 4, we need to assess the payback of this audacious attempt. This is done in
Step 5 and Step 6, where we compute the centrality measure νaff k of the state Xk . The prediction
aff
stage culminates in Step 7, where we compute Mehrotra’s ratio
ˆ k ˙3
k νaff
σ “ . (4.82)
νk
This heuristic ratio, called adaptive centering factor and found by trial and error on a wide
range of problems, has proved its remarkable effectiveness. It is a special feature of Mehrotra’s
algorithm. A value σ k ! 1 means that our ambitious affine-scaling venture has been rewarded
with success. The predicted state is significantly closer to the boundary than at the beginning
of the iteration. A value σ k " 1 implies that we took too many risks and the odds have been
against us. In the former case, we must follow the predictor’s advice by reducing ν significantly.
In the latter case, we must return inside the interior region in hope for a better update at the
next iteration.

Correction stage. Thanks to the centering factor (4.82), the second stage can deal with both
cases in a “unified” fashion, by simply targeting σ k ν k as the new parameter value at which an
approximate zero of F must be searched for. Indeed, equation (4.80) in Step 8 can be seen as a
local model for FpXk ` dkcor ; σ k ν k q around Xk . In spite of appearances, this local model is not
quite linear. In fact, it is quadratic but in a special way. For one, the second-order terms are
130 Chapter 4. Existing methods for sytems with complementarity conditions

Algorithm 4.6 Mehrotra predictor–corrector algorithm

1. Choose X0 P I. Set k “ 0, ν 0 “ xV 0 , W 0 y { m, γ “ 0.99.

2. If FpXk ; 0q “ 0, stop.

3. Find a direction dkaff “ pdXaff


k , dV k , dW k q P R``2m such that
aff aff

FpXk ; 0q ` ∇FpXk q dkaff “ 0. (4.78)

k P p0, 1q such that Xk ` ς k dk P I by


4. Compute ςaff aff aff

k
“ γ ¨ arg max ς P r0, 1s | V k ` ς dVaff
k
ě 0, W k ` ς dWaff
k
(
ςaff ě0 . (4.79)

5. Set Xkaff “ Xk ` ςaff


k dk .
aff
k “ xV k , W k y { m.
6. Set νaff aff aff

7. Set σ k “ pνaff
k { ν k q3 .

8. Find a direction dkcor P R``2m such that


» fi
0
— 0 ffi
FpXk ; σ k ν k q ` — ffi ` ∇FpXk q dkcor “ 0. (4.80)
– 0 fl
k k
dVaff d dWaff

k P p0, 1q such that Xk ` ς k dk P I by


9. Compute ςcor cor cor

k
“ γ ¨ arg max ς P r0, 1s | V k ` ς dVcor
k
ě 0, W k ` ς dWcor
k
(
ςcor ě0 . (4.81)

10. Set Xk`1 “ Xk ` ςcor


k dk .
cor

11. Set ν k`1 “ xV k`1 , W k`1 y { m.

12. Set k Ð k ` 1. Go to step 2.


4.4. What may go wrong? 131

present only for the last block of equations containing V d W . For another, the corresponding
increments dV k and dW k have been “freezed” at the predicted affine-scaling values, instead of
being considered as unknowns, which would have given rise to an intricate quadratic equation
with respect to the direction. Anyhow, Mehrotra’s algorithm demonstrates an effort to take
into account curvature information in order to speed up convergence. To our knowledge, there
is no theoretical results on the exact rate of convergence and on the polynomial complexity
of Mehrotra’s algorithm for linear programming, although such results are available for some
variants [123, 124], the analysis of which is easier.
In Mehrotra’s algorithm, the regularization parameter ν k is always equal the duality measure
xV k , W k y{m. Paradoxically, it never appears as the target of the linearized Newton iterations:
the predictor sets out to achieve ν “ 0, while the corrector aims to reach ν “ σ k ν k . Finally, it
is worth noticing that
» fi » fi » fi
0 0 0
— 0 ffi — 0 ffi — 0 ffi
FpXk ; σ k ν k q ` — ffi “ FpXk ; 0q ` — ffi ` — ffi ,
– 0 fl – 0 fl – 0 fl
k k
dVaff d dWaff k k
´σ ν 1 k k
dVaff d dWaff

so that the direction dkcor can be regarded as the aggregation of three increments, namely,

dkcor “ dkaff ` dkcen ` dkqua , (4.83)

where dkaff is the affine-scaling direction (4.78), dkaff is the centering direction defined by
» fi
0

— 0 ffi
ffi ` ∇FpXk q dkcen “ 0,
– 0 fl
´σ k ν k 1

and dkqua is the quadratic correction defined by


» fi
0

— 0 ffi
ffi ` ∇FpXk q dkqua “ 0.
– 0 fl
k k
dVaff d dWaff
k “ ς k “ 1, then the final state
Therefore, if no damping occurred, that is, if ςaff cor

Xk`1 “ Xkaff ` pdkcen ` dkqua q,

could be thought of as a correction brought to the predicted state Xkaff . This justifies the name
of the second stage. For linear programming, Mehrotra’s algorithm can also be insightfully
reinterpreted as a perturbed composite damped Newton method [113].

4.4 What may go wrong?


The numerical methods described so far all “look good” on the paper. To gain insight into the
actual difficulties at the practical level, let us run them on the toy model

u ` τ q ´ u5 “ 0, (4.84a)
132 Chapter 4. Existing methods for sytems with complementarity conditions

minp1 ´ q, u2 ´ qq “ 0 (4.84b)

in the unknown X “ pu, qq P R2 . Here, pu5 , τ q P R˚` ˆ R˚` are the parameters of the problem.
System (4.84) comes from the Euler implicit discretization of the ordinary differential equation
du
“ ´q, q “ minp1, u2 q,
dt
using τ ą 0 as the time-step and u5 as the current state. This system is an extremely reduced
model for stratigraphy4 . More on the above continuous model will be said in §6.1.1.
System (4.84) is the model of interest to us. It is made up of a linear equation (4.84a), i.e.,
` ´ m “ 1, and a nonlinear complementarity equation (4.84b), i.e., m “ 1. We will use (4.84) as
a benchmark test for various numerical methods, insofar as we know its solution.
Theorem 4.11. For all pu5 , τ q P R˚` ˆR˚` , system (4.84) has a unique solution pu, qq P R˚` ˆR˚` ,
called reference solution and given by
$

& pu5 ´ τ, 1q if τ ď u5 ´ 1
pu, qq “
ˆ
4u 2 ˙
(4.85)
2u
’ ? 5 , ? 5 otherwise.
1 ` 1 ` 4τ u5 p1 ` 1 ` 4τ u5 q2
%

If τ ă u5 ` 1, then pu, gq is also the unique solution of (4.84) over R2 . If τ ě u5 ` 1, then system
(4.84) has two other solutions with negative values for u.
Chứng minh. It is more convenient to carry out the analysis for the scalar equation ϕpuq “ 0,
where the graph of the continuous function

ϕpuq “ u ` τ minpu2 , 1q ´ u5

consists of three parts. Over p´8, ´1s and r1, `8q, it coincides with two half-lines belonging to
the straight line ϕ “ u ` τ ´ u5 . Over r´1, 1s, it coincides with an arc of the convex parabola
ϕ “ u ` τ u2 ´ u5 . This arc always lie below the segment ϕ “ u ` τ ´ u5 . Moreover,

ϕp´1q “ ´1 ` τ ´ u5 , ϕp0q “ ´u5 , ϕp1q “ 1 ` τ ´ u5 .

It then appears that:


1. If ϕp1q ď 0, i.e., τ ď u5 ´ 1, there is a unique solution over R which is given by the
intersection of the right half-line and the axis of abscissae. This solution is in the saturated
regime pq “ 1q, given by u ` τ ´ u5 “ 0.
2. If ϕp1q ą 0, since ϕp0q ă 0 and because ϕ1 puq “ 1 ` 2τ u ą 0 over r0, 1s, there is only
one u P p0, 1q for which ϕpuq “ 0. By solving the quadratic equation τ u2 ` u ´ u5 “ 0
and by choosing the positive root, we end up with the unsaturated solution u “ 2u5 {p1 `
?
1 ` 4τ u5 q, q “ u2 . But there are two subcases to be discussed.
(a) If ϕp´1q ă 0, i.e., τ ă u5 ` 1, there is obviously no other root over R.
(b) If ϕp´1q ě 0, i.e., τ ě u5 `1, then there are two spurious roots, one saturated solution
in p´8, ´1s and one unsaturated solution in r´1, 0q.
This completes the proof.

4
a branch of geology concerned with the study of sedimentary rock layers (strata) and layering (stratification)
4.4. What may go wrong? 133

Figure 4.3: Analysis of solutions for the stratigraphic system (4.84).

4.4.1 Issues with nonsmooth methods


The existence of non-physical solutions when the time-step is large enough pτ ě u5 `1q may cause
an iterative solver to converge toward a wrong solution. This indeed occurs to the Newton-min
method. Let „  „ 
u 2 u ` τ q ´ u5
X“ PR , F “ ,
q minp1 ´ q, u2 ´ qq
so that system (4.84) reads F pXq “ 0. Let us apply the Newton-min method described in the
previous chapter, using the initial point
„ 
0 u5
X “ (4.86)
minp1, u25 q

This initial point is the most “natural" one, insofar as u5 represents the value of u at the previous
discrete time. Thanks to the extreme simplicity of the model, it is possible to predict the behavior
of this Newton-min algorithm. The following statement should be read in conjunction with Figure
4.4.

Theorem 4.12. Let pu5 , τ q P R˚` ˆ R˚` . The Newton-min method applied to system (4.84) using
the starting point (4.86)

• converges to the reference solution X


s “ pu, gq if and only if u5 ď 1 or u5 ě τ ` 1 ´ 1{τ ;

• exhibits a cyclic behavior, namely, oscillates between two iterates, if and only if u5 ą
maxp1; τ ´ 1q and u5 ă τ ` 1 ´ 1{τ ;

• converges to a wrong solution if and only if u5 ą 1 and u5 ď τ ´ 1.

Chứng minh. The basic idea is to do the Newton iterations by hands. See Hamani [58] for more
details.
134 Chapter 4. Existing methods for sytems with complementarity conditions

Figure 4.4: Behavior of the Newton-min algorithm for (4.84) with starting point (4.86). Yellow:
convergence toward the correct solution; blue: periodic oscillation between two iterates; red:
convergence toward a wrong solution.

4.4.2 Issues with smoothing methods


When working with smoothing methods, the issue may occur when we update the values of
variables for the next iteration. In the single-stage interior-point Algorithm 4.5, this is in Step
4 where we compute ς k . In the Mehrotra predictor–corrector Algorithm 4.6, this is in Step 9
where we compute ςcor k . Similarly, with θ-smoothing techniques, we also need all variables of

θ-functions to remain nonnegative during iterations. We will also use stratigraphic model as an
illustration.
At the k-th iteration, we obtain ∆uk , ∆q k and we need to find ς P r0, 1s such that uk`1 “
u ` ς∆uk and q k`1 “ q k ` ς∆q k satisfy
k

1 ´ q k`1 ě 0,
puk`1 q2 ´ q k`1 ě 0.
Rewriting these conditions in terms of the current iterates at k, we have
1 ´ q k ´ ς∆q k ě 0,
p∆uk q2 ς 2 ` p2uk ∆uk ´ ∆q k qς ` puk q2 ´ q k ě 0.
We analyze the second inequality as a quadratic inequation with respect to ς. In the neighbor-
dhood of a solution (but the iterations have not finished yet), puk q2 ´ q k may be very small or
even zero. Hence, the quadratic inequality becomes
p∆uk q2 ς 2 ` p2uk ∆uk ´ ∆q k qς ě 0.
Unfortunately, in some cases,
´p2uk ∆uk ´ ∆q k q
ą 1.
p∆uk q2
4.4. What may go wrong? 135

Therefore, the unique solution we obtain is ς “ 0. This means that values of u and q do not
change from this iteration, even though we are close to a solution. Another difficulty coming
from the single-stage interior-point algorithm is that it is not easy to find a good strategy to
define values of ν k during iterations.

-1 1

0.9
-2
0.8

0.7
-3
0.6
log10 error

-4 0.5

0.4
-5
0.3

0.2
-6
0.1

-7 0
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
Iteration Iteration

(a) Errors during iterations (b) ς during iterations

Figure 4.5: Stratigraphy model, Predictor-Corrector Mehrotra, u5 “ 0.9, τ “ 0.1, u0 “ 0.54, g0 “


0.07.

The smoothing methods require all the terms of complementarity equations positive during
all iterations. However, it may make the algorithm stay at a point without progress. From these
disadvantages, we believe a new approach could be one that does not require positivity on the
arguments of complementarity equations during the iterations, but still ensures positivity at the
end, when the algorithm converges.
136 Chapter 4. Existing methods for sytems with complementarity conditions
Chapter 5

A new nonparametric interior-point


method
Contents
5.1 Design principle and properties of NPIPM . . . . . . . . . . . . . . . 138
5.1.1 When the parameter becomes a variable . . . . . . . . . . . . . . . . . . 138
5.1.2 Global convergence analysis . . . . . . . . . . . . . . . . . . . . . . . . . 141
5.2 Regularity of zeros for the two-phase multicomponent model . . . . 145
5.2.1 A general proof for strictly convex laws . . . . . . . . . . . . . . . . . . 146
5.2.2 A special proof for Henry’s law . . . . . . . . . . . . . . . . . . . . . . . 153

Les difficultés numériques signalées à la fin du chapitre précédent, ainsi que celles qui seront exposées en
détails au chapitre suivant, indiquent que la généralisation à nos problèmes des méthodes existantes pour
l’optimisation et pour les problèmes de complémentarité purs ne débouche pas nécessairement sur une
méthode de résolution adaptée. Nous avons toutefois pu constater une relative supériorité des méthodes
de points intérieurs du point de vue de la robustesse et souhaitons poursuivre dans cette voie.
L’absence d’une stratégie systématique pour piloter le paramètre de régularisation étant la principale
faiblesse des méthodes de points intérieurs, nous avons entrepris de chercher une manière plus automa-
tique de faire tendre ce paramètre vers zéro, laquelle préserverait les avantages des méthodes par points
intérieurs sans en subir les inconvénients. La section §5.1 est consacrée à notre nouvelle méthode, appelée
nonparametric interior-point method (NPIPM). L’idée clé est de traiter le paramètre de régularisation
comme une inconnue à part entière en introduisant une nouvelle équation dans le système. On est ainsi
ramené à l’application de la méthode de Newton lisse à un problème lisse, ce qui permet de dérouler une
analyse de convergence locale et globale reposant sur la régularité du zéro en question.
La régularité, c’est-à-dire la non-singularité de la matrice jacobienne évaluée en un point solution,
devient ainsi un critère essentiel pour le bon fonctionnement de la nouvelle méthode. Nous la vérifions
en §5.2 sur le modèle diphasique compositionnel introduit dans la première partie. Par un enchaı̂nement
de calculs non-triviaux, notre montrons que sous l’hypothèse de stricte convexité des fonctions d’énergie
molaire de Gibbs, la solution est régulière dès qu’elle n’est ni transitionnelle ni azéotropique.

137
138 Chapter 5. A new nonparametric interior-point method

The numerical issues mentioned at the end of the previous chapter, as well as those that will
be illustrated in the next chapter, show that the existing methods are not well suited to our
problems. For the models considered in our numerical tests, however, the interior-point methods
turned out to be far more robust than the others, at least when the sequence of regularization
parameters is properly adjusted. We also said that the lack of a systematic strategy to steer this
sequence toward zero is the main weakness of interior-point methods. Therefore, we undertook
to look for a more automatic way to decrease this parameter, which preserves the advantages of
interior-point methods without suffering from their drawbacks.
Section §5.1 is devoted to our new method, called the nonparametric interior-point method
(NPIPM). The key idea is to treat the regularization parameter as a full-fledged unknown by
introducing a new equation into the system. We are thus brought back to applying the smooth
Newton method to a smooth problem, which allows for local and global convergence analysis
based on the regularity of the zero at hand. In section §5.2, we verify the regularity condition
on the zeros of the two-phase multicomponent model introduced in Part I.

5.1 Design principle and properties of NPIPM


We recall that the interior-point methods considered in §4.3.3 have replaced the original nons-
mooth problem (4.1) by a sequence of regularized problems

FpX ; νq “ 0, (5.1a)

where
» fi
» fi ΛpXq
X — GpXq ´ V ffi
X “ V fl P D ˆ Rm ˆ Rm Ă R``2m ,
– FpX ; νq “ —
– HpXq ´ W fl P R
ffi ``2m
, (5.1b)
W
V d W ´ ν1

where ν ě 0 is the smoothing parameter, 1 P Rm is the vector whose components are all equal
to 1 and pV, W q P Rm ˆ Rm are the slack variables, subject to

V ě 0, W ě 0. (5.1c)

5.1.1 When the parameter becomes a variable


In system (5.1), the status of the parameter ν is very distinct from that of the variable X.
While X is computed “automatically” by a Newton iteration, ν has to be updated “manually”
in an ad hoc manner. On two occasions, we witnessed that progress occurs when two objects
of ostensibly different natures are put on an equal footing and given a unified treatment: the
present and absent phases in the phase equilibrium problem (chapter §2), the primal and dual
variables in interior-point methods (chapter §4). From this experience, we feel that it would be
judicious to incorporate the parameter ν into the variables X.

5.1.1.1 Enlarged equivalent systems


Let us therefore consider the enlarged vector of unknowns
„ 
X “ Xν P D ˆ Rm ˆ Rm ˆ R` Ă R``2m`1 , (5.2)
5.1. Design principle and properties of NPIPM 139

and let us try to find a system of ` ` 2m ` 1 equations

F pX q “ 0 (5.3)

to be prescribed on X . To this end, let us remind ourselves that our ultimate goal is to solve
FpX, 0q “ 0, together with the inequalities (5.1c). Thus, it is really natural to first consider
„ 
F pX q “ FpX ; νq
ν
. (5.4)

This construction turns out to be too naive. Indeed, if we start from some ν 0 ą 0 and solve the
smooth system (5.3)–(5.4) by the smooth Newton method, since the last equation is linear, we
end up with ν 1 “ 0 at the first iteration. Once the boundary of the interior region is reached,
we are “stuck” there.
To prevent ν from rushing to zero in just one iteration, we could set
„ 
F pX q “ ν 2 ,
FpX ; νq
(5.5)

which is equivalent at the continuous level. At the level of Newton iterates, there is still a
deficiency: since ν “ 0 is now a double root of the last equation, quadratic convergence will be
lost when ν k approaches 0! A remedy to this is to add a small linear term, that is,
„ 
F pX q “ ην ` ν 2 ,
FpX ; νq
(5.6)

where η ą 0 is a small parameter. The price to be paid for recovering quadratic convergence
is that there is now a spurious negative solution ν “ ´η ă 0. This should not be a problem,
however, if we start from a positive value for ν.
At this stage, system (5.6) is not yet fully adequate. Indeed, the last equation is totally
decoupled from the others. Everything happens as if ν follows a prefixed sequence, generated by
the Newton iterates of the scalar equation ην ` ν 2 “ 0, regardless of X. It is desirable to couple
ν and X in a tighter way. In this respect, we advocate
„ 
F pX q “ 1 kV ´ k2 ` 1 kW ´ k2 ` ην ` ν 2 ,
FpX ; νq
(5.7a)
2 2

where
m
ÿ m
ÿ
kV ´ k2 “ pminpVα , 0qq2 , kW ´ k2 “ pminpWα , 0qq2 . (5.7b)
α“1 α“1

This choice has the benefit of taking into account the nonnegativity condition (5.1c). Indeed,
the last equation of (5.7a) implies that, as long as ν ě 0, we are ascertained that V ´ “ W ´ “ 0.
This amounts to saying that V ě 0 and W ě 0. Should a component of V or W become negative
during the iteration, this equation would contribute to “penalize” it.

5.1.1.2 Globalized algorithm


From now on, the enlarged equations (5.7) are selected as the reference system in the design
of our new algorithm. The idea is simply to apply the standard Newton method to the smooth
system (5.3), (5.7). To enforce a globally convergent behavior, we also recommend using Armijo’s
140 Chapter 5. A new nonparametric interior-point method

line search, as in Algorithm 4.4. Before writing down the new algorithm, let us investigate the
new Jacobian matrix.
We saw in §4.3.3.1 that ∇X FpX ; νq, the Jacobian matrix of F with respect to X, does not
depend on ν and can be denoted by ∇FpXq. It is useful to decompose it in (block)-columns as
“ ‰
∇FpXq “ ∇X FpXq ∇V FpXq ∇W FpXq .

Since ν is now considered as a variable, it makes sense to define the partial derivatives Bν FpXq.
From (5.1), we deduce that » fi
0
— 0 ffi ``2m
Bν FpXq “ —
– 0 fl P R
ffi

´1
does not depend on X and therefore can be safely written as Bν F. On the other hand, the scalar
function x ÞÑ 21 | minpx, 0q|2 is differentiable and its derivative is equal to minpx, 0q. From this
observation, it follows that
„ 
∇F pX q “
∇X FpXq ∇V FpXq ∇W FpXq Bν F
(5.8)
0 pV ´ qT pW ´ qT η ` 2ν

where V ´ is the vector of components Vα´ “ minpVα , 0q and similarly for W ´ . Below is a result
about this Jacobian matrix, which is in the same vein as Lemma 4.4 and which will be useful
for later purposes.
Lemma 5.1. Let X P I, where I is the interior region defined in (4.73). Let ν P R and
X “ rXT ; νsT . Then,
det ∇F pX q “ pη ` 2νq det ∇FpXq. (5.9)
If ν ą ´η{2, the two Jacobian matrices are singular or nonsigular at the same time.
Chứng minh. Thanks to the assumption X P I, we have V ě 0 and W ě 0, so that V ´ “ W ´ “
0. Expanding the determinant of (5.8) with respect to the last row yields the desired result. Note
that the Lemma does not require pX ; νq to solve (5.1a)–(5.1b) or X to solve (5.3), (5.7).

Introduce the least-squares potential

ΘpX q “ kF pX qk2 .
1
2
A detailed description of NPIPM is given in Algorithm 5.1. A few comments are in order:
• The initial point X 0 “ pX0 , ν 0 q must be an interior point, namely, X0 P I. Furthermore,
it is often taken at equilibrium, that is, V 0 “ GpX 0 q and W 0 “ HpX 0 q, so that the initial
parameter ν 0 “ xV 0 , W 0 y{m has the correct order of magnitude.
• If Xk P I, then pV k q´ “ pW k q´ “ 0 and
„ k ´1 „
∇FpXk q ´Bν F FpXk ; ν k q
„ 
d “ dν k “ ´ 0
k dX
η ` 2ν k ην k ` pν k q2
provided that the Jacobian matrix is invertible. The increment for the parameter is then
ην k ` pν k q2
dν k “ ´ .
η ` 2ν k
5.1. Design principle and properties of NPIPM 141

Algorithm 5.1 Nonparametric interior point algorithm with Armijo line search

1. Choose X 0 “ pX0 , ν 0 q, X0 P I, ν 0 “ xV 0 , W 0 y{m, κ P p0, 1{2q, % P p0, 1q. Set k “ 0.

2. If F pX k q “ 0, stop.
3. Find a direction d k P R``2m`1 such that

F pX k q ` ∇F pX k qdk “ 0. (5.10)

4. Choose ς k “ %jk P p0, 1q, where jk P N is the smallest integer such that

ΘpX k ` %jk d k q ď p1 ´ 2κ%jk q ΘpX k q. (5.11)

5. Set X k`1 “ X k ` ς k dk and k Ð k ` 1. Go to step 2.

• There is no need to truncate the Newton direction d k to preserve positivity for V k`1 and
W k`1 , since nonnegativity is “guaranteed” at convergence. However, if we wish all the
iterates to belong to the interior region I, then we are free to carry out an additional
damping after Step 4 (Armijo’s line search).
A final remark concerns the qualification of the method as nonparametric. It can be rightly
objected that the method still involves a small positive parameter η. Nevertheless, this parameter
is chosen once and for all and does not need to be driven to zero. It is in this sense that the
term nonparametric is to be understood.

5.1.2 Global convergence analysis


The main interest of Algorithm 5.1 lies in the prospect of global convergence, as envisioned by
the theory that we are developing now. This global convergence theory, due to Bonnans [21, §6],
is primarily based on the regularity of zeros [Definition 4.10], an assumption that we will be
able to check for each model under consideration. We reproduce most of Bonnans’ theory here,
in view of its importance to our algorithm.
We first need to define the continuity modulus of a function and some useful lemmas. We
denote cF the continuity modulus of F at X s defined by

cF pγq :“ sup kF pX q ´ F pX
s qk, (5.12)
kX ´X
s kďγ

and c∇F , c∇F ´1 are defined similarly. The first Lemma establishes that near a regular zero X
s,
the quantities kF pX qk and kX ´ X s k are of the same order.

Lemma 5.2 (Lemma 6.5, [21]). Let X s be a regular zero of F and assume that cF pγq is well-
defined. There exist γ1 ą 0, c1 ą 0 and c2 ą 0 such that

cF pγq ď c1 γ, (5.13a)
kX ´X s k ď c2 kF pX qk, (5.13b)

for all X satisfying kX ´ X


s k ď γ ď γ1 .
142 Chapter 5. A new nonparametric interior-point method

Chứng minh. We consider all γ1 ą 0 such that c∇F pγ1 q ă k∇F pX


s q´1 k´1 . Let X such that
kX ´ X
s k ď γ ď γ1 . Since F pX
s q “ 0, then
ż1
F pX q “ F pX q ´ F pXs q “ ∇F pX
s ` tpX ´ X
s qqpX ´ X
s q dt,
0

and
kF pX qk ď sup k∇F pX
s ` tpX ´ X
s qqkkX ´ X
sk
tPr0,1s

Let t P r0, 1s and Xt “ Xs ` tpX ´ Xs q, then


kXt ´ X
s k “ ktpX ´ X
s qk “ tkX ´ X
s k ď γ1 .

This means that

k∇F pXt qk ´ k∇F pX


s qk ď k∇F pXt q ´ ∇F pX
s qk ď c∇F pγ1 q,

or
k∇F pXt qk ď k∇F pX
s qk ` c∇F pγ1 q for all t P r0, 1s .

So, we have
sup k∇F pX
s ` tpX ´ X
s qqk ď k∇F pX
s qk ` c∇F pγ1 q
tPr0,1s

and then
F pX q ď k∇F pXs qk ` c∇F pγ1 q γ.
` ˘
(5.14)
Thus, (5.13a) holds with c1 :“ k∇F pXs qk ` c∇F pγ1 q. To prove (5.13b), we start from
ż1
F pX q “ ∇F pXs qpX ´ Xs q ` ∇F pX
s ` tpX ´ X
s qq ´ ∇F pX
s q pX ´ X
“ ‰
s q dt. (5.15)
0

Hence,
kF pX qk ě k∇F pX
s qpX ´ X
s qk ´ c∇F pγ1 qkX ´ X
s k. (5.16)
We also have

kX ´ X
s k “ k∇F pX
s q´1 ∇F pX
s qpX ´ X
s qk ď k∇F pX
s q´1 kk∇F pX
s qpX ´ X
s qk. (5.17)

Combining (5.16) and (5.17), we get

kF pX qk ě rk∇F pX
s q´1 k´1 ´ c∇F pγ1 qskX ´ X
s k,

so that (5.13b) holds true with

c2 :“ rk∇F pX
s q´1 k´1 ´ c∇F pγ1 qs´1 ą 0,

which completes the proof.

The second Lemma gives an estimation of the distance to a regular zero after a Newton step.
5.1. Design principle and properties of NPIPM 143

Lemma 5.3 (Lemma 6.6, [21]). Let γ1 be constant of by Lemma 5.2. There exist γ2 P p0, γ1 q, c3 ą
0, c4 ą 0 and c5 ą 0 such that

kdpX qk ď c3 γ, (5.18a)
kX ` dpX q ´ X
s k ď c4 c∇F pc5 γqγ, (5.18b)

for all X satisfying kX ´ X


s k “ γ ď γ2 .

Chứng minh. Let γ2 P p0, γ1 q such that c∇F ´1 pγ2 q ď 1. Owing to (5.13a),

kdpX qk ď k∇F pX q´1 kkF pX qk ď rk∇F pX


s q´1 k ` c∇F ´1 pγqsc1 γ. (5.19)

In other words, we obtain (5.18a) with

c3 :“ c1 rk∇F pX
s q´1 k ` c∇F ´1 pγ2 qs.

Defining c5 :“ c3 ` 1, we have the upper-bound

kX ` d pX q ´ X
s k ď kX ´ X
s k ` kd pX qk ď c5 kX ´ X
s k. (5.20)

As dpX q is the Newton direction of F at X , we can write


ż1
F pX ` dpX qq “ F pX q ` ∇F pX ` td pX qqd pX q dt
0
ż1
“ r∇F pX ` td pX qq ´ ∇F pX qs d pX q dt,
0

from which we infer that

kF pX ` d pX qqk ď sup k∇F pX ` td pX qq ´ ∇F pX qkkd pX qk. (5.21)


tPr0,1s

Since c5 ą 1 and c∇F is a nondecreasing function of its argument,

k∇F pX ` td pX qq ´ ∇F pX qk ď k∇F pX ` td pX qq ´ ∇F pX
s qk ` k∇F pX
s q ´ ∇F pX qk
ď c∇F pc5 γq ` c∇F pγq ď 2c∇F pc5 γq.

Combining with (5.21) and (5.18a), we obtain

kF pX ` d pX qqk ď 2c3 c∇F pc5 γqγ.

Using (5.13b), we obtain (5.18b) with c4 :“ 2c2 c3 .

Theorem 5.1 (Theorem 6.4, [21]). Let X


s be a regular zero of F.
(i) If X 0 is close enough to X
s , the sequence tX k u in (4.28a) is well-defined and converges
superlinearly to X
s.

(ii) Moreover, if
k∇F pX q ´ ∇F pX
s qk “ OpkX ´ X
s kq, (5.22)
then the convergence is quadratic.
144 Chapter 5. A new nonparametric interior-point method

Chứng minh. Let α P p0, 1q. By Lemma 5.3, if kX k ´ X


s k “ γ ď γ2 , then

kX k`1 ´ X
s k ď c4 c∇F pc5 γqkX k ´ X
s k. (5.23)

When γα P p0, γ1 q is small enough, c4 c∇F pc5 γq ď α. For a certain kα P N such that kX kα ´ Xsk ď
γα , we have kX ´ X
k s k ď α α kX α ´ X
k´k k s k for all k ą kα . If X is close enough to X
0 s , then
the sequence tX u is well-defined and converges linearly to X . Furthermore, for all α P p0, 1q,
k s
there exists an integer kα ď γα and the convergence is linear with rate α. This implies that the
convergence is superlinear. If (5.22) is satisfied, then c∇F pγq “ Opγq. Combining with (5.23),
we deduce that the convergence is quadratic.

Theorem 5.2 (Theorem 6.9, [21]). Let F : R``2m`1 Ñ R``2m`1 be a continuously-differentiable


function.

(i) [Local analysis] Let X


s be a regular zero of F . If X 0 is close enough to X
s , then ςk “ 1 for
all k, and X Ñ X superlinearly (and we recover the standard Newton method).
k s

(ii) [Limit point] Let Xr be a limit point of sequence tX k u. If ∇F pX


r q is invertible, then X
r is a
regular zero of F . If X
r is a regular zero of F , then ςk “ 1 for k big enough and X Ñ Xk r
superlinearly.

(iii) [General behavior] At least one of three possibilities below holds:

(a) F pX k q Ñ 0.
(b) kd pX k qk is unbounded.
(c) The sequence tX k u converges to X
r where ∇F pX
r q is not invertible.

The three items of the Theorem illustrate the conditions and the qualities of convergence of
the algorithm. Item (i) corresponds to the behavior of the algorithm near a regular zero. Item
(ii) states the rate of convergence in some particular situations. Item (iii) summarizes all of the
possible scenarios when running the algorithm. In particular, if ∇F pX q is invertible everywhere
(or at least during the iterations of the algorithm) and kF pX qk Ñ 8 as kX k Ñ 8, then only the
possibility (a) of (iii) can occur; conditions of (ii) are satisfied so that if the algorithm converges,
it will converge superlinearly to a regular zero.

Chứng minh. (i) If X 0 is close enough to X


s , then sequence tX k u is generated by the standard
Newton method, i.e., X k`1 “ X k ` d pX k q. By (5.13b) [Lemma 5.2], we have kX k ´ X sk ď
c2 kF pX qk. By the proof of Lemma 5.3, we have
k

kF pX k ` dpX k qqk ď 2c3 c∇F pc5 γqkX k ´ X


s k.

Hence,
kF pX k`1 qk ď 2c2 c3 c∇F pc5 γqkF pX k qk.
Since c∇F pc5 γq Ñ 0 as γ Ñ 0, we can choose γ such that

kF pX k`1 qk ď p1 ´ 2κqkF pX k qk.

It satisfies (4.46) with j “ 0 or ς k “ 1 for all k. By Theorem 5.1, X k Ñ Xs superlinear.


5.2. Regularity of zeros for the two-phase multicomponent model 145

(ii) Let X
r be a limit point of tX k u and ∇F pX
r q is invertible. Suppose X
r is not a zero of F.
We have
ż1
ΘpX ` ς d pX qq “ ΘpX q ` ς ∇ΘpX ` tς d pX qqd pX q dt
0
“ ΘpX q ` ς∇ΘpX qd pX q ` ςApX , ςqd pX q,

where ż1
ApX , ςq :“ r∇ΘpX ` tς d pX qq ´ ∇ΘpX qs dt.
0

When X Ñ X r and ς Ñ 0, we get ApX , ςq Ñ 0 and d pX q is bounded. There exist γ ą 0


and ςr ą 0 such that, if kX ´ X
r k ď γ and ς ď ςr, we have |ApX , ςqd pX q| ď ΘpX q, and then

ΘpX ` ς d pX qq ď ΘpX q ` ς∇ΘpX qT d pX q ` ςΘpX q “ p1 ´ ςqΘpX q


ď p1 ´ 2ςκqΘpX q.

This proves that (4.46) is satisfied when kX k ´ X ς , or jk ď J. If X


r k ď γ and %jk ď %r r is a
limit point of tX u, using ΘpX q ě 2 ΘpX q, for k large enough, we obtain
k r 1 k

ΘpX k`1 q ´ ΘpX k q ď ´2κ%J ΘpX k q ď ´κ%J ΘpX


rq

for the corresponding subsequence. Since ΘpX k q decreases, this implies that ΘpX k q tends
to ´8, which is impossible. Therefore, if a limit point of X k is not a zero of F , then ∇F
is not invertible at this point. Since this leads to a contradiction, X
r must be a zero of F .
If X is a regular zero of F , then X is close enough to X for k big enough. Apply point
r k r
(i), we conclude that ς k “ 1 for k big enough and X k Ñ X r superlinear.

(iii) We consider the point (c). We assume that limkÑ`8 kF pX k qk ą 0 and kdpX k qk is bounded.
Then, with the inequality (4.46)

´ΘpX 0 q ď lim ΘpX k q ´ ΘpX 0 q “ pΘpX k`1 q ´ ΘpX k qq ď ´2κ ς k ΘpX k q.


ÿ ÿ
k
kě0 kě0

ΘpX 0 q
Put l :“ lim ΘpX k q ą 0, it implies ςk ď . If d pX k q is bounded, then
ř
k kě0 2κl

kX k`1 ´ X k k “ ς k kd pX k qk ă 8.
ÿ ÿ

kě0 kě0

Hence, tX k u is a Cauchy sequence. It converges to a certain X r . But X


r is not a regular
zero of F . We conclude that ∇F pX
r q is not invertible by point (ii).
This completes the proof.

5.2 Regularity of zeros for the two-phase multicomponent model


According to Theorem 5.2, the promise of global convergence for the NPIPM algorithm hinges
on the regularity of the zeros of the system at hand. Put another way, if we could prove that the
Jacobian matrix ∇F pX s q at a solution X
s is nonsingular, this would be an auspicious sign of the
adequacy of the NPIPM algorithm to the problem. In this section, we derive the necessary and
sufficient conditions for a zero of the two-phase multicomponent model (2.77) to be regular.
146 Chapter 5. A new nonparametric interior-point method

5.2.1 A general proof for strictly convex laws


We begin with a proof of the regularity of all nondegenerate zeros of (2.77), i.e., solutions that
are neither a transition point [Definition 2.1] nor an azeotropic point [Definition 2.2], in the most
general case. By “general,” we mean that the Gibbs functions gG and gL satisfy Hypotheses 2.2.

5.2.1.1 Preliminary lemmas


We first need a few technicalities to transform the determinant to be computed into a simpler
one.

Lemma 5.4. Let X s νsq P R``2m ˆ R be a solution of (5.3), (5.7), with X


s “ pX, s “ pX,
s Vs , W
Ďq P
` m m
I Ă R ˆ R ˆ R , where I is the interior region (4.73). Then,

det ∇F pX
s q “ pη ` 2s ∇ΛpXq
s
νq s . (5.24)
∇GpXq s ` ∇HpXq
s d HpXq s d GpXq

In particular, if νs ą ´η{2, the two determinants above are singular or nonsigular at the same
time.

Chứng minh. By virtue of Lemma 5.1 and from X s P I, we have det ∇F pX ν q det ∇FpXq.
s q “ pη`2s s
Since X is a solution, V “ GpXq and W “ HpXq. We are thus in a position to apply Lemma
s s s Ď s
4.4 and to obtain det ∇F pX ν q det ∇FrpXq.
s q “ pη ` 2s s The latter determinant is given by (4.72),
which leads to the desired result.

The matrix in the left-hand side of (4.72) is of order ` ` 2m ` 1, while that in the right-hand
side of (4.72) is of order `. In addition to this reduction in size, the following transformation will
be helpful. Assume that for some i P t1, . . . , ` ´ mu, the i-th component of Λ takes the form

Λi pXq “ ϕi,G pXq ´ ϕi,L pXq,

where ϕi,G is associated with the G-phase and ϕi,L is associated with the L-phase. Typically,
this can be an equality of extended fugacites (2.77b) for some species. Let us consider Λf the
vector-valued function in which Λi has been replaced by

Λfi pXq “ f pϕi,G pXqq ´ f pϕi,L pXqq,

where f is an increasing and differentiable scalar function. Typically, f is the logarithm function,
by which an extended fugacity is mapped to an extended chemical potential. It is obvious that
since Λi pXq “ 0 is equivalent to Λfi pXq “ 0, ΛpXq “ 0 is equivalent to Λf pXq “ 0. But what can
be said about the determinant of the Jacobian matrix at a solution when we write Λf pXq “ 0
instead of ΛpXq “ 0?

Lemma 5.5. Let X


s “ pX, Ď , νsq P D ˆ Rm ˆ Rm ˆ R be a solution of (5.3), (5.7). Then,
s Vs , W

∇Λf pXq
s ∇ΛpXqs
“ f 1 pϕi q s , (5.25)
∇GpXq d HpXq ` ∇HpXq d GpXq
s s s s ∇GpXq d HpXq ` ∇HpXq
s s s d GpXq

where ϕi “ ϕi,G pXq


s “ ϕi,L pXq
s is the common value of ϕi,G and ϕi,L at the solution. In particu-
lar, for an increasing function f , the two determinants above are singular or nonsingular at the
same time.
5.2. Regularity of zeros for the two-phase multicomponent model 147

Chứng minh. The gradient (row) of Λfi with respect to X reads

∇Λfi pXq “ f 1 pϕi,G pXqq∇ϕi,G pXq ´ f 1 pϕi,L pXqq∇ϕi,L pXq.

At a solution, we have ϕi,G pXq s “: ϕi . Hence, f 1 pϕi,G pXqq “ f 1 pϕi,L pXqq “ f 1 pϕi q can
s “ ϕi,L pXq
be factorized, so that
∇Λfi pXq
s “ f 1 pϕi q ∇Λi pXq.
s

The proof is completed by taking this factor out of the i-th row of the Jacobian matrix.

Our last preparatory Lemma is concerned with with positive definite symmetric matrices,
which will be needed at the end of the proof.

Lemma 5.6. Let A and B be two positive definite symmetric matrices. Then, C “ A´1{2 BA´1{2
and D “ I ´ pI ` Cq´1 are also positive definite symmetric matrices.

Chứng minh. It easy to see that C is symmetric. Besides,

z T Cz “ z T A´1{2 BA´1{2 z “ pA´1{2 zqT BpA´1{2 zq ě 0,

where equality holds if and only if A´1{2 z “ 0, that is, if and only if z “ 0. Thus, C is positive
definite. Therefore, its eigenvalues are all positive. In the a basis that diagonalizes C, the matrix
D “ I ´ pI ` Cq´1 is also transformed into a diagonal form. If λ ą 0 is one of the eigenvalues of
C, the corresponding eigenvalue of D is
λ
1 ´ p1 ` λq´1 “ ą 0.
1`λ
Therefore, D is positive definite.

5.2.1.2 Criterion for a regular zero


The two-phase multicomponent system (2.77) corresponds to

` “ 2K ` 1, m “ 2.
I , . . . , ξ K , ξ I , . . . , ξ K q P R2K`1 be the vector of unknowns. The functions Λ, G
Let X “ pY, ξG G L L
and H associated with (2.77) are
I ` p1 ´ Y qξ I ´ cI
» fi
Y ξG L
— .. ffi

— K´1 . ffi
ffi
—Y ξ K´1 K´1
G ` p1 ´ Y qξG ´ c ffi 2K´1
ΛpXq “ — — ξ I ΦI pxG q ´ ξ I ΦI pxL q ffi P R
ffi (5.26a)
— G G L L ffi
— .. ffi
– . fl
K ΦK px q ´ ξ K ΦK px q
ξG G G L L L

and „  „ 
Y 1 ´ . . . ´ ξK
1 ´ ξG
2
GpXq “ PR , HpXq “ G P R2 , (5.26b)
1´Y 1 ´ ξL1 ´ . . . ´ ξLK
where xG “ pxIG , . . . , xK´1 I K´1
G q and xL “ pxL , . . . , xL q are defined in (2.38b) as functions of X.
148 Chapter 5. A new nonparametric interior-point method

Theorem 5.3. Let X s “ pX, Ď , νsq P R2K`6 be a solution of (5.3), (5.7) using the functions
s Vs , W
(5.26). Assume that νs “ 0 and that the Gibbs energy functions gG and gL meet Hypotheses 2.2.
Then, Xs is a regular zero if and only if X s is neither a transition point (in the sense of
Definition 2.1) nor an azeotropic point (in the sense of Definition 2.2).

Chứng minh. If νs “ 0, then the last equation of (5.7) implies Vs ´ “ W


Ď ´ “ 0, that is X
s P I. By
Lemma 5.4, we have det ∇F pX q “ ηd, where
s

∇ΛpXq
s
d“
∇GpXq s ` ∇HpXq
s d HpXq s .
s d GpXq

By Lemma 5.5, we know that d is zero or nonzero simultaneously with

‚ ∇Λ‚ pXq
s
d “
∇GpXq d HpXq ` ∇HpXq
s s s ,
s d GpXq

where
I ` p1 ´ Y qξ I ´ cI
» fi
Y ξG L
— .. ffi

— . ffi
ffi
— Yξ K´1 K´1 K´1
‚ G ` p1 ´ Y qξG ´ c ffi
Λ pXq “ —

I I I I
ffi .
— lnpξ Φ
G G pxG qq ´ lnpξ Φ
L L px L qq ffi
ffi
— .. ffi
– . fl
K K K K
lnpξG ΦG pxG qq ´ lnpξL ΦL pxL qq

Henceforth, we shall be studying d . Each of the last K components of Λ‚ pXq can be rewritten
as
lnpσG q ` µiG ´ lnpσL q ´ µiL ,
for i P tI, II, . . . , Ku, with
I K
σG “ ξG ` . . . ` ξG , σL “ ξLI ` . . . ` ξLK ,
µiG “ lnpxiG ΦiG pxG qq, µiL “ lnpxiL ΦiL pxL qq.

After this transformation, d has the structure

∆ξsI Ys ... 0 0 1 ´ Ys ... 0 0


.. .. .. .. .. .. ..
. . . . . . .
∆ξsK´1 0 ... 0 Ys 0 ... 1 ´ Ys 0
0 M
Ď I ... M
Ď I ĎI
M ĎI
´M ĎI
. . . ´M ĎI
´M
G,I G,K´1 G,K L,I L,K´1 L,K
‚ .. .. .. .. .. .. ..
d “ . . . . . . . ,
K´1 K´1 K´1 K´1 K´1 K´1
0 M
Ď
G,I ... M
Ď
G,K´1 MG,K
Ď ´M
Ď
L,I . . . ´M
Ď
L,K´1 ´M
Ď
L,K
0 ĎK
M ĎK
... M ĎK
M ´ML,I
Ď K K
. . . ´ML,K´1
Ď ĎK
´M
G,I G,K´1 G,K L,K
1´σ
sG ´Y s ... ´Y s ´Ys 0 ... 0 0
´1 ` σ
sL 0 ... 0 0 Y ´1
s ... Y ´1
s Y ´1
s

where
i
∆ξsi “ ξsG
i
´ ξsLi , Ďi “ 1 ` Bµα ps
M ξ α q, (5.27)
α,j
σ
sα Bξαj
5.2. Regularity of zeros for the two-phase multicomponent model 149

for α P tG, Lu, pi, jq P tI, . . . , Ku2 . We subtract the pK ` 1q-th column to each of the columns
from the 2-nd to the K-th. Likewise, we subtract the p2K ` 1q-th to each of the columns from
the pK ` 2q-th to the 2K-th. This yields
∆ξsI Ys ... 0 0 1 ´ Ys ... 0 0
.. .. .. .. .. .. ..
. . . . . . .
∆ξsK´1 0 ... 0 Ys 0 ... 1 ´ Ys 0
0 |I
M ... M |I ĎI
M |I
´M |I
. . . ´M ĎI
´M
G,I G,K´1 G,K L,I L,K´1 L,K
‚ .. .. .. .. .. .. ..
d “ . . . . . . . ,
K´1 K´1 K´1 K´1 K´1 K´1
0 MG,I
| . . . MG,K´1 MG,K
| Ď ´ML,I
| . . . ´ML,K´1
| ´M
Ď
L,K
0 |K
M ... M |K ĎK
M |K
´M |K
. . . ´M ĎK
´M
G,I G,K´1 G,K L,I L,K´1 L,K
1´σ
sG 0 ... 0 ´Ys 0 ... 0 0
´1 ` σ
sL 0 ... 0 0 0 ... 0 Y ´1
s

with „ i
BµG Bµiα s 1 Bµiα

i i i
Mα,j “ Mα,j ´ Mα,K “
| Ď Ď ´ pξ α q “ xα q,
ps (5.28)
Bξαj BξαK sα Bxjα
σ
for α P tG, Lu, i P tI, . . . , Ku, j P tI, . . . , K ´ 1u. The last equality follows from the chain rule
K´1
BµiG Bµiα ÿ ˆ Bxk Bxkα BµiG
˙
α
´ K “ ´ K
Bξαj Bξα k“I Bξαj Bξα Bxkα

and from
Bxkα δj,k σα ´ ξαk Bxkα ξαk
“ , “´ .
Bξαj Bξαj
σα2 σα2
Now, we subtract the p2K ´ 1q-th row to each of the rows from the K-th to the p2K ´ 2q-th.
This gives
∆ξsI Ys ... 0 0 1 ´ Ys ... 0 0
.. .. .. .. .. .. ..
. . . . . . .
∆ξ K´1
s 0 ... 0 Y
s 0 ... 1 ´ Ys 0
0 Ă I
MG,I I I
. . . MG,K´1 MG,K
Ă Ď ĂI
´M ĂI
. . . ´M ´ML,K
Ď I
L,I L,K´1
‚ .. .. .. .. .. .. ..
d “ . . . . . . . ,
K´1 K´1 K´1 K´1 K´1 K´1
0 M
Ă
G,I ... M Ă
G,K´1 MG,K
Ď ´M
Ă
L,I . . . ´M
Ă
L,K´1 ´M
Ď
L,K
0 | K
MG,I K
. . . MG,K´1
| ĎK
M ´ML,I
| K K
. . . ´ML,K´1
| ĎK
´M
G,K L,K
1´σ
sG 0 ... 0 ´Ys 0 ... 0 0
´1 ` σ
sL 0 ... 0 0 0 ... 0 Ys ´ 1
with
1 Bµiα BµK 1 B 2 gα
„ 
i i K α
Mα,j “ Mα,j ´ Mα,j “
Ă | | ´ x
ps α q “ xα q,
ps (5.29)
sα Bxjα
σ Bxjα sα Bxiα Bxjα
σ
for α P tG, Lu, pi, jq P tI, . . . , K ´ 1u2 in view of (2.24c), and
ˆ ˙
Ďi “ M
M ĎK “ B pµi ´ µK qps
Ďi ´ M B Bgα s
α,K α,K α,K α ξα q “ pξ α q.
BξαK α BξαK Bxiα
150 Chapter 5. A new nonparametric interior-point method

By the chain rule,


K´1
ÿ Bxjα B K´1
B 1 ÿ j B
“ “ ´ x . (5.30)
BξαK j“I
BξαK Bxjα σα j“I α Bxjα

Applying this to Bgα {Bxiα , we obtain


K´1 2
Ďi “ ´ 1 j B gα
ÿ
M α,K x xα q.
ps
sα j“I α Bxiα Bxjα
s
σ

This can be further transformed by observing that the Gibbs-Duhem condition (2.25) can be
recast as
K´1
ÿ Bµjα K´1 Bµα
K
0“ xjα ` p1 ´ x I
α ´ . . . ´ x α q
j“I
Bxiα Bxiα
K´1
ÿ B BµK
α
“ xjα pµ j
α ´ µK
α q `
j“I
Bxiα Bxiα
K´1
ÿ B 2 gα BµK
α
“ xjα ` . (5.31)
j“I Bxiα Bxjα Bxiα

Hence,
K
Ďi “ 1 Bµα ps
M xα q. (5.32)
α,K
sα Bxiα
σ
Single-phase solution. Assume Ys “ 1, i.e., the solution is in the gas phase. Because νs “ 0,
we must have σ
sG “ 1. Then,
∆ξsI 1 ... 0 0 0 ... 0 0
.. .. .. .. .. .. ..
. . . . . . .
∆ξ K´1
s 0 ... 1 0 0 ... 0 0
0 M
Ă I ... MĂ I I
MG,K
Ď ´M
Ă I . . . ´MĂI ´ML,K
Ď I
G,I G,K´1 L,I L,K´1
‚ .. .. .. .. .. .. ..
d “ . . . . . . . ,
0 ĂK´1 . . . M
M ĂK´1 ĎK´1 ĂK´1 . . . ´M ĂK´1 ĎK´1
G,I G,K´1 MG,K ´M L,I L,K´1 ´M L,K
0 |K
M ... M|K ĎK
M |K
´M . . . ´M|K ĎK
´M
G,I G,K´1 G,K L,I L,K´1 L,K
0 0 ... 0 ´1 0 ... 0 0
´1 ` σ
sL 0 ... 0 0 0 ... 0 0
Expanding the determinant with respect to the last two rows, we get
1 ... 0 0 ... 0 0
.. .. .. .. ..
. . . . .
0 ... 1 0 ... 0 0
‚ I
MG,I I
. . . MG,K´1 ´ML,II I
. . . ´ML,K´1 ´ML,KI
d “ p´1qK p1 ´ σ
Ă Ă Ă Ă Ď
sL q
.. .. .. .. ..
. . . . .
K´1 K´1 K´1 K´1 ĎK´1
M
Ă
G,I ... M Ă
G,K´1 ´M
Ă
L,I . . . ´M
Ă
L,K´1 ´M L,K
| K
MG,I |K
. . . MG,K´1 ´ML,I
| K K
. . . ´ML,K´1
| ´M K
Ď
L,K
5.2. Regularity of zeros for the two-phase multicomponent model 151

Taking advantage of the block-triangular structure and using (5.27)–(5.29), (5.32),


ĂI
M ĂI
... M ĎI
M
L,I L,K´1 L,K
.. .. .. ∇2 gL ps
xL q p∇µK T x q
L q ps L
‚ . . . 1´σ sL K
d “ p1 ´ σ
sL q “ BµL s .
ĂK´1 . . . M
M ĂK´1 ĎK´1
M σL qK
ps ∇µK xL q
L ps 1`σsL K pξ L q
L,I L,K´1 L,K BξL
| K
ML,I K
. . . ML,K´1
| MK
Ď
L,K

Let Cj denote the j-th column of the latter K ˆ K-matrix. We perform the column substitution
CK Ð CK ` K´1 sjL Cj and invoke (5.30)–(5.31) to end up with
ř
j“1 x

‚ 1´σ sL ∇2 gL ps
xL q 0 1´σ sL
d “ K K
“ det ∇2 gL ps
xL q.
σL q
ps ∇µL ps xL q 1 σL qK
ps

Thanks to the strict convexity assumption, det ∇2 gL ps xL q ą 0. Because of the complemen-



tarity condition 0 ď 1 ´ Ys K 1 ´ σ sL ě 0, we have d ě 0. If 1 ´ σ sL ą 0, that is, if the

solution is not a transition point, then d ą 0 and we have a regular zero. Otherwise, the
zero is singular. The other single-phase case Ys “ 0 can be dealt with analogously. We obtain

d “ rp1 ´ σ σG qK s det ∇2 gG ps
sG q{ps xG q, from which a similar conclusion can be drawn.

Two-phase solution. Assume Ys P p0, 1q. Then, σ


sG “ σ
sL “ 0 and s
ξα “ x
s α . We shall therefore
write ∆si i
x instead of ∆ξ . Expanding
s

∆sxI Ys ... 0 0 1 ´ Ys ... 0 0


.. .. .. .. .. .. ..
. . . . . . .
xK´1
∆s 0 ... 0 Y
s 0 ... 1 ´ Ys 0
0 M
Ă I ... MĂ I I
MG,K
Ď ĂI
´M . . . ´MĂI ´ML,K
Ď I
G,I G,K´1 L,I L,K´1
‚ .. .. .. .. .. .. ..
d “ . . . . . . .
0 ĂK´1 . . . M
M ĂK´1 ĎK´1 ĂK´1 . . . ´M ĂK´1 ĎK´1
G,I G,K´1 MG,K ´M L,I L,K´1 ´M L,K
0 |K
M ... M|K ĎK
M |K
´M . . . ´ |K
M ĎK
´M
G,I G,K´1 G,K L,I L,K´1 L,K
0 0 ... 0 ´Ys 0 ... 0 0
0 0 ... 0 0 0 ... 0 Y ´1
s

with respect to the last two rows, we arrive at


∆sxI Ys ... 0 Ys ´ 1 ... 0
.. .. .. .. ..
. . . . .
xK´1
∆s 0 ... Ys 0 . . . Ys ´ 1
‚ 0 ĂI
M ... M ĂI ĂI
M ... M ĂI
d “ Ys p1 ´ Ys q G,I G,K´1 L,I L,K´1
.. .. .. .. ..
. . . . .
0 ĂK´1 . . . M
M ĂK´1 ĂK´1 . . . M
M ĂK´1
G,I G,K´1 L,I L,K´1
0 |K
M . . . |K
M |K
M . . . |K
M
G,I G,K´1 L,I L,K´1
∆s
x Y IK´1
s pY ´ 1qIK´1
s
“ Ys p1 ´ Ys q 0 ∇2 gG ps
xG q ∇2 gL ps
xL q .
0 ∇µK xG q
G ps ∇µK xL q
L ps
152 Chapter 5. A new nonparametric interior-point method

Ys
For j P t2, . . . , Ku, we perform the column substitution Cj Ð Cj ` C
1´Ys j`K´1
to obtain

∆s
x 0 pYs ´ 1qIK´1
Ys

d “ Ys p1 ´ Ys q 0 ∇2 gG ps
xG q ` ∇2 gL ps
xL q ∇2 gL ps
xL q .
1 ´ Ys
Ys
0 ∇µK xG q `
G ps ∇µK xL q
L ps ∇µK xL q
L ps
1 ´ Ys
Expanding with respect to the first column, we have
K´1
ÿ

d “ Ys p1 ´ Ys q p´1qi´1 ∆xi Mi ,
i“I

where Mi is the K ˆ K-matrix obtained by removing the i-th line and the first column of d . To
compute Mi , we expand it with respect to its first K ´ 2 rows, each of which contains exactly
one nonzero entry, equal to Ys ´ 1. When doing the expansion, we must pay a lot of attention to
the sign of the various minors involved. At the end of the algebra, we obtain

Ys Bp∇gL qT
∇2 gG ps
xG q ` ∇2 gL ps
xL q xL q
ps
1 ´ Ys BxiL
p´1qi´1 Mi “ p1 ´ Ys qK´2 ,
Ys BµK
L
∇µK xG q `
G ps ∇µK xL q
L ps xL q
ps
1 ´ Ys BxiL

xL q is the i-th column of ∇2 gL ps


where Bp∇gL qT {BxiL ps xL q. Multiplying by ∆xiL , summing over i
and redistributing p1 ´ Ys qK´1 to the first K ´ 1 columns result in

‚ p1 ´ Ys q∇2 gG ps
xG q ` Ys ∇2 gL ps
xL q ∇2 gL ps
xq∆s
x
d “ Ys K K K
.
p1 ´ Y q∇µG ps
s xG q ` Y ∇µL ps
s xL q ∇µL psxL q∆s
x

Let Riřdenote the i-th row of the latter K ˆ K-matrix. We perform the row substitution RK Ð
RK ` K´1 siG Ri . After (5.31),
i“I x

s TG ∇2 gG ps
x xG q ` ∇µK xG q “ 0.
G ps

s TG ∇2 gL ps
To compute x xL q ` ∇µK xL q, we start from
L ps

s TL ∇2 gL ps
x xL q ` ∇µK xL q “ 0,
L ps

which is also due to (5.31). Since x


sG “ x
s L ` ∆s
x, we have

s TG ∇2 gL ps
x xL q ` ∇µK xT ∇2 gL ps
xL q “ ∆s
L ps xL q.

As a result,

‚ p1 ´ Ys q∇2 gG ps
xG q ` Ys ∇2 gL ps
xL q ∇2 gL ps
xq∆s x
d “ Ys T 2 T 2
.
Y ∆s
s x ∇ gL ps xL q x ∇ gL ps
∆s xL q∆s
x

Now, we expand this determinant with respect to the last row. In doing so, we see that each
xqT ∇2 gL ps
entry of the row vector Ys p∆s xL q will be multiplied by the determinant of a matrix in
which the corresponding column of p1 ´ Ys q∇2 gG ps xG q ` Ys ∇2 gL ps
xL q has been replaced by the
5.2. Regularity of zeros for the two-phase multicomponent model 153

column vector ∇2 gL ps
xq∆s x, up to a permutation. This is reminiscent of Cramer’s rule for solving
a linear system, except for the fact that the determinant of p1 ´ Ys q∇2 gG ps
xG q ` Ys ∇2 gL ps
xL q is
missing here. Guided by this intuition, we can readily check that

d “ Ys det p1 ´ Ys q∇2 gG ` Ys ∇2 gL ∆sxT ML ∆s
“ ‰
x, (5.33)

with ‰´1 2
ML “ ∇2 gL ´ Ys ∇2 gL p1 ´ Ys q∇2 gG ` Ys ∇2 gL

∇ gL ,
where we have dropped the arguments x
s G and x
s L for short. This matrix can be rearranged as
!“ ‰´1 ” 2 1 ´ Ys ı´1 )
ML “ ∇2 gL ∇2 gL ´ ∇ gL ` s ∇2 gG ∇2 gL
Y
! ” 1 ´ Ys ı´1 )
“ p∇2 gL q1{2 IK´1 ´ IK´1 ` s p∇2 gL q´1{2 ∇2 gG p∇2 gL q´1{2 p∇2 gL q1{2 .
Y
We could have done calculations the other way around and this would have given us

d “ p1 ´ Ys q det p1 ´ Ys q∇2 gG ` Ys ∇2 gL ∆s
xT MG ∆s
“ ‰
x, (5.34)

with
! ” 1 ´ Ys ı´1 )
MG “ p∇2 gG q1{2 IK´1 ´ IK´1 ` s p∇2 gG q´1{2 ∇2 gL p∇2 gG q´1{2 p∇2 gG q1{2 .
Y
To restore symmetry, we consider the combination p1 ´ Ys q¨ (5.33) `Ys ¨ (5.34) and thus obtain

d “ Ys p1 ´ Ys q det p1 ´ Ys q∇2 gG ` Ys ∇2 gL ∆s
xT pMG ` ML q∆s
“ ‰
x.

By Lemma 5.6 and the strict convexity assumption, the symmetric matrix MG ` ML is positive
‚ ‚
definite. Hence, d ě 0 and equality d “ 0 occurs if and only if ∆s
x “ 0, that is x
sG “ x
s L . This
is precisely the characterization of an azeotropic solution.

5.2.2 A special proof for Henry’s law


In the special case where the Gibbs functions gG and gL are derived from the ideal or Henry’s
law (see §3.1.1), there is a shorter proof of regularity for the nondegenerate zeros of (2.77). We
present it below for mathematical completeness. Let us consider the fugacity laws

ΦiG ” 1, ΦiL ” k i , i P tI, . . . , Ku,

where the constants k i ’s are positive. The equality of extended fugacities (2.77b) becomes ξG i “

k i ξLi for i P tI, . . . , Ku. By eliminating the liquid fractions ξLi in (2.77), we obtain an equivalent
system of K ` 1 equations
I
ξG
I
Y ξG ` p1 ´ Y q ´ cI “ 0, (5.35a)
kI
..
.
K´1 ξ K´1
Y ξG ` p1 ´ Y q G ´ cK´1 “ 0, (5.35b)
k K´1

min Y, 1 ´ K
` ř
j“1 ξG “ 0, (5.35c)
154 Chapter 5. A new nonparametric interior-point method

j
min 1 ´ Y, 1 ´ K
` ř ˘
j “ 0.
j“1 ξG {k (5.35d)
I , . . . ξ K q P RK`1 . With respect to the abstract framework, this
in the unknowns X “ pY, ξG G
model corresponds to
` “ K ´ 1, m “ 2,
with the continuous-differentiable functions
» I fi
Y ξ I ` p1 ´ Y q ξG ´ cI
G

.. kI ffi
ΛpXq “ — ffi P RK´1
— ffi
.
K´1
ξG
– fl
K´1 K´1
Y ξG ` p1 ´ Y q K´1 ´ c
k
and « ff « ff
Y I ´ . . . ´ ξK
1 ´ ξG
2 G
GpXq “ PR , HpXq “ I {k I ´ . . . ´ ξ K {k K
P R2 .
1´Y 1 ´ ξG G

The determinant to be computed reads

∇ΛpXq s
d“
∇GpXq d HpXq ` ∇HpXq
s s s d GpXq s
∆ξsI Ys ` p1 ´ Ys q{k I . . . 0 0
.. .. .. ..
. . . .
∆ ξ K´1 0 . . . Y ` p1 ´ Y q{k K´1 0
“ s s s ,
1´σ sG ´Y s ... ´Y s ´Y s
´1 ` σ sL pY ´ 1q{k
s I ... pY ´ 1q{k
s K´1 pY ´ 1q{k K
s

where

∆ξsi “ ξsG
i
´ ξsLi “ ξsG
i
p1 ´ 1{k i q, σ I
sG “ ξG K
` . . . ` ξG , σ I
sL “ ξG {k I ` . . . ` ξG
K K
{k .

Single-phase solution. Assume Ys “ 1, i.e., the solution is in the gas phase. Because νs “ 0,
we must have σsG “ 1. Then, the last row of the above matrix is zero except for 1 ´ σsL . By
expanding the determinant with respect to this row, we have

1 ... 0 0
.. .. ..
. . .
d “ p´1qK`2 p´1 ` σ
sL q 0 ... 1
K
0 “ p´1q p1 ´ σ
sL q.
´1 . . . ´1 ´1

This can only vanish if 1 ´ σ


sL “ 0. Combined with 1 ´ Ys “ 0, this implies that the solution is
a transition point. The case Ys “ 0 can be dealt with analogously, with

d “ p´1qK p1 ´ σ
sG q{pk I ¨ ¨ ¨ k K´1 k K q,

and the conclusion is the same.

Two-phase solution. Assume Ys P p0, 1q. Then, σ sL “ 1 and ξαj “ xjα for α P tG, Lu,
sG “ σ
5.2. Regularity of zeros for the two-phase multicomponent model 155

j P tI, . . . , Ku. Let Ri be the i-th row of the matrix defining d. We perform the row substitution
RK`1 Ð RK`1 ` RK ` . . . ` RI to obtain

∆sxI Ys ` p1 ´ Ys q{k I . . . 0 0
.. .. .. ..
. . . .
d“ xK´1
∆s 0 . . . Ys ` p1 ´ Ys q{k K´1 0 ,
0 ´Ys ... ´Ys ´Ys
xK
´∆s 0 ... 0 ´Ys ´ p1 ´ Ys q{k K
the last entry of the first column being due to
K´1
ÿ K´1
ÿ
xj “
∆s xjG ´ x
ps sjL q “ p1 ´ x
sK sK
G q ´ p1 ´ x xK
L q “ ´ps sK
G´x L q.
j“1 j“1

By swapping the last two rows, changing signs in the penultimate row and factorizing by ´Ys
from the last one, we get
∆sxI Ys ` p1 ´ Ys q{k I . . . 0 0
.. .. .. ..
. . . .
∆s
x K´1 0 . . . Y ` p1 ´ Ys q{k K´1 0
d “ ´Ys s . (5.36)
xK
∆s 0 ... 0 Ys ` p1 ´ Ys q{k K
0 1 ... 1 1
Starting from the original matrix, if we had performed the row substitution RK Ð RK`1 `
RK ` . . . ` RI instead, we would have ended up with
∆sxI Ys ` p1 ´ Ys q{k I . . . 0 0
.. .. .. ..
. . . .
∆s
x K´1 0 . . . Y ` p1 ´ Ys q{k K´1 0
d“ s .
xK
´∆s 0 ... 0 ´Ys ´ p1 ´ Ys q{k K
0 pY ´ 1q{k I
s ... pY ´ 1q{k K´1
s pYs ´ 1q{k K

Changing signs in the last two rows and factorizing by ´p1 ´ Ys q in the last row, we obtain
RK ` . . . ` RI instead, we would have ended up with
∆sxI Ys ` p1 ´ Ys q{k I . . . 0 0
.. .. .. ..
. . . .
d “ ´p1 ´ Ys q xK´1
∆s 0 . . . Ys ` p1 ´ Ys q{k K´1 0 . (5.37)
xK
∆s 0 ... 0 Ys ` p1 ´ Ys q{k K
0 ´1{k I ... ´1{k K´1 ´1{k K

To recover symmetry, we consider p1 ´ Ys q¨ (5.36) `Ys ¨ (5.37). This yields

∆sxI Ys ` p1 ´ Ys q{k I . . . 0 0
.. .. .. ..
. . . .
d “ ´Ys p1 ´ Ys q xK´1
∆s 0 . . . Ys ` p1 ´ Ys q{k K´1 0
xK
∆s 0 ... 0 Ys ` p1 ´ Ys q{k K
0 1 ´ 1{k I ... 1 ´ 1{k K´1 1 ´ 1{k K
156 Chapter 5. A new nonparametric interior-point method

After K column permutations, we can put the determinant under the form

Ys ` p1 ´ Ys q{k I . . . 0 0 ∆sxI
.. .. .. ..
. . . .
K`1 s 0 . . . Y ` p1 ´ Y q{k K´1 0 xK´1 .
∆s
d “ p´1q Y p1 ´ Y q
s s s
0 ... 0 Ys ` p1 ´ Ys q{k K xK
∆s
1 ´ 1{k I ... 1 ´ 1{k K´1 1 ´ 1{k K 0

xjG ´ x
Arguing that 1 ´ 1{k j “ ps sjG {k j q{s
xjG “ ∆s xjG , we can write
xj {s

Ys ` p1 ´ Ys q{k I . . . 0 0 ∆sxI
.. .. .. ..
. . . .
d “ p´1qK`1 Ys p1 ´ Ys q 0 . . . Ys ` p1 ´ Ys q{k K´1 0 xK´1 .
∆s
0 ... 0 Ys ` p1 ´ Ys q{k K xK
∆s
K´1
xI {s
∆s xIG ... xK´1 {s
∆s xG xK {s
∆s xK
G 0

To make the determinant even more symmetric, let us multiply each column j by ps xjG q1{2
i 1{2
xG q . Overall, after sweeping over all columns and all rows, we do
and divide each row i by ps
not change the determinant. Setting

∆s xiG
zsi “ i
, i P t1, . . . , Ku,
xG q1{2
ps

we can now write the determinant as


Ys ` p1 ´ Ys q{k I . . . 0 0 zsI
.. .. .. ..
. . . .
d “ p´1qK`1 Ys p1 ´ Ys q 0 . . . Ys ` p1 ´ Ys q{k K´1 0 zsK´1 .
0 ... 0 Ys ` p1 ´ Ys q{k K zsK
zsI ... zsK´1 zsK 0

We expand this new form of the determinant with respect to the last row, using the same
technique as in the previous section for the general proof: each entry of the row vector z sT “
zI , . . . , zsK q will be multiplied by the determinant of a matrix in which the corresponding column
ps
of
D “ diag Ys ` p1 ´ Ys q{k I , . . . , Ys ` p1 ´ Ys q{k K
` ˘

has been replaced by the column vector z s P RK , up to a permutation. This somehow reminds
us of Cramer’s rule for solving a linear system. Exploring this path, it can be then proven that

d “ p´1qK Ys p1 ´ Ys q z
sT adjpDqs
z,

where adjpDq “ detpDq D´1 denotes the adjugate matrix of D. This adjugate matrix is easily
seen to be symmetric and positive definite. Therefore, d “ 0 if and only if z
s “ 0, which is
equivalent to ∆s
x“xsG ´ x
s L “ 0. In other words, the solution is azeotropic.
Chapter 6

Numerical experiments on various


models
Contents
6.1 Simplified models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
6.1.1 Stratigraphic model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
6.1.2 Stationary binary model . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
6.1.3 Stationary ternary model . . . . . . . . . . . . . . . . . . . . . . . . . . 181
6.1.4 Evolutionary binary model . . . . . . . . . . . . . . . . . . . . . . . . . 193
6.2 Multiphase compositional model . . . . . . . . . . . . . . . . . . . . . 198
6.2.1 Continuous model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
6.2.2 Discretized system and resolution . . . . . . . . . . . . . . . . . . . . . . 200
6.2.3 Comparison of the results . . . . . . . . . . . . . . . . . . . . . . . . . . 201

Ce chapitre rend compte des essais numériques que nous avons effectués avec plusieurs algorithmes
sur cinq modèles représentatifs des problèmes avec conditions de complémentarité qui intéressent les
chercheurs d’IFPEN.
Nous qualifions de “simplifiés” les quatre premiers modèles, présentés en §6.1, en raison de leurs
petites tailles (moins d’une dizaine de variables). Deux sont de nature intrinsèquement stationnaire, deux
proviennent de la discrétisation d’un problème d’évolution. Classés par ordre de difficulté croissante, ils
permettent de trier, par élimination progressive des plus mauvais, les algorithmes en compétition et de
faire émerger le meilleur d’entre eux, NPIPM, ainsi que la méthode de référence pour la famille semi-lisse,
Newton-min.
Ceux-ci sont ensuite appliqués en §6.2 à un modèle d’écoulement diphasique (partiellement triphasique)
compositionnel en deux dimensions d’espace, qui n’est certes pas aussi complexe qu’un modèle de réservoir
usuel mais dont les lois thermodynamiques sont complètes et réalistes. Nous décrirons le modèle, mais
pas la discrétisation en temps et en espace. Deux tests d’injection de CO2 seront considérés et mettront
en évidence les lacunes actuelles de NPIPM.

157
158 Chapter 6. Numerical experiments on various models

We apply the numerical methods of chapters §4–§5 to various physical models of interest, pre-
sented here in the order of increasing complexity. The competing algorithms are gradually left
out, based on their performance. At the end of this process, only two of them remain NPIPM
and Newton-min. The latter is the default method in many industrial codes and serves as the
reference semismooth algorithm for our comparison.

6.1 Simplified models


6.1.1 Stratigraphic model
Continuous model. We consider the differential equation

du
“ ´ minpu2 , 1q, (6.1a)
dt
upt “ 0q “ u0 . (6.1b)

The unknown u represents the height uptq P R` of sediments in a basin as a function of time
t. Since the right-hand side of (6.1a) is always nonpositive, u is a nonincreasing function of t.
In other words, the basin is always eroding. However, this erosion can occur at two different
regimes: (i) if u2 ă 1, then the erosion rate is equal to ´u2 ; this is the “unsaturated" regime; (ii)
if u2 ą 1, then the erosion rate is equal to ´1, a maximal erosion rate prescribed by geologists;
this is the “saturated" regime.
It is very easy to show that the solution of system (6.1) is given by
$
& u0 ´ t for 0 ď t ď t˚ ,
uptq “ upt˚ q (6.2)
% for t ą t˚ ,
1 ` upt˚ qpt ´ t˚ q

where t˚ “ maxp0, u0 ´1q is the instant when the regime switches from saturated to unsaturated.
But the exact solution at the continuous level is not our center of interest.

Discretized system. Our center of interest is what happens when (6.2) is numerically solved
(6.1) by the Euler backward scheme

un`1 ´ un
“ ´ minppun`1 q2 , 1q, (6.3)
∆t
where ∆t ą 0 is the time-step. Scheme (6.3) results in the nonlinear scalar equation

un`1 ` ∆t minppun`1 q2 , 1q ´ un “ 0 (6.4)

in the unknown un`1 . Changing the notations from un`1 to u, un to u5 , ∆t to τ and introducing
the auxiliary variable q “ minpu2 , 1q, we can cast (6.4) under the equivalent system

u ` τ q ´ u5 “ 0, (6.5a)
minp1 ´ q, u2 ´ qq “ 0, (6.5b)

in the two unknowns pu, qq P R2 , given the parameters pu5 , τ q P R˚` ˆ R˚` .
6.1. Simplified models 159

In Theorem 4.11, we proved that


$

& pu5 ´ τ, 1q if τ ď u5 ´ 1
pu, qq “
ˆ
4u2 ˙
(6.6)
2u
’ ? 5 , ? 5 otherwise.
1 ` 1 ` 4τ u5 p1 ` 1 ` 4τ u5 q2
%

is a solution of (6.5), called reference solution. This solution is unique if τ ă u5 ` 1. If τ ě u5 ` 1,


there appear two spurious solutions.

Regularity of zeros. Let X “ pu, qq, ΛpXq “ u ` τ q ´ u5 , GpXq “ 1 ´ q, HpXq “ u2 ´ q. We


wish to known whether or not the solution X
s “ pu, qq given by (6.6) gives rise to a regular zero
X of F for the NPIMP algorithm. To this end, we must check that det ∇F pXs q or det ∇FpXq
s s is
nonzero. But by Lemma 5.4 and Lemma 4.4, we can also compute

∇ΛpXq
s 1 τ
d“
∇GpXq s ` ∇HpXq
s d HpXq s “ 2p1 ´ qqu ´rp1 ´ qq ` pu2 ´ qqs .
s d GpXq

Since u ą 0, and it follows from

d “ ´p1 ` 2τ uqp1 ´ qq ´ pu2 ´ qq

that d ď 0. Equality holds if and only if u2 “ q “ 1, that is, u “ q “ 1 because u ą 0. By


inverting (6.6), we find that this is equivalent to

u5 “ τ ` 1. (6.7)

Therefore, the zeros are regular except for the singular situation (6.7).

Numerical results. We compare the NPIPM algorithm with four other methods: Newton-
min, Newton-min with line search, Mehrotra predictor-corrector, and θ1 -smoothing. The stop-
ping criterion is kF pX qk ă 10´7 . We set the maximum number of iterations to be 50. If the
number of iterations of the algorithm exceeds this maximum number, the case will be considered
as divergent. With NPIPM, the parameters for the line search are κ “ 0.4 and % “ 0.99. In the
last equation of the NPIPM system, we take η “ 10´6 .
We sweep over the grid of parameters
(
pu5 , τ q P t0.1; 0.2; . . . ; 10u ˆ 0.1; 0.2; . . . ; 10 .

and the set of initial points

D0 “ pu0 , q 0 q P t0.1; 0.2; . . . ; 10u ˆ t0.1; 0.2; . . . ; 0.9u | pu0 q2 ´ q 0 ą 0 .


(

The number of initial points used for the tests is |D0 | “ 843. For each pair pu5 , τ q, we count the
number of initial points for which the method converges and then plot the percentage of success
for each algorithm.
The results are displayed in Figures 6.1–6.3. It is clearly seen that Mehrotra, Theta-1 and
NPIPM all give better results than Newton-min. More accurately, NPIPM and Theta-1 reach
an impressive rate of 100% of initial points with convergence. Mehrotra seems to be as perfect
as the other two in Figure 6.2(a), but in fact it diverges in a small region, as evidenced by the
close-up in Figure 6.2(b).
160 Chapter 6. Numerical experiments on various models

10 100

9 90

8 80

7 70

6 60

5 50

4 40

3 30

2 20

1 10

0 0
0 2 4 6 8 10
ub

(a) Newton-min

10 100

9 90

8 80

7 70

6 60

5 50

4
40

3
30

2
20
1
10
0
0 2 4 6 8 10
ub

(b) Newton-min with line search

Figure 6.1: Stratigraphic model: Newton-min without and with line search.
6.1. Simplified models 161

10 100

9 90

8 80

7 70

6 60

5 50

4 40

3 30

2 20

1 10

0 0
0 2 4 6 8 10
ub

(a) Mehrotra’s predictor-corrector algorithm

10 100

9
90

8
80
7

6 70

5 60

4
50
3
40
2

1 30

0
0 0.2 0.4 0.6 0.8 1
ub

(b) Close-up of the divergence zone in Mehrotra’s algorithm

Figure 6.2: Stratigraphic model: Mehrotra’s algorithm.


162 Chapter 6. Numerical experiments on various models

10 100

9 90

8 80

7 70

6 60

5 50

4 40

3 30

2 20

1 10

0 0
0 2 4 6 8 10
ub

(a) Theta 1

10 100

9 90

8 80

7 70

6 60

5 50

4 40

3 30

2 20

1 10

0 0
0 2 4 6 8 10
ub

(b) NPIPM

Figure 6.3: Stratigraphic model: θ1 -smoothing and NPIPM.


6.1. Simplified models 163

6.1.2 Stationary binary model


After the stratigraphic model as an “appetizer,” we return to thermodynamics with the two-
phase binary model (2.83) of §2.4.2. For this phase equilibrium problem, we will consider four
families of fugacity coefficients in the order of increasing complexity: Henry’s law, Van Laar’s
law, Van der Waals’ law and Peng-Robinson’s law.

6.1.2.1 Henry’s law


The gas phase is ideal, while the liquid phase has constant fugacity coefficents. In other words,

ΦIG ” 1, ΦII
G ” 1, ΦIL ” k I , ΦII II
L ”k . (6.8)

To fix ideas, we assume that


k I ą 1 ą k II ą 0. (6.9)

Reference solution. Thanks to the simplicity of (6.8), we can eliminate ξLI , ξLII by substituting
I {k I , ξ II {k II into (2.83). This leads to the three-equation system
ξG G

I I
Y ξG ` p1 ´ Y qξG {k I ´ c “ 0, (6.10a)
I II
minpY, 1 ´ ξG ´ ξG q “ 0, (6.10b)
I
minp1 ´ Y, 1 ´ ξG {k I ´ II II
ξG {k q “ 0, (6.10c)

in the unknowns pY, ξGI , ξ II q P r0, 1s ˆ R ˆ R . The following Proposition provides the solution
G ` `
of (6.10), which we call reference solution.

Proposition 6.1. For k I ą 1 ą k II ą 0, the quantities

k I p1 ´ k II q 1 ´ k II
KG “ , KL “ , (6.11)
k I ´ k II k I ´ k II
are well-defined and satisfy 0 ă KL ă KG ă 1. Then, the solution of system (6.10) is given by
$

’ p0, k I c, k II p1 ´ cqq if c P r0, KL s,

’ ˆ ˙
c ´ KL
&
pYs , ξsIG , ξsII
Gq “ , KG , k II p1 ´ KL q if c P pKL , KG q, (6.12)
’ KG ´ KL



p1, c, 1 ´ cq if c P rKG , 1s.
%

Chứng minh. This follows from Gibbs’ geometric construction described in Theorem 2.5. For
k I ą 1 ą k II ą 0, there is exactly one common tangent to the graphs of gG p¨q and gL p¨q. A little
algebra shows that the contact points are precisely pKL , gL pKL qq and pKG , gG pKG qq, the former
being on the left of the latter. The lower convex envelope gq of minpgG , gL q coincides with gL p¨q
over r0, KL s, with the common tangent over pKL , KG q, and with gG p¨q over rKG , 1s.

Regularity of zeros. As a consequence of Proposition 3.1 (strict convexity of the Gibbs


functions) and the general Theorem 5.3 (a special proof for Henry’s law was given §5.2.2),
s “ pYs , ξsI , ξsII q gives rise to a regular zero X
the reference solution X s of the NPIPM system
G G
F pX q “ 0, provided that it is not a transitional or azeotropic point.
164 Chapter 6. Numerical experiments on various models

100
Percentages of initial points with convergence

98

96
Newton-min
NPIPM
94

92

90

88

86
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
c

Figure 6.4: Henry’s law: percentage of convergence over all initial points.

Average number of iterations: 4.02 (Newton-min), 3.88 (NPIPM)


6

5.5

5
Number of iterations

4.5

3.5

2.5 Newton-min
NPIPM
2
0 10 20 30 40 50 60 70 80 90
Index of c

Figure 6.5: Henry’s law: number of iterations with the same initial points.
6.1. Simplified models 165

(a) Newton-min

(b) NPIPM

Figure 6.6: Henry’s law, tested with the same initial point.
166 Chapter 6. Numerical experiments on various models

Numerical results. We compare NPIPM with other methods as we did in stratigraphic


model. We fix k I “ 2, k II “ 0.5. The stopping criteria is kF pX qk ă 10´7 . We set the maximum
number of iterations to be 50. With NPIPM, the line search parameters are κ “ 0.4 and % “ 0.99.
In the last equation of the system, we take η “ 10´6 .
We sweep over the grid of parameters
(
c P 0.01; 0.02; . . . ; 0.99 .

and the set of initial points

D0 “ pY, ξG
I II 0
q P M3 | 1 ´ pξG
I 0 II 0 I 0 I II 0 II
(
, ξG q ´ pξG q ą 0 and 1 ´ pξG q {k ´ pξG q {k ą 0 .

where M “ t0.1; 0.2; . . . ; 0.9u. The number of initial points used for the tests is |D0 | “ 216.
For each c, we count the number of initial points for which the method converges and then plot
the percentage of success for each algorithm in Figure 6.4. Since the percentages for Newton-
min with line search, Mehrotra and Theta-1 are less than 10%, we just show the results for
Newton-min and NPIPM. Figure 6.4 testifies to the remarkable efficiency of NPIPM relatively
to Newton-min, with 100% of convergence.
The next test takes place between NPIPM and Newton-min method. Starting from the
same initial point pY, ξG I , ξ II q “ p0.2, 0.6, 0.3q, we run the two algorithms for all values of
G
c P t0.0001, 0.0002, ..., 0.9999u. In each panel of Figure 6.6, we also plot the Gibbs energy
functions gG and gL . The common tangent between the graphs of gG and gL is represented by
the orange line. The tangency points represent transitional solutions, between a single-phase
regime and a two-phase regime. The black line is the value of Ys for each c when the algorithm
converges. If the algorithm diverges at a value c, we assign the value ´1. We observe that NPIPM
(lower panel) converges with all values of c tested. Newton-min (upper panel) is also not bad
either, with just one case of divergence.
The last test with Henry’s law is the number of iterations if the algorithm converges. We
still use the same parameters for the convergence test. However, in Figure 6.5, we display the
number of iterations versus( the “index” of c. This index is the rank of c within the subset
of 0.01; 0.02; . . . ; 0.99 containing those values of c for which convergence occurs for both
methods.

6.1.2.2 Van Laar’s law


In the two-phase binary model (2.83), we now assign Henry’s law to the gas phase, that is,

ΦIG ” k I , ΦII II
G ”k , (6.13)

while the liquid phase obeys Van Laar’s law (3.12), namely,
„ 2
A21 p1 ´ xq
ln ΦIL pxq “ A12 , (6.14a)
A12 x ` A21 p1 ´ xq
„ 2
II A12 x
ln ΦL pxq “ A21 . (6.14b)
A12 x ` A21 p1 ´ xq

Regularity of zeros. By Proposition 3.1, the Gibbs function gG of the gas phase satisfies
Hypotheses 2.2 for k I , k II ą 0. By Proposition 3.3, if the pair pA12 , A21 q belongs to the “good”
region (3.14), the Gibbs function gL of the liquid phase satisfies Hypotheses 2.2. Then, owing to
6.1. Simplified models 167

Theorem 2.5 ensures existence and uniqueness of a solution for those c at which azeotropy does
not occur. Thanks to Theorem 5.3, this solution gives rise to a regular zero Xs of the NPIPM
sytem F pX q “ 0, provided that it is not a transition point.

Numerical results. We fix k I “ 2, k II “ 0.5 and select the pair

A12 “ ´0.8643, A21 “ ´0.5899,

which corresponds to acetone (species I) and chloroform (species II). It can be readily checked
that this pair belongs indeed to the strict convexity region (3.14) of Van Laar’s law.
The first test is between NPIPM and Newton-min method. We choose the same initial
I , ξ II , ξ I , ξ II q0 “ p0.1, 0.3, 0.6, 0.2, 0.1q and run both algorithms for each value of
point pY, ξG G L L
c P t0.0001, 0.0002, . . . , 0.9999u. The stopping criteria is kF pX qk ă 10´7 . We set the maximum
number of iterations to be 50. With NPIPM, we choose parameters for line search step: κ “ 0.4
and % “ 0.99. In the last equation of the system, η “ 10´6 . In each panel of Figure 6.7, we
plot the Gibbs energy functions gG and gL . The black line is the value of Ys for each c when the
algorithm converges. If the algorithm diverges at a value c, we assign the flag value ´1.
After this first test, we display in Figure 6.8 the number of iterations at convergence corre-
sponding to the two methods. The last test with Van Laar’s law involves many initial points. We
compare the NPIPM algorithm and Newton-min algorithm for several values of c P t0.01; 0.02; . . . ; 0.99u.
For each value of c, we sweep over the set of initial points

D0 “ pY, ξG
I II
, ξLI , ξLII q0 P M5 | 1 ´ pξG
I 0 II 0
q ą 0 and 1 ´ pξLI q0 ´ pξLII q0 ą 0 ,
(
, ξG q ´ pξG

where M “ t0.1; 0.2; . . . ; 0.9u. The number of initial points used is |D0 | “ 11664. We count the
number of initial points for which the method converges and then plot the percentage on the
figure for each algorithm. Again, Figure 6.9 demonstrates the outstanding efficiency of NPIPM,
with a 100% rate of convergence. Nevertheless, it needs slightly more iterations than Newton-min
when the latter converges.

6.1.2.3 Van der Waals’ law

We consider the two-phase binary model (2.83) with Van der Waals’ fugacity coefficients (3.37),
namely,

Bi
„ i
2Ai pxq Apxq

B
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs ` ´ , (6.15)
Bpxq Bpxq Apxq Zα pxq

for i P tI, IIu, α P tG, Lu, x P r0, 1s, where Zα pxq is a real root of the cubic equation (3.33), that
is,
Z 3 pxq ´ rBpxq ` 1sZ 2 pxq ` ApxqZpxq ´ ApxqBpxq “ 0. (6.16)

The mixing rules (3.31b)–(3.32) have been used, i.e.,


` ? ? ˘2
Apxq “ x AI ` p1 ´ xq AII , (6.17a)
Bpxq “ xB I ` p1 ´ xqB II . (6.17b)
168 Chapter 6. Numerical experiments on various models

(a) Newton-min

(b) NPIPM

Figure 6.7: Van Laar’s law, tested with the same initial point.
6.1. Simplified models 169

Average number of iterations: 8.60 (Newton-min), 6.65 (NPIPM)


50
Newton-min
45 NPIPM

40

35
Number of iterations

30

25

20

15

10

0
0 10 20 30 40 50 60
Index of c

Figure 6.8: Van Laar’s law: number of iterations with the same initial points.

100
Percentages of initial points with convergence

90

80

Newton-min
70
NPIPM

60

50

40
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
c

Figure 6.9: Van Laar’s law: percentage of convergence over all initial points.
170 Chapter 6. Numerical experiments on various models

Existence, uniqueness and regularity? Due to the complexity of Van der Waals’ law, it
is difficult to tell anything about the strict convexity of the Gibbs functions gG and gL , the
excess parts of which are given by (3.34). In the binary case, these Gibbs functions can be
numerically plotted as functions of x. Extensive numerical investigations by Le Hénaff [79] have
confirmed that, in general, we do not have strict convexity for two arbitrary pairs pAI , B I q
and pAII , B II q in the subcritical region of the pA, Bq-plane, although there are some “choices”
for which strict convexity holds. As a consequence, there is nothing we can predict about the
existence, uniqueness and regularity of a solution.

Need for domain extension. In general, gG and gL are not even defined on the whole interval
p0, 1q, as explained at length in §3.3.1 and as corroborated by numerical studies. Here, we wish
to illustrate this issue numerically. Let us choose
pAI , B I q “ p0.33, 0.0955q, pAII , B II q “ p0.35, 0.08q
as depicted in Figure 6.10, so as to ensure that each of the Gibbs functions gG and gL is “visually”
strictly convex on its domain of definition, which is not p0, 1q.

Figure 6.10: Van der Waals’ law: pAI , B I q “ p0.33, 0.0955q and pAII , B II q “ p0.35, 0.08q.

We run NPIPM without and with the extension procedures described in §3.3.2–§3.3.3 us-
ing the same initial point pY, ξG I , ξ II , ξ I , ξ II q0 “ p0.8, 0.4, 0.2, 0.2, 0.6q and sweeping over all
G L L
c P t0.001, 0.002, . . . , 0.999u. Figure 6.11 represents Ys at convergence, with the flag value ´1
when NPIPM diverges or “crashes.” Without extension, NPIPM abruptly stops when the cubic
equation has a unique real root. With the direct extension of §3.3.2, the problem is fully avoided.

Numerical results. As we did with Van Laar’s law, we first compare NPIPM and Newton-min
method with the same initial point pY, ξG I , ξ II , ξ I , ξ II q0 “ p0.8, 0.4, 0.2, 0.2, 0.6q. The results are
G L L
provided in Figure 6.12 for the direct extension and in Figure 6.15 for the indirect extension. With
NPIPM, the line search parameters are κ “ 0.4 and % “ 0.99. In the last equation of the system,
we take η “ 10´6 . We run Newton-min and NPIPM for all values of c P t0.001, 0.002, . . . , 0.999u.
The stopping criteria is kF pX qk ă 10´7 . We set the maximum number of iterations to be 50.
Next, we analyze the number of iterations at convergence. The corresponding results are
given in Figure 6.13 for the direct extension and in Figure 6.16 for the indirect extension. The
last test with Van der Waals’ law aims at measuring the percentage of convergence over many
initial points. To this end, we sweep over the set of parameter c P t0.01; 0.02; . . . ; 0.99u. For
each value of c, the set of initial points is
D0 “ pY, ξG I II
, ξLI , ξLII q0 P M5 | 1 ´ pξG I 0 II 0
q ą 0 and 1 ´ pξLI q0 ´ pξLII q0 ą 0 .
(
, ξG q ´ pξG
6.1. Simplified models 171

1
Y solution
0.5

Y solution
0

-0.5

-1
0 0.5 1
c
(a) NPIPM without extension (b) NPIPM with direct extension

Figure 6.11: Van der Waals’ law without extension and with extension for the same initial point.

where M “ t0.2; 0.4; 0.6; 0.8u. The number of initial points used for the tests is |D0 | “ 144.
We count the number of initial points for which the method converges and then display the
percentage of success, in Figure 6.14 for the direct extension and in Figure 6.17 for the indirect
extension.
For the direct extension, the width parameter is ω “ 0.05. For the indirect extension, the
width parameter is ε “ 0.03. One more time, we observe that the new algorithm converges for
all initial points, despite the high complexity of Van der Waals’ law. This behavior is promising.

6.1.2.4 Peng-Robinson’s law

We consider the two-phase binary model (2.83) with Peng-Robinson’s fugacity coefficients (3.53),
namely,

Bi
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs
Bpxq
„ i ?
2Ai pxq
 „ 
B Apxq Zα pxq ` p1 ` 2qBpxq
` ´ ? ln ? , (6.18)
Bpxq Apxq 2 2Bp xq Zα pxq ´ p 2 ´ 1qBpxq

for i P tI, IIu, α P tG, Lu, x P r0, 1s, where Zα pxq is a real root of the cubic equation (3.51), that
is,

Z 3 pxq ` pBpxq ´ 1qZ 2 pxq


` rApxq ´ 2Bpxq ´ 3B 2 pxqsZpxq ` rB 2 pxq ` B 3 pxq ´ ApxqBpxqs “ 0. (6.19)

The mixing rules (3.31b)–(3.32) have been used, i.e.,


` ? ? ˘2
Apxq “ x AI ` p1 ´ xq AII , (6.20a)
Bpxq “ xB I ` p1 ´ xqB II . (6.20b)
172 Chapter 6. Numerical experiments on various models

(a) Newton-min

(b) NPIPM

Figure 6.12: Van der Waals’ law with direct extension, tested with the same initial point.
6.1. Simplified models 173

Average number of iterations: 6.25 (Newton-min), 4.71 (NPIPM)


10

8
Number of iterations

4
Newton-min
NPIPM
3
0 10 20 30 40 50 60 70 80 90 100
Index of c

Figure 6.13: Van der Waals’ law with direct extension: number of iterations with the same initial
point.

100
Percentages of initial points with convergence

95

90

85

80

75 Newton-min
NPIPM

70

65

60
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
c

Figure 6.14: Van der Waals law with direct extension: percentage of convergence over all initial
points.
174 Chapter 6. Numerical experiments on various models

(a) Newton-min

(b) NPIPM

Figure 6.15: Van der Waals’ law with indirect extension, tested with the same initial point.
6.1. Simplified models 175

Average number of iterations: 6.36 (Newton-min), 5.62 (NPIPM)


14
Newton-min
NPIPM
12
Number of iterations

10

2
0 10 20 30 40 50 60 70 80 90 100
Index of c

Figure 6.16: Van der Waals’ law with indirect extension: number of iterations with the same
initial point.

100
Percentages of initial points with convergence

95

90

85

80

75
Newton-min
NPIPM
70

65
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
c

Figure 6.17: Van der Waals law with indirect extension: percentage of convergence over all initial
points.
176 Chapter 6. Numerical experiments on various models

Existence, uniqueness and regularity? Due to the complexity of Peng-Robinson’s law, it


is difficult to tell anything about the strict convexity of the Gibbs functions gG and gL , the excess
parts of which are given by (3.52). In the binary case, the Gibbs functions can be numerically
plotted as functions of x, and we can try to select the pairs pAI , B I q and pAII , B II q in such a
way that gG and gL are “visually” strictly convex on their respective domains of definition. An
example of two such pairs is

pAI , B I q “ p0.322, 0.053q, pAII , B II q “ p0.33, 0.03q

as depicted in Figure 6.18. We carry out numerical simulations with these values.

Figure 6.18: Peng-Robinson’s law: pAI , B I q “ p0.322, 0.053q and pAII , B II q “ p0.33, 0.03q

Numerical results. As we did with Van der Waals’ law, we first compare NPIPM and
Newton-min method with the same initial point pY, ξG I , ξ II , ξ I , ξ II q0 “ p0.2, 0.2, 0.4, 0.4, 0.2q.
G L L
The results are provided in Figure 6.19 for the direct extension and in Figure 6.22 for the indi-
rect extension. With NPIPM, the line search parameters are κ “ 0.4 and % “ 0.99. In the last
equation of the system, we take η “ 10´6 . We run Newton-min and NPIPM for all values of
c P t0.001, 0.002, . . . , 0.999u. The stopping criteria is kF pX qk ă 10´7 . We set the maximum
number of iterations to be 50.
Next, we analyze the number of iterations at convergence. The corresponding results are
given in Figure 6.20 for the direct extension and in Figure 6.23 for the indirect extension. The
last test with Van der Waals’ law aims at measuring the percentage of convergence over many
initial points. To this end, we sweep over the set of parameter c P t0.01; 0.02; . . . ; 0.99u. For
each value of c, the set of initial points is

D0 “ pY, ξG I II
, ξLI , ξLII q0 P M5 | 1 ´ pξG
I 0 II 0
q ą 0 and 1 ´ pξLI q0 ´ pξLII q0 ą 0 .
(
, ξG q ´ pξG

where M “ t0.2; 0.4; 0.6; 0.8u. The number of initial points used for the tests is |D0 | “ 144.
We count the number of initial points for which the method converges and then display the
percentage of success, in Figure 6.21 for the direct extension and in Figure 6.24 for the indirect
extension.
For the direct extension, the width parameter is ω “ 0.05. For the indirect extension, the
width parameter is ε “ 0.03. One more time, we observe that the new algorithm converges for
all initial points, despite the high complexity of Peng-Robinson’s law.
6.1. Simplified models 177

(a) Newton-min

(b) NPIPM

Figure 6.19: Peng-Robinson’s law with direct extension: one initial point.
178 Chapter 6. Numerical experiments on various models

Average number of iterations: 10.05 (Newton-min), 5.67 (NPIPM)


40
Newton-min
35 NPIPM

30
Number of iterations

25

20

15

10

0
0 10 20 30 40 50
Index of c

Figure 6.20: Peng-Robinson’s law with direct extension: number of iterations with the same
initial point.

100
Percentages of initial points with convergence

95

90 Newton-min
NPIPM
85

80

75

70

65

60

55

50
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
c

Figure 6.21: Peng-Robinson’s law with direct extension: percentage of convergence over all initial
points.
6.1. Simplified models 179

(a) Newton-min

(b) NPIPM

Figure 6.22: Peng-Robinson’s law with indirect extension: one initial point.
180 Chapter 6. Numerical experiments on various models

Average number of iterations: 7.81 (Newton-min), 5.81 (NPIPM)


25
Newton-min
NPIPM

20
Number of iterations

15

10

0
0 10 20 30 40 50 60
Index of c

Figure 6.23: Peng-Robinson’s law with indirect extension: number of iterations with the same
initial points.

100
Percentages of initial points with convergence

90

80

70

60

Newton-min
50 NPIPM

40
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
c

Figure 6.24: Peng-Robinson’s law with indirect extension: percentage of convergence over all
initial points.
6.1. Simplified models 181

6.1.3 Stationary ternary model


Let us now go to the more complex case of a two-phase ternary model. With K “ 3, system
(2.77) reads

I
Y ξG ` p1 ´ Y qξLI ´ cI “ 0, (6.21a)
II
Y ξG ` p1 ´ Y qξLII ´ cII “ 0, (6.21b)
I
ξG ΦIG pxIG , xII I I I II
G q ´ ξL ΦL pxL , xL q “ 0, (6.21c)
II II I
ξG ΦG pxG , xII II II I
G q ´ ξL ΦL pxL , xL q
II
“ 0, (6.21d)
III III I
ξG ΦG pxG , xII III III I
G q ´ ξL ΦL pxL , xL q
II
“ 0, (6.21e)
I II III
minpY, 1 ´ ξG ´ ξG ´ ξG q “ 0, (6.21f)
minp1 ´ Y, 1 ´ ξLI ´ ξLII ´ ξLIII q “ 0. (6.21g)

The ternary phase equilibrium problem (6.21) will be considered with three families of fugacity
coefficients in the order of increasing complexity: Henry’s law, Van der Waals’ law and Peng-
Robinson’s law.

6.1.3.1 Henry’s law

The gas phase is ideal, while the liquid phase has constant fugacity coefficents. In other words,

ΦIG ” 1, ΦII
G ” 1, ΦIII
G ” 1, (6.22a)
ΦIL ”k,I
ΦII
L ”k ,II
ΦIII
L ”k . III
(6.22b)

Thanks to the simplicity of (6.22), we can eliminate ξLI , ξLII , ξLIII by substituting ξG
I {k I , ξ II {k II ,
G
III III
ξG {k into (6.21). This leads to the four-equation system

I I
Y ξG ` p1 ´ Y qξG {k I ´ cI “ 0, (6.23a)
II II II
Y ξG ` p1 ´ Y qξG {k ´ cII “ 0, (6.23b)
I II III
minpY, 1 ´ ξG ´ ξG ´ ξG q “ 0, (6.23c)
I I II II III III
minp1 ´ Y, 1 ´ ξG {k ´ ξG {k ´ ξG {k q “ 0, (6.23d)

I , ξ II , , ξ III q P r0, 1s ˆ R ˆ R ˆ R .
in the unknowns pY, ξG G G ` ` `

Regularity of zeros. As a consequence of Proposition 3.1 (strict convexity of the Gibbs


functions) and the general Theorem 5.3 (a special proof for Henry’s law was given §5.2.2), the
s “ pYs , ξsI , ξsII , ξsIII q gives rise to a regular zero X
reference solution X s of the NPIPM system
G G G
F pX q “ 0, provided that it is not a transitional or azeotropic point.

Numerical results. We compare NPIPM with other methods as we did in stratigraphic


model. We fix k I “ 0.2, k II “ 6, k III “ 2. The stopping criteria is kF pX qk ă 10´12 . We set the
maximum number of iterations to be 50. With NPIPM, the line search parameters are κ “ 0.4
and % “ 0.99. In the last equation of the system, we take η “ 10´6 .
182 Chapter 6. Numerical experiments on various models

(a) Newton-min

(b) NPIPM

Figure 6.25: Henry’s law: one initial point.


6.1. Simplified models 183

Average number of iterations: 8.72 (Newton-min), 5.79 (NPIPM)


35
Newton-min
NPIPM
30

25
Number of iterations

20

15

10

0
0 20 40 60 80 100 120
Index of c

Figure 6.26: Henry’s law: number of iterations with the same initial point.

The first test takes place between NPIPM and Newton-min method. Starting from the same
initial point pY, ξG I , ξ II , ξ III q “ p0.9, 0.1, 0.7, 0.1q, we run the two algorithms for all values of
G G
c “ pcI , cII q. In each panel of Figure 6.25, we plot the phase regime for each parameter

c P C “ pcI , cII q P P 2 | cI ` cII ă 1 ,


(

where P “ t0.01; 0.02; . . . ; 0.99u, when the algorithm converges. We assign the blue color to
the gas single-phase regime, the cyan color to the two-phase, the green color to the liquid single-
phase regime, and the red color to the case of divergence. NPIPM (lower panel) converges with
all values of c tested, while Newton-min (upper panel) exhibits many cases of divergence.
The next test with Henry’s law is the number of iterations if the algorithm converges. We
still use the same parameters for the convergence test. However, in Figure 6.26, we display the
number of iterations instead of values of Ys .
In the last test, we sweep over the grid of parameters c P C and the set of initial points

D0 “ pY, ξG
I II
, ξG III 0
, ξG q P M4 | 1 ´ pξG
I 0 II 0
q ´ pξG III 0
q ´ pξG q ą 0 and
I 0 I II 0 II III 0 III
(
1 ´ pξG q {k ´ pξG q {k ´ pξG q {k ą 0 ,

where M “ t0.1; 0.2; . . . ; 0.9u. The number of initial points used for the tests is |D0 | “ 252. For
each c, we count the number of initial points for which the method converges and then plot the
percentage of success for each algorithm in Figure 6.27. Figure 6.27 testifies to the remarkable
efficiency of NPIPM relatively to Newton-min, with 100% of convergence.
184 Chapter 6. Numerical experiments on various models

0.9 100

0.8 90

80
0.7
70
0.6
60
c 2 0.5
50
0.4
40
0.3
30

0.2
20

0.1 10

0 0
0 0.2 0.4 0.6 0.8 1
c1

(a) Newton-min

0.9 100

0.8 90

80
0.7
70
0.6
60
c 2 0.5
50
0.4
40
0.3
30

0.2
20

0.1 10

0 0
0 0.2 0.4 0.6 0.8 1
c1

(b) NPIPM

Figure 6.27: Henry’s law: percentage of convergence over all initial points.
6.1. Simplified models 185

6.1.3.2 Van der Waals’ law

We consider the two-phase ternary model (6.21) with Van der Waals’ fugacity coefficients (3.35),
namely,

Bpxq ` ∇x Bpxq ¨ pδ i ´ xq
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs
Bpxq
Bpxq ` ∇x Bpxq ¨ pδ i ´ xq 2Apxq ` ∇x Apxq ¨ pδ i ´ xq Apxq
„ 
` ´ , (6.24)
Bpxq Apxq Zα pxq
(
for i P tI, II, IIIu, α P tG, Lu, x P pxI , xII q P r0, 1s2 | xI ` xII ď 1 , where Zα pxq is a real root
of the cubic equation (3.33), that is,

Z 3 pxq ´ rBpxq ` 1sZ 2 pxq ` ApxqZpxq ´ ApxqBpxq “ 0. (6.25)

The mixing rules (3.31b)–(3.32) have been used, i.e.,


` ? ? ? ˘2
Apxq “ xI AI ` xII AII ` p1 ´ xI ´ xII q AIII , (6.26a)
I I II II I II III
Bpxq “ x B ` x B ` p1 ´ x ´ x qB . (6.26b)

Existence, uniqueness and regularity? Due to the complexity of Van der Waals’ law, it
is difficult to tell anything about the strict convexity of the Gibbs functions gG and gL , the
excess parts of which are given by (3.34). Thus, there is nothing we can predict about the
existence, uniqueness and regularity of a solution. In the ternary case, the Gibbs functions can
be numerically plotted as functions of x “ pxI , xII q, and we can try to select the pairs pAI , B I q,
pAII , B II q and pAIII , B III q in such a way that gG and gL are “visually” strictly convex on their
respective domains of definition. An example of three such pairs is

pAI , B I q “ p0.33, 0.0955q, pAII , B II q “ p0.35, 0.08q, pAIII , B III q “ p0.355, 0.0953q

as depicted in Figure 6.28. We apply the indirect extension procedure of §3.3.3 with ε “ 0.01.

Figure 6.28: Van der Waals’ law: pAI , B I q “ p0.33, 0.0955q, pAII , B II q “ p0.35, 0.08q and
pAIII , B III q “ p0.355, 0.0953q
186 Chapter 6. Numerical experiments on various models

(a) Newton-min

(b) NPIPM

Figure 6.29: Van der Waals’ law: one initial point.


6.1. Simplified models 187

Average number of iterations: 4.37 (Newton-min), 3.87 (NPIPM)


20
Newton-min
18 NPIPM

16
Number of iterations

14

12

10

2
0 20 40 60 80 100 120 140 160
Index of c

Figure 6.30: Van der Waals’ law: number of iterations with the same initial point.

Numerical results. We first compare NPIPM and Newton-min method with the same initial
I , ξ II , ξ III , ξ I , ξ II , ξ III q0 “ p0.4, 0.2, 0.2, 0.4, 0.4, 0.2, 0.2q. The stopping criteria is
point pY, ξG G G L L L
kF pX qk ă 10´10 . We set the maximum number of iterations to be 50. With NPIPM, the line
search parameters are κ “ 0.4 and % “ 0.99. In the last equation of the NPIPM system, we take
η “ 10´4 . We run Newton-min and NPIPM for all parameters

c P C “ pcI , cII q P P 2 | cI ` cII ă 1 ,


(

where P “ t0.01; 0.02; . . . ; 0.99u, when the algorithm converges. In Figure 6.29, we assign the
blue color to the gas single-phase regime, the cyan color to the two-phase regime, the green
color to the liquid single-phase regime, and the red color for divergence. NPIPM (lower panel)
converges with all c tested, while Newton-min (upper panel) exhibits many cases of divergence.
The next test with Van der Waals’ law is the number of iterations when the algorithms
converge. We still use the same parameters for the convergence test. However, in Figure 6.30, we
display the number of iterations instead of values of Ys . Figure 6.30 shows that when Newton-min
algorithm converges, it converges in fewer iterations than NPIPM.
In the last test, we sweep over the grid of parameters

c P C “ pcI , cII q P P 2 | cI ` cII ă 1 ,


(

where P “ t0.05; 0.10; . . . ; 0.95u and the set of initial points


188 Chapter 6. Numerical experiments on various models

0.9 100

0.8 90

80
0.7
70
0.6
60
c 2 0.5
50
0.4
40
0.3
30

0.2
20

0.1 10

0 0
0 0.2 0.4 0.6 0.8 1
c1

(a) Newton-min

0.9 100

0.8 90

80
0.7
70
0.6
60
c 2 0.5
50
0.4
40
0.3
30

0.2
20

0.1 10

0 0
0 0.2 0.4 0.6 0.8 1
c1

(b) NPIPM

Figure 6.31: Van der Waals’ law: percentage of convergence over all initial points.
6.1. Simplified models 189

D0 “ pY, ξG
I II
, ξG III
, ξG , ξLI , ξLII , ξLIII q0 P M7 | 1 ´ pξG
I 0 II 0
q ´ pξG III 0
q ´ pξG q ą 0 and
I 0 II 0 III 0
(
1 ´ pξL q ´ pξL q ´ pξL q ą 0 ,

where M “ t0.1; 0.2; . . . ; 0.9u. The number of initial points used for the tests is |D0 | “ 64. For
each c, we count the number of initial points for which the method converges and then plot the
percentage of success for each algorithm in Figure 6.31. Figure 6.31 confirms the great efficiency
of NPIPM relatively to Newton-min, with 100% of convergence.

6.1.3.3 Peng-Robinson’s law

We consider the two-phase ternary model (6.21) with Peng-Robinson’ fugacity coefficients (3.53),
namely,

Bpxq ` ∇x Bpxq ¨ pδ i ´ xq
ln Φiα pxq “ rZα pxq ´ 1s ´ ln rZα pxq ´ Bpxqs
Bpxq
Bpxq ` ∇x Bpxq ¨ pδ i ´ xq 2Apxq ` ∇x Apxq ¨ pδ i ´ xq
„ 
` ´
Bpxq Apxq
„ ? 
Apxq Zα pxq ` p1 ` 2qBpxq
¨ ? ln ? , (6.27)
2 2Bpxq Zα pxq ´ p 2 ´ 1qBpxq
(
for i P tI, II, IIIu, α P tG, Lu, x P pxI , xII q P r0, 1s2 | xI ` xII ď 1 , where Zα pxq is a real root
of the cubic equation (3.51), that is,

Z 3 pxq ` pBpxq ´ 1qZ 2 pxq


` rApxq ´ 2Bpxq ´ 3B 2 pxqsZpxq ` rB 2 pxq ` B 3 pxq ´ ApxqBpxqs “ 0. (6.28)

The mixing rules (3.31b)–(3.32) have been used, i.e.,


` ? ? ? ˘2
Apxq “ xI AI ` xII AII ` p1 ´ xI ´ xII q AIII , (6.29a)
Bpxq “ xI B I ` xII B II ` p1 ´ xI ´ xII qB III . (6.29b)

Existence, uniqueness and regularity? Due to the complexity of Peng-Robinson’s law, it


is difficult to tell anything about the strict convexity of the Gibbs functions gG and gL , the
excess parts of which are given by (3.52). There is nothing we can predict about the existence,
uniqueness and regularity of a solution. In the ternary case, the Gibbs functions can be numeri-
cally plotted as functions of x “ pxI , xII q, and we can try to select the pairs pAI , B I q, pAII , B II q
and pAIII , B III q in such a way that gG and gL are “visually” strictly convex on their respective
domains of definition. An example of three such pairs is

pAI , B I q “ p0.322, 0.053q, pAII , B II q “ p0.33, 0.03q, pAIII , B III q “ p0.337, 0.048q

as depicted in Figure 6.32.


190 Chapter 6. Numerical experiments on various models

Figure 6.32: Peng-Robinson’s law: pAI , B I q “ p0.322, 0.053q, pAII , B II q “ p0.33, 0.03q and
pAIII , B III q “ p0.337, 0.048q.

Numerical results. We first compare NPIPM and Newton-min method with the same initial
I , ξ II , ξ III , ξ I , ξ II , ξ III q0 “ p0.4, 0.3, 0.5, 0.1, 0.325, 0.2, 0.17q. The stopping criteria
point pY, ξG G G L L L
is kF pX qk ă 10´10 . We set the maximum number of iterations to be 50. With NPIPM, the
line search parameters are κ “ 0.4 and % “ 0.99. In the last equation of the system, we take
η “ 10´4 . We use indirect extension with ε “ 0.03. We run Newton-min and NPIPM for all
parameters
c P C “ pcI , cII q P P 2 | cI ` cII ă 1 ,
(

where P “ t0.01; 0.02; . . . ; 0.99u when the algorithm converges. In Figure 6.33, we assign the
blue color to the gas single-phase regime, the cyan color to the two-phase regime, the green color
to the liquid single-phase regime, and the red color for divergence. We observe that NPIPM
(lower panel) converges with all values of c tested, while Newton-min (upper panel) exhibits
many cases of divergence.
The next test with Peng-Robinson’s law is the number of iterations if the algorithm converges.
We still use the same parameters for the convergence test. However, in Figure 6.35, we display the
number of iterations instead of values of Ys . Figure 6.35 shows that when Newton-min algorithm
converges, it converges in fewer iterations than NPIPM.
In the last test, we sweep over the grid of parameters

c P C “ pcI , cII q P P 2 | cI ` cII ă 1 ,


(

where P “ t0.05; 0.10; . . . ; 0.95u and the set of initial points

D0 “ pY, ξG
I II
, ξG III
, ξG , ξLI , ξLII , ξLIII q0 P M7 | 1 ´ pξGI 0
q ´ pξG II 0
q ´ pξG III 0
q ą 0 and
1 ´ pξLI q0 ´ pξLII q0 ´ pξLIII q0 ą 0 ,
(

where M “ t0.1; 0.2; . . . ; 0.9u. The number of initial points used for the tests is |D0 | “ 64. For
each c, we count the number of initial points for which the method converges and then plot the
percentage of success for each algorithm in Figure 6.34. Figure 6.34 testifies to the remarkable
efficiency of NPIPM relatively to Newton-min, with 100% of convergence.
6.1. Simplified models 191

(a) Newton-min

(b) NPIPM

Figure 6.33: Peng-Robinson’s law: one initial point.


192 Chapter 6. Numerical experiments on various models

0.9 100

0.8 90

80
0.7
70
0.6
60
c 2 0.5
50
0.4
40
0.3
30

0.2
20

0.1 10

0 0
0 0.2 0.4 0.6 0.8 1
c1

(a) Newton-min

0.9 100

0.8 90

80
0.7
70
0.6
60
c 2 0.5
50
0.4
40
0.3
30

0.2
20

0.1 10

0 0
0 0.2 0.4 0.6 0.8 1
c1

(b) NPIPM

Figure 6.34: Peng-Robinson’s law: percentage of convergence over all initial points.
6.1. Simplified models 193

Average number of iterations: 6.79 (Newton-min), 4.62 (NPIPM)


16
Newton-min
NPIPM
14

12
Number of iterations

10

2
0 10 20 30 40 50 60 70 80 90
Index of c

Figure 6.35: Peng-Robinson’s law: number of iterations with the same initial point.

6.1.4 Evolutionary binary model


Continuous model. In the two-phase binary model (2.83), the global fraction of the first com-
ponent c is a given data. We now consider a more sophisticated model in which this composition
depends on time. The model consists of an algebro-differential system
ˆ ˙
dc I 1
´ Y p1 ´ Y qξG 1 ´ I “ 0, (6.30a)
dt k
I I
Y ξG ` p1 ´ Y qξG {k I ´ c “ 0, (6.30b)
I II
minpY, 1 ´ ξG ´ ξG q “ 0, (6.30c)
I
minp1 ´ Y, 1 ´ ξG {k I ´ ξG
II II
{k q “ 0 (6.30d)
I , ξ II q, equipped with the intial condition
in the four unknowns pc, Y, ξG G

I II I II
pc, Y, ξG , ξG qpt “ 0q “ pc0 , Y0 , pξG q0 , pξG q0 q (6.31)

subject to the equilibrium relations


I II
Y0 pξG q0 ` p1 ´ Y0 qpξG q0 {k I ´ c0 “ 0, (6.32a)
I II
minpY0 , 1 ´ pξG q0 ´ pξG q0 q “ 0, (6.32b)
I
minp1 ´ Y0 , 1 ´ pξG q0 {k I ´ II
pξG q0 {k II q “ 0. (6.32c)

Henry’s law with k I , k II ą 0 have been implicitly used.


194 Chapter 6. Numerical experiments on various models

Let KL , KG be the constants defined by (6.11). It can then be easily proven that the exact
solution of (6.30)–(6.32) is given by
$

’ c0 if c0 P r0, KL s,

&
cptq “ KG γ0 expptq ` KL (6.33)
if c0 P pKL , KG q,


’ γ0 expptq ` 1
%
c0 if c0 P rKG , 1s,

where
c0 ´ KL
γ0 “ . (6.34)
KG ´ c0
I ptq and ξ II ptq are deduced from cptq by formulas (6.12) [Proposition 6.1].
The values of Y ptq, ξG G

Discretized system. But our primary interest is the algebraic system that arises when we
apply the Euler backward scheme to (6.30) with a time-step ∆t ą 0. This system reads
ˆ ˙
1 I
c ´ c5 ´ τ 1 ´ I ξG Y p1 ´ Y q “ 0, (6.35a)
k
I I
Y ξG ` p1 ´ Y qξG {k I ´ c “ 0, (6.35b)
I II
minpY, 1 ´ ξG ´ ξG q “ 0, (6.35c)
I
minp1 ´ Y, 1 ´ ξG {k I ´ ξG
II II
{k q “ 0, (6.35d)

where the notations have been changed from ∆t to τ , from cn to c5 and from pc, Y, ξG I , ξ II qn`1
G
I II I II
to pc, Y, ξG , ξG q. In (6.35), c5 P r0, 1s, τ ą 0 and k ą 1 ą k ą 0 play the role of parameters.
The upcoming Theorem addresses the question of its solutions.

Proposition 6.2. Let KL , KG be the constants defined by (6.11). Except for the case 3(b) in the
c, Ys , ξsIG , ξsII
enumeration below, system (6.35) has a unique solution ps G q P r0, 1s ˆ r0, 1s ˆ R` ˆ R`
called reference solution.

1. If c5 P rKG , 1s, then the reference solution is in the G single-phase regime and given by

c “ c5 ,
s Ys “ 1, ξsIG “ c5 , ξsII
G “ 1 ´ c5 . (6.36)

2. If c5 P pKL , KG q, then the reference solution is in the two-phase regime and given by
" „ 1{2 *
KG ` KL KG ´ KL KG ` KL ´ 2c5 2
c“
s ´ 1´ 1´2 τ `τ . (6.37)
2 2τ KG ´ KL

The values of Ys , ξsIG and ξsII c by formulas (6.12) [Proposition 6.1].


G are deduced from s

3. If c5 P r0, KL s, then the number


dˆ ˙2
KG ` KL ´ 2c5 KG ` KL ´ 2c5
τmax “ ` ´1 (6.38)
KG ´ KL KG ´ KL

is well-defined and greater than or equal to 1.


6.1. Simplified models 195

(a) For τ ă τmax , the reference solution is in the L single-phase regime and given by

c “ c5 ,
s Ys “ 0, ξsIG “ k I c5 , ξsII II
G “ k p1 ´ c5 q; (6.39)

(b) For τ ě τmax , in addition to (6.39) that we declare to be the reference solution, there
are two spurious solutions (counted with multiplicity).

Chứng minh. The last three equations of model (6.35) are exactly the stationary binary model
I , ξ II q can be expressed as functions of c by means of (6.12). In particular,
(6.10). Therefore, pY, ξG G

c ´ KL
Y “ 1 pcq
KG ´ KL pKL ,KG q
for all phase regimes, using the characteristic function 1. Inserting this into the first equation
(6.35a) and invoking k I “ KG {KL , we obtain a scalar equation on c, namely,
τ
c ´ c5 ` pc ´ KL qpc ´ KG q 1pKL ,KG q pcq “ 0. (6.40)
KG ´ KL
The rest of the proof relies on studying the function representing the left-hand side of the above
equation. This part is not difficult and is left to the readers.

Remark 6.1. The choice s c “ c5 for the reference solution in case 3(b) is really natural insofar
as this is the continuous extension —with respect to τ — of the reference solution of case 3(a).

Regularity of zeros. The most significant result for this model is that the reference solution
corresponds most of the time to a regular zero.

Theorem 6.1. For all τ ě 0, the reference solution of (6.35) defined in Proposition 6.2 gives
rise to a regular zero for the NPIPM system, except at transitional and azeotropic points.
I , ξ II q. Define
Chứng minh. Let X “ pc, Y, ξG G
„ 
c ´ c5 ´ τ p1 ´ 1{k I q ξG
I Y p1 ´ Y q
ΛpXq “ I ` p1 ´ Y q ξ I {k I ´ c ,
Y ξG G

and „  „ 
Y 1 ´ ξGI ´ ξ II
GpXq “ , HpXq “ G .
1´Y 1 ´ ξG {k I ´ ξG
I II {k II

By Lemma 5.4 and Lemma 4.4, we can study the sign of

∇ΛpXq
s
d“
∇GpXq s ` ∇HpXq
s d HpXq s ,
s d GpXq

where X s “ pc, Ys , ξsI , ξsII q is the reference solution, instead of the sign of det ∇F pX
s q or det ∇FpXq.
s
G G
In this case, we have

1 ´τ ∆ξsI p1 ´ 2Ys q ´τ ∆ξsI Ys p1 ´ Ys q{ξsG


I 0
´1 ∆ξs I Ys ` p1 ´ Ys q{k I 0
d“ ,
0 1´σ sG ´Ys ´Ys
0 ´1 ` σ sL pYs ´ 1q{k I pYs ´ 1q{k II
196 Chapter 6. Numerical experiments on various models

with
∆ξsI “ ξsG
I
´ ξsLI “ ξsG
I
p1 ´ 1{k I q, σ I
sG “ ξsG II
` ξsG , sL “ ξsLI ` ξsLII .
σ
Expanding the determinant with respect to the first column, we find

d “ d0 ´ τ d1 , (6.41)

where
∆ξsI Ys ` p1 ´ Ys q{k I 0
d0 “ 1 ´ σ
sG ´Ys ´Ys
´1 ` σ
sL pYs ´ 1q{k I pYs ´ 1q{k II
is the determinant of the stationary binary model and was already computed in §5.2.2, and

∆ξsI p1 ´ 2Ys q ∆ξsI Ys p1 ´ Ys q{ξsG


I 0
d1 “ 1´σ sG ´Ys ´Ys .
´1 ` σ sL pY ´ 1q{k
s I pY ´ 1q{k
s II

sG “ 1. From §5.2.2, we know


Assume Ys “ 1, i.e., the solution is in the gas phase. Then, σ
that d0 “ 1 ´ σ
sL . By a direct computation, we have d1 “ 0. Therefore, d “ d0 “ 1 ´ σ sL ě 0.
Equality holds at a transition point. The other single-phase case Y “ 0 is similar.
s
Assume now Ys P p0, 1q, i.e., the solution is in the two-phase regime. Then, σsG “ σ
sL “ 1,
ξ G “ xG and ξ L “ xL . From §5.2.2, we know that

´Ys ´Ys
xI
d0 “ ∆s
pY ´ 1q{k pY ´ 1q{k II
s I s

can be expressed as a quadratic form and hence d0 ě 0, with equality if and only if xG “ xL ,
namely, at an azeotropic point. Let us compute d1 . By expanding with respect to its first column
and by noticing that the, we obtain

d1 “ p1 ´ 2Ys q d0 .

Coming back to (6.41), we get


d “ d0 r1 ´ τ p1 ´ 2Ys qs.
From (6.37), we infer by (6.12) that
„ 1{2
KG ` KL ´ 2c5 2
τ p1 ´ 2Y q “ 1 ´ 1 ´ 2
s τ `τ ă 1.
KG ´ KL

Consequently, d has the same sign behavior as d0 . This completes the proof.

Numerical results. We compare NPIPM with Newton-min. We fix k I “ 2, k II “ 0.5. The


stopping criterion is kF pX qk ă 10´7 . We set the maximum number of iterations to be 50. If the
number of iterations of the algorithm exceeds this maximum number, the case will be considered
as divergent. With NPIPM, the parameters for the line search are κ “ 0.4 and % “ 0.99. In the
last equation of the NPIPM system, we take η “ 10´6 .
We sweep over the grid of parameters
(
pc5 , τ q P t0.01; 0.02; . . . ; 0.99u ˆ 0.1; 0.2; . . . ; 10 .
6.1. Simplified models 197

10 100

9 90

8 80

7 70

6 60

5 50

4 40

3 30

2 20

1 10

0 0
0 0.2 0.4 0.6 0.8 1
cb

(a) Newton-min

10 100

9 90

8 80

7 70

6 60

5 50

4 40

3 30

2 20

1 10

0 0
0 0.2 0.4 0.6 0.8 1
cb

(b) NPIPM

Figure 6.36: Evolutionary binary model: percentage of convergence over all initial points.
198 Chapter 6. Numerical experiments on various models

and the set of initial points


D0 “ pY, ξG
I II
, cq0 P M4 | 1 ´ pξG
I 0 II 0 I 0 I II 0 II
(
, ξG q ´ pξG q ą 0 and 1 ´ pξG q {k ´ pξG q {k ą 0
where M “ t0.1; 0.2; . . . ; 0.9u. The number of initial points used for the tests is |D0 | “ 1944.
For each pair pc5 , τ q, we count the number of initial points for which the method converges and
then plot the percentage of success for each algorithm. The results are shown in Figure 6.36.
The specific case τ “ 1 is highlighted in Figure 6.37.

100
Percentages of initial points with convergence

90

80 Newton-min
NPIPM

70

60

50

40
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
c

Figure 6.37: Evolutionary binary model with τ “ 1.

6.2 Multiphase compositional model


After the simple models of the previous section, we now consider a relatively realistic multiphase
compositional fluid flow model used at IFPEN. Our purpose is to compare NPIPM to the
Newton-min method on this model developed in Fortran 90.

6.2.1 Continuous model


In this model, there can be up to three phases, namely,
P “ tW, O, Gu,
where W stands for water, O stands for oil and G stands for gas. Moreover, the water phase is
assumed to be pure and immiscible, that is, it contains only one component referred to as H2 O
and this component does not appear in the two other phases.
(
K “ I, II, . . . , K
6.2. Multiphase compositional model 199

be the set of hydrocarbon components, with K ě 2. As a consequence of the previous assumption


on the water phase, the hydrocarbons are present only in the oil and gas phases, which are
mixable and compositional. Assuming that the medium is isotherm with fixed temperature T,
we consider the following problem.

GIVEN
φ, ρ˝W , tρα uαPPztW u , tΦiα upi,αqPKˆPztW u , tλα uαPP , tQα uαPP ,

FIND
tSα uαPP , tξαi upi,αqPKˆPztW u , tuα uαPP , P

as functions of pχ, tq P Dχ ˆ R` , where Dχ Ă R2 is a bounded domain, satisfying

• the mass conservation of H2 O and hydrocarbons

B ˝
φ pρ SW q ` divχ pρ˝W uW q “ qW , (6.42a)
Bt W
B i i i i
φ pρO SO ξO ` ρG SG ξG q ` divχ pρO ξO uO ` ρG ξG uG q “ q i , (6.42b)
Bt
for all i P K, where the source terms are given by

qW “ ρ˝W QW ,
q i “ ρO ξO
i i
QO ` ρG ξG QG ;

• the conservation of volume ÿ


Sα ´ 1 “ 0; (6.42c)
αPP

• the extended fugacity equalities


i i i i
ξO ΦO pxO , Pq “ ξG ΦG pxG , Pq, @i P K, (6.42d)

where the components of xα “ pxIα , . . . , xαK´1 q P RK´1 are defined as

ξαi
xiα “ ř j
;
jPK ξα

• the complementarity conditions


ˆ ÿ ˙
min Sα , 1 ´ ξαi “ 0, @α P PztW u; (6.42e)
iPK

• the Darcy-Muskat law


uα “ ´λα ∇χ P, @α P P. (6.42f)

• homogeneous Neumann boundary conditions on BDχ .


200 Chapter 6. Numerical experiments on various models

The fugacity coefficents Φiα , α P tO, Gu, are those of the Peng-Robinson cubic law, elaborated
on in §3.2, where the liquid phase L has been replaced by the oil phasse O.
In comparison with the introductory model (1.4), there are two additional features. Firstly,
the phase densities ρα for α P tO, Gu are no longer constant. Instead, they are now known func-
tions of the pressure P and the extended composition ξ α , in order to account for the compress-
ibility of the flow. Secondly, the source terms qW and q i in (6.42a)–(6.42b) represent injection
and production wells located in the domain. The functions Qα are concentrated in space and
depend on time by means of some given scenarios.
In practice, we do not really retain the velocity fields uα as unknowns. To reduce the size of
the system, the velocities uα are eliminated by means of the last equation (6.42f). The number
of remaining unknown scalar fields and equations is then equal to 2K ` 4. The compositional
multiphase model (6.42) is a PDE system, stated at the continuous level. It has to be discretized
in space and in time.

6.2.2 Discretized system and resolution


We use the cell centered finite volume method with an upstream two point flux discretization as
spatial discretization [4, 12, 84, 101] and the backward Euler method with variable time step for
the time discretization. Let Mh be an admissible finite volume mesh of the reservoir Dχ , a generic
control volume (or cell) of which are denoted by V. Let |Mh | be the number of volumes. We also
introduce an increasing sequence of discret times ttn u0ďnďN such that t0 “ 0 and tN “ T . The
vectors of the discrete unknowns in each finite volume V and at each time tn are denoted by

XVn “ PnV , pSW qnV , pSG qnV , pξO


I n K n I n K n
qV P R2K`3 ,
` ˘
qV , . . . , pξO qV , pξG qV , . . . , pξG

which gives rise to a global unknown vector

Xhn “ tXVn uVPMh P Rp2K`3q|Mh | .

Here, we have implicitly eliminated SO from the set of unknowns by using SO “ 1 ´ SW ´ SG


from equation (6.42c). Therefore, in order to go from tn to tn`1 , we need to solve a nonlinear
system of the form

Λh pXhn`1 q “ 0, (6.43a)
minpGh pXhn`1 q, Hh pXhn`1 qq “ 0. (6.43b)

The vector Λh pXhn`1 q “ tΛV pXhn`1 quVPMh P Rp2K`1q|Mh | contains the discretized conservation laws
(6.42a)–(6.42b) and the extended equilibrium equations (6.42d). Note that the argument of ΛV
is Xhn`1 and not XVn`1 , since the discretization of conservation laws (6.42a)–(6.42b) in a given
control volume involves its neighbor cells. Meanwhile,

Gh pXhn`1 q “ tGV pXVn`1 quVPMh P R2|Mh | , Hh pXhn`1 q “ tHV pXVn`1 quVPMh P R2|Mh | ,

come from (6.42e) and are strictly local to each cell, with

1 ´ pSW qn`1 ´ pSG qVn`1 i qn`1


„  „ ř 
1 ´ iPK pξG
GV pXVn`1 q “ V , HV pXVn`1 q “ V
i qn`1 .
pSG qn`1
ř
V 1 ´ iPK pξO V
6.2. Multiphase compositional model 201

Newton-min method. At each time-step tn Ñ tn`1 , after combining all equations over all
finite volumes V P Mh , we have a system of p2K ` 3q|Mh | equations and then apply Newton-min
method to solve this system. In particular, if K “ 3 the system has 9|Mh |. It is natural to choose
the solution Xhn “ tXVn uVPMh at time tn as the initial point pXhn`1 q0 when applying the Newton-
min solver to (6.43). To alleviate notations, we shall henceforth omit the time label n ` 1 in all
variables.

NPIPM. When applying NPIPM, we normally need to add three slack variables per cell. This
introduces 3 extra variables per cell, as well as one extra global variable ν. The system to be
solved will have p2K ` 7q|Mh | ` 1 equations. In particular, if K “ 3, the system has 13|Mh | ` 1
equations. At each iteration, the Jacobian matrix must be inverted. In comparison to Newton-
min, the complexity of this task has thus increased by the ratio pp13|Mh | ` 1q { 9|Mh |q2 « 2. To
avoid this waste of resource, we will add to our system just one extra variable ν and no explicit
slack variable. With NPIPM, we need initial points which satisfy the positivity of the arguments
in complementarity conditions. Since Xhn is not a strictly interior point, we cannot use it as an
intial point. Instead, we will have to modify it to obtain an appropriate value for pXhn`1 q0 .

6.2.3 Comparison of the results


We will compare NPIPM to the Newton-min method, which is currently used in IFPEN’s code
for the multiphase compositional model by means of two selected test settings. In order to reflect
the different physical phenomena present in these test cases, the following models are chosen.
In the triphasic cases, in which water oil and gas are present, the Brooks and Corey model is
used for the relative permeabilities. The relative permeability of the oil is computed from the
previous model and from the Stone II model [112]. The other physical properties of oil and gas
such as the fugacities and the densities are computed using the Peng-Robinson cubic law and
for the computation of the viscosities the Lohrenz-Bray-Clark model [83] is used. The properties
of water (density and viscosity) are computed using data from [45].

Test of CO2 injection in a three-component system. The first case is a miscible gas
(CO2 ) injection in a two-dimensional quarter of five-spot saturated with oil. The domain has a
size of 100m in both directions and it is discretized using |Mh | “ 20 ˆ 20 regular grid blocks. The
reservoir model is homogeneous: the permeability is equal to 500 mD and the porosity is 0.3.
The gas, composed only of CO2 , is injected with a constant rate that is equal to 80 m3 /day and
the pressure at the producer is fixed to 55 bar. The temperature is assumed to be constant at
80o C and the initial pressure is equal to 95 bar.
The total simulation time is 30 days, the initial time step is 0.05 day and the minimum and
maximum time step are respectively 10´5 day and 20 days. The initial water saturation is given
by SW “ 0.25 and the oil saturation is equal to 1 ´ SW . The oil and gas phases are a mixture of
three components K “ tC1 , C6 , CO2 u and the initial oil composition is given by C1 (20%), C6
(80%) and CO2 (0%).

Time steps Number of iterations Restarts


Newton-min 34 164 1
NPIPM 33 199 0

Table 6.1: Three-component system: numerical results of Newton-min method and NPIPM.
202 Chapter 6. Numerical experiments on various models

(a) Newton-min (b) NPIPM

(c) Newton-min (d) NPIPM

Figure 6.38: Gas saturation and partial fraction of component CO2 in gas phase after 30 days:
Newton-min method and NPIPM.
6.2. Multiphase compositional model 203

(a) Newton-min (b) NPIPM

(c) Newton-min (d) NPIPM

Figure 6.39: CO2 injection in a seven-component system: gas saturation and CO2 molar compo-
nent in gas phase after 100 days.

Test of CO2 injection in a seven-component system. The second case study still simu-
lates a CO2 injection in a three-dimensional quarter of five-spot saturated with oil. The reservoir
size is 100 ˆ 100 ˆ 20 m and we use |Mh | “ 20 ˆ 20 ˆ 4 grid blocks to discretize the reservoir
model. The fluid is a seven-component mixture K “ tC1 N2 , C2 , CO2 , C46 , C712 , C1319 , C` 20 u,
with the following initial composition : C1 N2 (38.8209%), C23 (14.5821%), CO2 (2.2685%), C46
(11.9334%), C712 (19.4598%), C1319 (8.7079%) and C` 20 (4.2274%). The initial pressure and tem-
perature are respectively 200 bar and 132.77˝ C. The CO2 is injected with a fixed rate of 200
m3 /day and the production pressure is 150 bar.

Time steps Number of iterations Restarts


Newton-min 43 175 0
NPIPM 43 179 0

Table 6.2: Seven-component system: numerical results of Newton-min method and NPIPM.

Results and discussions. Figures 6.38 and 6.39 display the spatial distribution of the gas
saturation SG and the partial fraction of CO2 in the gas phase at the end of the simulation
obtained by Newton-min and NPIPM algorithms. For each test, the two algorithms give the
same physical results in terms of saturations, pressure and molar fractions. Tables 6.2 and 6.1
summarize the numerical results in terms of number of time steps, number of Newton iterations
204 Chapter 6. Numerical experiments on various models

and number of restarted time-steps for each case test. We observe that NPIPM converges at
every time step and does not need to restart by dividing the time-step by 2. However, NPIPM
takes a few more iterations. Further analysis shows that this is due to the choice of the initial
point, since NPIPM needs to start at interior point whereas Newton-min method uses the state
at the previous time-step as a starting point. For this realistic model, it was not easy to find a
good strategy to go back inside this region without taking several iterations to converge. Other
warm start strategies are under investigation.
While the four simplified models of §6.1 were simple enough to be implemented using Matlab,
the multiphase compositional model (6.42) required partially existing subroutines for realistic
physical closure laws and was therefore implemented in a heavier Fortran prototype. Due to a lack
of time, we were unable to code the domain extension for Peng-Robinson’s law in this prototype.
This is the reason why we observed that when one of the phases (oil or gas) disappears, the two
algorithms abruptly stopped because the cubic equation has a unique real root. Naturally, the
extension procedure described in §3.3.3.2 should be added to overcome this issue.
Chapter 7

Conclusion and perspectives


Contents
7.1 Summary of key results . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
7.1.1 Theoretical aspects of the unified formulation . . . . . . . . . . . . . . . 205
7.1.2 Practical algorithms for the numerical resolution . . . . . . . . . . . . . 206
7.2 Recommendations for future research . . . . . . . . . . . . . . . . . . 206
7.2.1 Warm start strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
7.2.2 Continuation Newton for large time-steps . . . . . . . . . . . . . . . . . 207

7.1 Summary of key results


In response to the objectives stated in §1.1.3, we have conducted research works in two distinct
but interrelated directions. The corresponding developments and contributions have given rise
to several presentations at national and international conferences. We are now finalizing two
scientific publications directly related to the thesis.

7.1.1 Theoretical aspects of the unified formulation


The first direction, presented in Part I (chapters §2–§3), is concerned with a better mathematical
understanding of the unified formulation for the phase equilibrium problem. It was not initially
planned as such, but became increasingly evident as our investigations progressed. Let us single
out the most prominent results of this part.
When postulated as a founding model, the unified formulation is able to recover all the
properties known to physicists on phase equilibrium. Indeed, the complementary equations do
encapsulate the tangent plane criterion [Theorem 2.1], which cannot be derived from the nat-
ural variable formulation alone, without the help of some extra stability analysis. The unified
formulation can also be regarded as a characterization of a constrained minimization problem
[Theorems 2.3 and 2.4], in which the objective function is some modified Gibbs energy of the
mixture. This characterization is slightly stronger than the usual KKT optimality conditions,
insofar as it implies a choice (by a continuity principle) of one among an infinity of minimizers
when a phase vanishes.
The possibility of assigning well-defined values to the extended fractions of an absent phase
appears to be a theoretical strength of the unified formulation. Upon closer inspection, however,
this possibility can only be achieved if the Gibbs functions meet some restrictive requirements

205
206 Chapter 7. Conclusion and perspectives

[Hypotheses 2.2]. In particular, they must be strictly convex over the whole domain of frac-
tions. Shedding light on the favorable assumptions for the unified formulation in terms of Gibbs
functions is perhaps the most consequential outcome of this part.
Unfortunately, Hypotheses 2.2 are not satisfied by all commonly used Gibbs functions. In
these circumstances, the obligation of assigning well-defined values to the extended fractions of
an absent phase becomes a weakness that dangerously jeopardizes the whole unified approach.
This is especially true for Gibbs functions derived from cubic equations of states, for which
they are not even defined on the whole domain of fractions. The extension procedures proposed
in §3.3 is another substantial contribution, which is merely aimed at improving the “survival”
chance of the unified formulation.

7.1.2 Practical algorithms for the numerical resolution


The second direction, presented in Part II (chapters §4–§6), deals with numerical methods.
We reviewed and implemented several existing algorithms in the family of semismooth methods
(Newton-min) and that of smoothing methods (θ-regularization, Mehrotra’s interior-point), each
having the line search option. These were tested on a hierarchy of models including not only
stationary binary and ternary two-phase mixtures but also evolutionary models.
The need for a new method appeared very soon. On the ground of previous numerical results,
we deemed interior-point methods to be a sound basis and built the NPIPM variant, in which the
regularization parameter receives the same status as the unknowns. The superiority of NPIPM
over Newton-min was overwhelming for small test cases. Therefore, it came as a disappointment
that on the big test cases corresponding to a real flow model, NPIPM could not achieve the same
astounding success. For some injection scenarios, it even performed rather poorly in comparison
with Newton-min.
The difference with small test cases lies in the initial point. For these, it was easy to start
with a good interior point. For the full flow model, the natural initial point is the state at the
previous time-step. However, because of thermodynamic equilibrium, this state is always on the
boundary of the interior region, and so far we do not have any good strategy to go back inside this
region. Taking inspiration from existing work in optimization around warm start strategies, we
have tried several perturbation techniques of the current state. However, we remain dissatisfied
and believe that there is still even better to do.

7.2 Recommendations for future research


We outline two avenues to pursue this work. The first one is a technique that could lead to a
good initial point for NPIPM on the full flow model. The second one is a further improvement
that could be essential for large time-steps.

7.2.1 Warm start strategy


At least in the context of optimization problems, interior-point methods work by following some
central path to an optimal solution. In practice, one needs to start the algorithm at a well-
centered interior point. Any even small change in the objective function or in the constraints
can cause the optimal solution from the previous version of the problem to move to the boundary
and thus to be far from the central path for the new problem, so the algorithm takes several
iterations to get back near the central path and to converge.
7.2. Recommendations for future research 207

This well-known issue can be addressed by using smart perturbations of the current iterate.
There are relatively few papers discussing these strategies for warm starting (see [64, 121], for
instance). In some particular situations (linear programs), some of the strategies prove to be
efficient and reduce significantly the number of iterations. In our problems, we still need to
deeply understand what is a well-centered point and how to perturb the current state in order
to get closer to such a point.

7.2.2 Continuation Newton for large time-steps


Another source of stiffness unfavorable to Newton convergence for evolutionary problems lies in
a too large size of the time-step ∆t, which is allowed by the backward Euler time-discretization.
As a remedy, Younis et al. [122] suggested a continuation Newton procedure, in which the iterates
match with intermediate times instead of being all targeted at tn ` ∆t. This idea rests upon
homotopic continuation, which is not easy not implement.
It turns out that we can use the same “trick” as in NPIPM to work out a more automatic
version of this idea. We sketch out this prospect for the differential equation
dX
“ ´f pXq, (7.1)
dt
where f is a continuously differentiable function. By the backward Euler scheme
X ´ Xb
“ ´f pXq, (7.2)
∆t
where X is the value at the next time-step and Xb the state at the current time-step, we are led
to solving the nonlinear system
X ` ∆tf pXq ´ Xb “ 0. (7.3)
When ∆t is small, the nonlinearity is “mild.” As ∆t grows larger and larger, we may run into
trouble. Instead of decreasing the time-step, we consider the equivalent system

X ` p1 ´ νq∆tf pXq ´ Xb “ 0, (7.4a)


ν “ 0, (7.4b)

where ν is considered as a new variable. Following the same lines as in §5.1.1, we arrive at
another enlarged system, i.e.,

X ` p1 ´ νq∆tf pXq ´ Xb “ 0, (7.5a)


2
tcoupling termsu ` ην ` ν “ 0, (7.5b)

where η ą 0 is a small parameter. The last system can be solved by the classical Newton method
in the unknown pX, νq, starting from the initial point pXb , 1q.
208 Chapter 7. Conclusion and perspectives
Bibliography

[1] A. Abadpour and M. Panfilov, Method of negative saturations for modelling two-phase
compositional flows with oversaturated zones, Transp. Porous Media, 79 (2009), pp. 197–
214, https://doi.org/10.1007/s11242-008-9310-0.

[2] V. Acary and B. Brogliato, Numerical Methods for Nonsmooth Dynamical Systems:
Applications in Mechanics and Electronics, vol. 35 of Lecture Notes in Applied and Com-
putational Mechanics, Springer, Berlin, 2008.

[3] M. Aganagić, Newton’s method for linear complementarity problems, Math. Program.,
28 (1984), pp. 349–362, https://doi.org/10.1007/BF02612339.

[4] O. Angelini, C. Chavant, E. Chénier, R. Eymard, and S. Granet, Finite volume


approximation of a diffusion-dissolution model and application to nuclear waste storage,
Math. Comput. Simul., 81 (2011), pp. 2001–2017, https://doi.org/10.1016/j.matcom.
2010.12.016. MAMERN 2009: 3rd International Conference on Approximation Methods
and Numerical Modeling in Environment and Natural Resources.

[5] L. Armijo, Minimization of functions having Lipschitz continuous first partial derivatives,
Pacif. J. Math., 16 (1966), pp. 1–3, https://doi.org/10.2140/pjm.1966.16.1.

[6] L. Asselineau, G. Bogdanic, and J. Vidal, A versatile algorithm for calculating


vapour-liquid equilibria, Fluid Phase Equilibria, 3 (1979), pp. 273–290.

[7] A. Auslender, R. Cominetti, and M. Haddou, Asymptotic analysis for penalty and
barrier methods in convex and linear programming, Math. Oper. Res., 22 (1997), pp. 43–62,
https://doi.org/10.1287/moor.22.1.43.

[8] K. Aziz and A. Settari, Petroleum Reservoir Simulation, Applied Science Publishers,
London, 1979.

[9] L. Beaude, K. Brenner, S. Lopez, R. Masson, and F. Smai, Non-isothermal com-


positional liquid gas Darcy flow: formulation, soil-atmosphere boundary condition and ap-
plication to high-energy geothermal simulations, Comput. Geosci., 23 (2019), pp. 443–470,
https://doi.org/10.1007/978-3-319-57394-6_34.

[10] A. Beck and M. Teboulle, Smoothing and first order methods: A unified framework,
SIAM J. Optim., 22 (2012), pp. 557–580, https://doi.org/10.1137/100818327.

[11] I. Ben Gharbia, Résolution de problèmes de complémentarité. : Application à un écoule-


ment diphasique dans un milieu poreux, PhD thesis, Université Paris Dauphine (Paris IX),
December 2012, http://tel.archives-ouvertes.fr/tel-00776617.

209
210 Bibliography

[12] I. Ben Gharbia and É. Flauraud, Study of compositional multiphase flow formulation
using complementarity conditions, Oil Gas Sci. Technol., 74 (2019), p. 43, https://doi.
org/10.2516/ogst/2019012.

[13] I. Ben Gharbia, É. Flauraud, and A. Michel, Study of compositional multi-phase


flow formulations with cubic EOS, in SPE Reservoir Simulation Symposium, 23-25 Febru-
ary, Houston, Texas, USA, vol. 2, 01 2015, pp. 1015–1025, https://doi.org/10.2118/
173249-MS.

[14] I. Ben Gharbia and J. C. Gilbert, Nonconvergence of the plain Newton-min algorithm
for linear complementarity problems with a P-matrix, Math. Prog., 134 (2012), pp. 349–
364, https://doi.org/10.1007/s10107-010-0439-6.

[15] I. Ben Gharbia and J. C. Gilbert, An algorithmic characterization of P-matricity,


SIAM J. Matrix Anal. Appl., 34 (2013), pp. 904–916, https://doi.org/10.1137/
120883025.

[16] I. Ben Gharbia and J. C. Gilbert, An algorithmic characterization of P-matricity II:


adjustments, refinements, and validation, SIAM J. Matrix Anal. Appl., 40 (2019), pp. 800–
813, https://doi.org/10.1137/18M1168522.

[17] I. Ben Gharbia and J. Jaffré, Gas phase appearance and disappearance as a problem
with complementarity constraints, Math. Comput. Simul., 99 (2014), pp. 28–36, https:
//doi.org/10.1016/j.matcom.2013.04.021.

[18] A. Ben-Tal and M. Teboulle, A smoothing technique for nondifferentiable optimiza-


tion problems, in Optimization, S. Dolecki, ed., Berlin, Heidelberg, 1989, Springer Berlin
Heidelberg, pp. 1–11, https://doi.org/10.1007/BFb0083582.

[19] M. Bergounioux and M. Haddou, A new relaxation method for a discrete image
restoration problem, J. Convex Anal., 17 (2010), pp. 861–883, http://www.heldermann.
de/JCA/JCA17/JCA173/jca17055.htm.

[20] S. C. Billups and K. G. Murty, Complementarity problems, J. Comput. Appl. Math.,


124 (2000), pp. 303–318, https://doi.org/10.1016/S0377-0427(00)00432-5. Numeri-
cal Analysis 2000. Vol. IV: Optimization and Nonlinear Equations.

[21] F. Bonnans, Optimisation continue: cours et problèmes corrigés, Mathématiques ap-


pliquées pour le Master, Dunod, 2006.

[22] J. F. Bonnans, J. C. Gilbert, C. Lemaréchal, and C. A. Sagastizábal, Numeri-


cal Optimization: Theoretical and Practical Aspects, Universitext, Springer Verlag, Berlin,
2006.

[23] V. Bouvier, Algorithmes de résolution compositionnnelle dans TACITE, tech. report,


Institut Français du Pétrole, 1995. 42485.

[24] S. Boyd and L. Vandenberghe, Convex Optimization, Berichte über verteilte messys-
teme, Cambridge University Press, Cambridge, UK, 2004.

[25] H. Cao, Development of techniques for general purpose simulators, PhD thesis, Stanford
University, 2002, https://pangea.stanford.edu/ERE/pdf/pereports/PhD/Cao02.pdf.
Bibliography 211

[26] G. Chavent and J. Jaffré, Mathematical Models and Finite Elements for Reservoir
Simulation: Single Phase, Multiphase and Multicomponent Flows through Porous Media,
vol. 17 of Studies in Mathematics and its Applications, North-Holland, Amsterdam, 1986.
[27] C. Chen and O. L. Mangasarian, Smoothing methods for convex inequalities and linear
complementarity problems, Math. Program., 71 (1995), pp. 51–69, https://doi.org/10.
1007/BF01592244.
[28] Z. Chen, G. Huan, and Y. Ma, Computational methods for multiphase flows in porous
media, vol. 2 of Computational Science & Enginering, SIAM, Philadelphia, 2006.
[29] S.-J. Chung, NP-completeness of the linear complementarity problem, J. Optim. Theory
Appl., 60 (1989), pp. 393–399, https://doi.org/10.1007/BF00940344.
[30] K. H. Coats, An equation of state compositional model, SPE Journal, 20 (1980), pp. 363–
376, https://doi.org/10.2118/8284-PA. SPE-8284-PA.
[31] Ş. Cobzaş, R. Miculescu, and A. Nicolae, Lipschitz Functions, vol. 2241 of Lecture
Notes in Mathematics, Springer, Cham, Switzerland, 2019, https://doi.org/10.1007/
978-3-030-16489-8.
[32] A. Conn, N. Gould, and P. Toint, Trust-Region Methods, MPS-SIAM Series on Op-
timization 1, SIAM and MPS, Philadelphia, 2000.
[33] R. W. Cottle, Nonlinear programs with positively bounded Jacobians, SIAM J. Appl.
Math., 14 (1966), pp. 147–158, https://doi.org/10.1137/0114012.
[34] R. W. Cottle and G. B. Dantzig, Complementary pivot theory of mathematical
programming, Linear Alg. Appl., 1 (1968), pp. 103–125, https://doi.org/10.1016/
0024-3795(68)90052-9.
[35] R. W. Cottle, J.-S. Pang, and R. E. Stone, The linear complementarity problem,
vol. 60 of Classics in Applied Mathematics, SIAM, Philadelphia, 2009.
[36] G. E. Coxson, The P -matrix problem is co-NP-complete, Math. Program., 64 (1994),
pp. 173–178, https://doi.org/10.1007/BF01582570.
[37] J. C. de los Reyes and K. Kunisch, A comparison of algorithms for control constrained
optimal control of the Burgers equation, CALCOLO, 41 (2004), pp. 203–225, https://doi.
org/10.1007/s10092-004-0092-7.
[38] T. De Luca, F. Facchinei, and C. Kanzow, A theoretical and numerical comparison
of some semismooth algorithms for complementarity problems, Comput. Optim. Appl., 16
(2000), pp. 173–205, https://doi.org/10.1023/A:1008705425484.
[39] U. K. Deiters and T. Kraska, High-pressure Fluid Phase Equilibria: Phenomenology
and Computation, vol. 2 of Supercritical Fluid Science and Technology, Elsevier, Amster-
dam, 2012, http://store.elsevier.com/High-Pressure-Fluid-Phase-Equilibria/
isbn-9780444563545/.
[40] D. den Hertog, C. Roos, and T. Terlaky, The linear complimentarity problem,
sufficient matrices, and the criss-cross method, Linear Alg. Appl., 187 (1993), pp. 1–14,
https://doi.org/10.1016/0024-3795(93)90124-7.
212 Bibliography

[41] J. E. Dennis and R. B. Schnabel, Numerical Methods for Unconstrained Optimization


and Nonlinear Equations, vol. 16 of Classics in Applied Mathematics, Society for Industrial
and Applied Mathematics, Philadelphia, 1996.

[42] P. Deuflhard, Newton Methods for Nonlinear Problems: Affine Invariance and Adaptive
Algorithms, vol. 35 of Springer Series in Computational Mathematics, Springer, Berlin,
2011.

[43] I. I. Dikin, Iterative solution of linear and quadratic programming, Dokl. Akad. Nauk
SSSR, 174 (1967), pp. 747–748, http://mi.mathnet.ru/eng/dan33112.

[44] J.-P. Dussault, M. Frappier, and J. C. Gilbert, Polyhedral Newton-min algorithms


for complementarity problems, research report, Inria Paris ; Université de Sherbrooke
(Québec, Canada), Oct 2019, https://hal.archives-ouvertes.fr/hal-02306526.

[45] S. Ernst, Properties of water and steam in SI-units, Springer-Verlag, Berlin, 1969.

[46] F. Facchinei and J. S. Pang, Finite-Dimensional Variational Inequalities and Com-


plementarity Problems, I, Springer Series in Operations Research, Springer, New York,
2003.

[47] F. Facchinei and J. S. Pang, Finite-Dimensional Variational Inequalities and Com-


plementarity Problems, II, Springer Series in Operations Research, Springer, New York,
2003.

[48] F. Facchinei and J. Soares, A new merit function for nonlinear complementar-
ity problems and a related algorithm, SIAM J. Optim., 7 (1997), pp. 225–247, https:
//doi.org/10.1137/S1052623494279110.

[49] M. Fiedler and V. Pták, Some generalizations of positive definiteness and monotonic-
ity, Numer. Math., 9 (1966), pp. 163–172, https://doi.org/10.1007/BF02166034.

[50] A. Fischer, A special Newton-type optimization method, Optimization, 24 (1992),


pp. 269–284, https://doi.org/10.1080/02331939208843795.

[51] A. Fischer and C. Kanzow, On finite termination of an iterative method for linear
complementarity problems, Math. Program., 74 (1996), pp. 279–292, https://doi.org/
10.1007/BF02592200.

[52] A. Galántai, The theory of Newton’s method, J. Comput. Appl. Math., 124 (2000),
pp. 25–44, https://doi.org/10.1016/S0377-0427(00)00435-0. Numerical Analysis
2000. Vol. IV: Optimization and Nonlinear Equations.

[53] R. Glowinski, J. L. Lions, and R. Trémolières, Numerical Analysis of Variational


Inequalities, vol. 8 of Studies in Mathematics and its Applications, North-Holland Pub-
lishing Company, Amsterdam, 1981.

[54] J. Gondzio, Interior point methods 25 years later, Eur. J. Oper. Res., 218 (2012), pp. 587–
601, https://doi.org/10.1016/j.ejor.2011.09.017.

[55] M. Haddou, A new class of smoothing methods for mathematical programs with equilib-
rium constraints, Pacif. J. Optim., 5 (2009), pp. 86–96.
Bibliography 213

[56] M. Haddou and P. Maheux, Smoothing methods for nonlinear complementarity prob-
lems, J. Optim. Theory Appl., 160 (2014), pp. 711–729, https://doi.org/10.1007/
s10957-013-0398-1.

[57] M. Haddou, T. Migot, and J. Omer, A generalized direction in interior point method
for monotone linear complementarity problems, Optim. Lett., (2018), https://doi.org/
10.1007/s11590-018-1241-2.

[58] M. Hamani, Méthodes numériques pour la résolution de systèmes d’équations algébriques


contenant des équations de complémentarité, master’s thesis, Sup Galilée, 2017.

[59] P. Harker and J.-S. Pang, Finite-dimensional variational inequality and nonlinear
complementarity problems: A survey of theory, algorithms and applications., Math. Pro-
gram., 48 (1990), pp. 161–220, https://doi.org/10.1007/BF01582255.

[60] P. Hartman and G. Stampacchia, On some non-linear elliptic differential-functional


equations, Acta Mathematica, 115 (1966), pp. 271–310, https://doi.org/10.1007/
BF02392210.

[61] R. A. Heidemann, Computation of high pressure phase equilibria, Fluid Phase Equilibria,
14 (1983), pp. 55–78, https://doi.org/10.1016/0378-3812(83)80115-0.

[62] W. Henry and J. Banks, III. Experiments on the quantity of gases absorbed by water,
at different temperatures, and under different pressures, Phil. Trans. Royal Soc. London,
93 (1803), pp. 29–274, https://doi.org/10.1098/rstl.1803.0004.

[63] A. F. Izmailov and M. V. Solodov, Newton-Type Methods for Optimization and


Variational Problems, Springer Series in Operations Research and Financial Engineering,
Springer, Cham, Switzerland, 2014, https://doi.org/10.1007/978-3-319-04247-3.

[64] E. John and E. A. Yıldırım, Implementation of warm-start strategies in interior-point


methods for linear programming in fixed dimension, Comput. Optim. Appl., 41 (2008),
pp. 151–183, https://doi.org/10.1007/s10589-007-9096-y.

[65] C. Kanzow, Inexact semismooth Newton methods for large-scale complementarity prob-
lems, Optim. Meth. Software, 19 (2004), pp. 309–325, https://doi.org/10.1080/
10556780310001636369.

[66] S. Karamardian, Generalized complementarity problem, J. Optim. Theory Appl., 8


(1971), pp. 161–168, https://doi.org/10.1007/BF00932464.

[67] N. Karmarkar, A new polynomial-time algorithm for linear programming, in Proceedings


of the Sixteenth Annual ACM Symposium on Theory of Computing, STOC ’84, New York,
USA, 1984, Association for Computing Machinery, pp. 302–311, https://doi.org/10.
1145/800057.808695.

[68] C. T. Kelley, Iterative Methods for Linear and Nonlinear Equations, vol. 16 of Frontiers
in Applied Mathematics, SIAM, Philadelphia, 1995.

[69] D. Kinderlehrer and G. Stampacchia, An Introduction to Variational Inequalities


and Their Applications, vol. 31 of Classics in Applied Mathematics, SIAM, Philadelphia,
2000.
214 Bibliography

[70] M. Kojima, N. Megiddo, T. Noma, and A. Yoshise, A unified approach to interior


point algorithms for linear complementarity problems: A summary, Operations Research
Letters, 10 (1991), pp. 247–254, https://doi.org/10.1016/0167-6377(91)90010-M.

[71] M. Kojima and S. Shindo, Extension of Newton and quasi-Newton methods to systems
of PC1 equations, J. Oper. Res. Soc. Japan, 29 (1986), pp. 352–375, https://doi.org/
10.15807/jorsj.29.352.

[72] S. Kräutle, The semismooth Newton method for multicomponent reactive transport
with minerals, Adv. Water Res., 34 (2011), pp. 137–151, https://doi.org/10.1016/j.
advwatres.2010.10.004.

[73] B. Kummer, Newton’s method for non-differentiable functions, Adv. Math. Optim., 45
(1988), pp. 114–125.

[74] T. Y. Kwak and G. A. Mansoori, Van der Waals mixing rules for cubic equations of
state. Applications for supercritical fluid extraction modelling, Chem. Eng. Sci., 41 (1986),
pp. 1303–1309, https://doi.org/10.1016/0009-2509(86)87103-2.

[75] V. Lachet and V. Ruffier-Meray, Documentation du module thermodynamique de


TACITE, tech. report, Institut Français du Pétrole, 1999. 45311.

[76] T. C. Lai Nguyen, Analysis of a nonlinear algebraic system arising in phase equilibria
problems, master’s thesis, INSA Rennes, 2018.

[77] A. Lauser, Theory and Numerical Applications of Compositional Multi-Phase Flow in


Porous Media, PhD thesis, Universität Stuttgart, 2013.

[78] A. Lauser, C. Hager, R. Helmig, and B. Wohlmuth, A new approach for phase
transitions in miscible multi-phase flow in porous media, Adv. Water Res., 34 (2011),
pp. 957–966, https://doi.org/10.1016/j.advwatres.2011.04.021.

[79] Y. Le Hénaff, Convexity of Gibbs function, master’s thesis, INSA Rennes, 2018.

[80] S. Le Vent, A summary of the properties of van der Waals fluids, Int. J. Mech. Engrg
Edu., 29 (2001), pp. 257–277, https://doi.org/10.7227/IJMEE.29.3.8.

[81] C. E. Lemke, Bimatrix equilibrium points and mathematical programming, Manage. Sci.,
11 (1965), pp. 681–689, https://doi.org/10.1287/mnsc.11.7.681.

[82] C. E. Lemke and J. T. Howson, Equilibrium points of bimatrix games, SIAM J. Appl.
Math., 12 (1964), pp. 413–423, https://doi.org/10.1137/0112033.

[83] J. Lohrenz, B. G. Bray, and C. R. Clark, Calculating viscosities of reservoir flu-


ids from their compositions, J. Petrol. Technology, (1964), https://doi.org/10.2118/
915-PA.

[84] I. Lusetti, Numerical methods for compositional multiphase flow models with cubic EOS,
tech. report, IFPEN, 2016.

[85] O. L. Mangasarian, Equivalence of the complementarity problem to a system of nonlin-


ear equations, SIAM J. Appl. Math., 31 (1976), pp. 89–92, https://doi.org/10.1137/
0131009.
Bibliography 215

[86] R. Masson, L. Trenty, and Y. Zhang, Formulations of two phase liquid gas com-
positional Darcy flows with phase transitions, Int. J. Finite Vol., 11 (2014), pp. 1–34,
http://ijfv.math.cnrs.fr/IMG/pdf/gazliqcomp-ijfv-1.pdf.

[87] R. Masson, L. Trenty, and Y. Zhang, Coupling compositional liquid gas Darcy and
free gas flows at porous and free-flow domains interface, J. Comput. Phys., 321 (2016),
pp. 708–728, https://doi.org/10.1016/j.jcp.2016.06.003.

[88] S. Mehrotra, On the implementation of a primal-dual interior point method, SIAM J.


Optim., 2 (1992), pp. 575–601, https://doi.org/10.1137/0802028.

[89] M. L. Michelsen, The isothermal flash problem. Part I. Stability, Fluid Phase Equilibria,
9 (1982), pp. 1–19, https://doi.org/10.1016/0378-3812(82)85001-2.

[90] M. L. Michelsen, The isothermal flash problem. Part II. Phase-split calculation,
Fluid Phase Equilibria, 9 (1982), pp. 21–40, https://doi.org/10.1016/0378-3812(82)
85002-4.

[91] M. L. Michelsen and J. M. Mollerup, Thermodynamic Models: Fundamentals &


Computational Aspects, Tie-Line Publications, Holte, 2007.

[92] R. Mifflin, Semismooth and semiconvex functions in constrained optimization, SIAM J.


Control Optim., 15 (1977), pp. 959–972, https://doi.org/10.1137/0315061.

[93] T. Migot, Contributions aux méthodes numériques pour les problèmes de complémentar-
ité et problèmes d’optimisation sous contraintes de complémentarité, PhD thesis, INSA
Rennes, 2017.

[94] J. Nocedal and S. J. Wright, Numerical Optimization, Springer Series in Operations


Research and Financial Engineering, Springer, New York, 2006.

[95] M. d. M. Olaya, J. A. Reyes-Labarta, M. D. Serrano, and A. Marcilla, Vapor-


liquid equilibria using the Gibbs energy and the common tangent plane criterion, Chem.
Eng. Edu., 44 (2010), p. 236, https://eric.ed.gov/?id=EJ935045.

[96] H. Orbey and S. I. Sandler, Modeling Vapor-Liquid Equilibria: Cubic Equations of


State and Their Mixing Rules, Cambridge Series in Chemical Engineering, Cambridge
University Press, 1998.

[97] J. M. Ortega and W. C. Rheinboldt, Iterative Solution of Nonlinear Equations in


Several Variables, vol. 30 of Classics in Applied Mathematics, SIAM, Philadelphia, 2000.

[98] J.-S. Pang, Newton’s method for B-differentiable equations, Math. Oper. Res., 15 (1990),
pp. 311–341, https://doi.org/10.1287/moor.15.2.311.

[99] D.-Y. Peng and D. B. Robinson, A new two-constant equation of state, Ind. Eng.
Chem. Fundam., 15 (1976), pp. 59–64, https://doi.org/10.1021/i160057a011.

[100] R. H. Perry and D. W. Green, Perry’s Chemical Engineers’ Handbook, McGraw-Hill


chemical engineering series, McGraw-Hill, 1999.

[101] N. Peton, Comparaison de plusieurs formulations pour les écoulements multiphasiques et


compositionnels en milieu poreux, tech. report, IFPEN, 2015.
216 Bibliography

[102] N. Peton, Étude et simulation d’un modèle stratigraphique advecto-diffusif non-linéaire


avec frontières mobiles, PhD thesis, Université Paris-Saclay, 2018, http://www.theses.
fr/2018SACLC058.

[103] N. Peton, C. Cancès, D. Granjeon, Q.-H. Tran, and S. Wolf, Numerical scheme
for a water flow-driven forward stratigraphic model, Comput. Geosci., 24 (2020), pp. 37–60,
https://doi.org/10.1007/s10596-019-09893-w.

[104] J. M. Prausnitz, R. N. Lichtenthaler, and E. G. de Azevedo, Molecular Ther-


modynamics of Fluid-Phase Equilibria, Prentice-Hall International Series in the Physical
and Chemical Engineering Sciences, Pearson Education, 1998.

[105] L. Qi and J. Sun, A nonsmooth version of Newton’s method, Math. Program., 58 (1993),
pp. 353–367, https://doi.org//10.1007/BF01581275.

[106] H. H. Rachford and J. D. Rice, Procedure for use of electronic digital computers in
calculating flash vaporization hydrocarbon equilibrium, J. Petrol. Technol., 4 (1952), p. 19,
https://doi.org/10.2118/952327-G.

[107] D. Ralph, Global convergence of damped Newton’s method for nonsmooth equations via
the path search, Math. Oper. Res., 19 (1994), pp. 352–389, https://doi.org/10.1287/
moor.19.2.352.

[108] O. Redlich and J. N. S. Kwong, On the thermodynamics of solutions. v. an equation


of state. fugacities of gaseous solutions, Chem. Rev., 44 (1949), pp. 233–244, https://
doi.org/10.1021/cr60137a013. PMID: 18125401.

[109] R. T. Rockafellar, Convex Analysis, vol. 28 of Princeton Landmarks in Mathematics


and Physics, Princeton University Press, Princeton, New Jersey, 1970.

[110] M. Seetharama Gowda, Inverse and implicit function theorems for H-differentiable
and semismooth functions, Optim. Meth. Software, 19 (2004), pp. 443–461, https://doi.
org/10.1080/10556780410001697668.

[111] G. Soave, Equilibrium constants from a modified Redlich-Kwong equation of state, Chem.
Eng. Sci., 27 (1972), pp. 1197–1203.

[112] H. L. Stone, Estimation of three-phase relative permeability and residual oil data, J.
Canad. Petrol. Technology, (1973), https://doi.org/10.2118/73-04-06.

[113] R. A. Tapia, Y. Zhang, M. Saltzman, and A. Weiser, The Mehrotra predictor-


corrector interior-point method as a perturbed composite Newton method, SIAM J. Op-
tim., 6 (1996), pp. 47–56, https://doi.org/10.1137/0806004, https://arxiv.org/
abs/http://dx.doi.org/10.1137/0806004.

[114] J. D. van der Waals, On the continuity of the gas and liquid state, PhD thesis, Univer-
siteit Leiden, 1873.

[115] J. Vidal, Thermodynamics. Applications in Chemical Engineering and The Petroleum


Industry, Institut Français du Pétrole Publications, Technip, Paris, 2003.
Bibliography 217

[116] D. V. Voskov and H. A. Tchelepi, Comparison of nonlinear formulations for two-


phase multi-component EOS based simulation, J. Petrol. Sci. Engrg, 82–83 (2012), pp. 101–
111, https://doi.org/10.1016/j.petrol.2011.10.012.

[117] C. H. Whitson and M. L. Michelsen, The negative flash, Fluid Phase Equilibria, 53
(1989), pp. 51–71, https://doi.org/10.1016/0378-3812(89)80072-X.

[118] M. H. Wright, The interior-point revolution in optimization: history, recent develop-


ments, and lasting consequences, Bull. Amer. Math. Soc., 42 (2005), pp. 39–56, https:
//doi.org/10.1090/S0273-0979-04-01040-7.

[119] S. J. Wright, Primal-Dual Interior-Point Methods, SIAM, Philadelphia, 1997.

[120] T. Yamamoto, Historical developments in convergence analysis for Newton’s and Newton-
like methods, J. Comput. Appl. Math., 124 (2000), pp. 1–23, https://doi.org/10.1016/
S0377-0427(00)00417-9. Numerical Analysis 2000. Vol. IV: Optimization and Nonlinear
Equations.

[121] E. A. Yildirim and S. J. Wright, Warm-start strategies in interior-point methods


for linear programming, SIAM J. Optim., 12 (2002), pp. 782–810, https://doi.org/10.
1137/S1052623400369235.

[122] R. Younis, H. A. Tchelepi, and K. Aziz, Adaptively localized continuation-Newton


method–nonlinear solvers that converge all the time, SPE Journal, 15 (2010), pp. 526–544,
https://doi.org/10.2118/119147-PA. SPE-119147-PA.

[123] D. Zhang and Y. Zhang, A Mehrotra-type predictor-corrector algorithm with poly-


nomiality and Q-subquadratic convergence, Ann. Oper. Res., 62 (1996), pp. 131–150,
https://doi.org/10.1007/BF02206814.

[124] Y. Zhang and D. Zhang, On polynomiality of the Mehrotra-type predictor-corrector


interior-point algorithms, Math. Program., 68 (1995), pp. 303–318, https://doi.org/
10.1007/BF01585769.
218 Bibliography
Titre : Résolution numérique des systèmes algébriques contenant des équations de complémentarité. Application à la
thermodynamique des mélanges polyphasiques compositionnels
Mots clés : condition de complémentarité, méthodes de Newton et Newton-min, méthode des points intérieurs, pro-
blème de l’équilibre des phases, formulation unifiée, écoulement polyphasique compositionnel
Résumé : Dans les simulateurs de réservoir, la prise en Pour aller au bout de l’intérêt de la démarche unifiée,
compte des lois d’équilibre thermodynamique pour les cette thèse a pour objectif de lever cet obstacle numé-
mélanges polyphasiques d'hydrocarbures est une partie rique en élaborant des algorithmes de résolution mieux
délicate. La difficulté réside dans la gestion de l'appari- adaptés, avec une meilleure convergence. Notre métho-
tion et de la disparition des phases pour différents consti- dologie consiste à s’inspirer des méthodes qui ont fait
tuants. L'approche dynamique traditionnelle, dite de leur preuve en optimisation sous contraintes et à les
variable switching, consiste à ne garder que les incon- transposer aux systèmes généraux. Cela conduit aux mé-
nues des phases présentes et les équations relatives à thodes de points intérieurs, dont nous proposons une
celles-ci. Elle est lourde et coûteuse, dans la mesure où le version non-paramétrique appelée NPIPM, avec des
« switching » se produit constamment, même d'une itéra- résultats supérieurs à Newton-min.
tion de Newton à l'autre. Une autre contribution de ce travail doctoral est la com-
Une approche alternative, appelée formulation unifiée, préhension et la résolution (partielle) d’une autre obs-
permet de maintenir au cours des calculs un jeu fixe truction au bon fonctionnement de la formulation uni-
d'inconnues et d'équations. Sur le plan théorique, c'est un fiée, jusque-là non identifiée dans la littérature. Il s’agit
progrès important. Sur le plan pratique, comme la nou- de la limitation du domaine de définition des fonctions
velle formulation fait intervenir des équations de com- de Gibbs associées aux lois d’état cubiques. Pour remé-
plémentarité qui sont non-lisses, on est obligé après dier à l’éventuelle non-existence de solution du système,
discrétisation d'avoir recours à la méthode semi-lisse nous préconisons un prolongement naturel des fonctions
Newton-min, au comportement souvent pathologique. de Gibbs.

Title: Numerical resolution of algebraic systems with complementarity conditions. Application to the thermodynamics
of compositional multiphase mixtures
Keywords: complementarity condition, Newton’s and Newton-min method, interior-point method, phase equilibri-
um problem, unified formulation, multiphase multicomponent flows
Abstract: In reservoir simulators, it is usually delicate to In order to fully exploit the interest of the unified ap-
take into account the laws of thermodynamic equilibrium proach, this thesis aims at circumventing this numerical
for multiphase hydrocarbon mixtures. The difficulty lies obstacle by means of more robust resolution algorithms,
in handling the appearance and disappearance of phases with a better convergence. To this end, we draw inspira-
for different species. The traditional dynamic approach, tion from the methods that have proven their worth in
known as variable switching, consists in considering only constrained optimization and we try to transpose them to
the unknowns and equations of the present phases. It is general systems. This gives rise to interior-point meth-
cumbersome and costly, insofar as "switching" occurs ods, of which we propose a nonparametric version called
constantly, even from one Newton iteration to another. NPIPM. The results appear to be superior to those of
An alternative approach, called unified formulation, al- Newton-min.
lows a fixed set of unknowns and equations to be main- Another contribution of this doctoral work is the under-
tained during the calculations. From a theoretical point of standing and (partial) resolution of another obstruction to
view, this is an major advance. On the practical level, the proper functioning of the unified formulation, hither-
because of the nonsmoothness of the complementarity to unidentified in the literature. This is the limitation of
conditions involved in the new formulation, the discre- the domain of definition of Gibbs' functions associated
tized equations have to be solved by the semi-smooth with cubic equations of state. To remedy the possible
Newton-min method, whose behavior is often pathologi- non-existence of a system solution, we advocate a natu-
cal. ral extension of Gibbs' functions.

Université Paris-Saclay
Espace Technologique / Immeuble Discovery
Route de l’Orme aux Merisiers RD 128 / 91190 Saint-Aubin, France

You might also like