The continuity equation: Difference between revisions

From Optimal Transport Wiki
Jump to navigation Jump to search
No edit summary
 
(71 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==


The continuity equation is an important equation in many science fields, for example, electromagnetism, computer vision, fluid dynamics etc. However, in the field of optimal transport, the formulation from fluid dynamics is of a large significance. This form helps to explain dynamics formulation of special cases of Wasserstein metric. 
The continuity equation is an important equation in many fields of science, for example, electromagnetism, computer vision, fluid dynamics etc. However, in the field of optimal transport, the formulation from fluid dynamics is of a large significance. This form helps to explain the dynamic formulation of special cases of [https://en.wikipedia.org/wiki/Wasserstein_metric Wasserstein metric], and we will focus in this direction. For more general information about the continuity equation, look at the article [https://en.wikipedia.org/wiki/Continuity_equation Continuity equation].
 
 
There are many ways that we can describe [https://en.wikipedia.org/wiki/Wasserstein_metric Wasserstein metric]. One of them is to characterize absolutely continuos curves (AC)(p.188<ref name=Santambrogio />) and provide a dynamic formulation of the special case <math> W_{2}^{2} </math> Namely, it is possible to see <math> W_{2}^{2}(\mu, \nu) </math> as an infimum of the lengts of curves that satisfy [https://en.wikipedia.org/wiki/Continuity_equation Continuity equation].


== Continuity equation in fluid dynamics ==
== Continuity equation in fluid dynamics ==


First, we will introduce definition of the geodesic in general metric space <math> (X,d) </math>. In the following sections. we are going to follow a presentation from the book by Santambrogio<ref name="Santambrogio" /> with some digression, here and there.
First, because of the intuition, we will introduce the definition of the continuity equation in fluid mechanics. The exposition in this section will follow the book by Chorin and Marsden<ref name="Marsden" />.  


For the starting point, we need to introduce length of the curve in our metric space <math> (X,d) </math>.
Suppose that mass of our fluid is conserved, through time. Denote <math> \rho(x,t) </math> as a density function and <math> v(x,t) </math> as a particle velocity. Then, for any subspace <math> W </math> of <math> \mathbb{R}^{3} </math> we have:
    <math> \partial_{t}[\int_{W} \rho(x,t) dV] = - \int_{\partial W} \rho v \cdot ndS. </math>


: '''Definition.''' A length of the curve <math> \omega:[0,1] \rightarrow X</math> is defined by
In this section, we assume both density function and particle velocity are smooth enough. Hence, after differentiating under the integral and applying the Divergence Theorem, we get:  
                  <math> L(\omega)=\sup\{ \sum_{j=0}^{n-1} d(\omega(t_{j}),\omega(t_{j+1})) | \quad n \geq 2,\quad 0=t_{0}<t_{1}<...<t_{n-1}=1 \} </math>
      <math> \int_{W} \partial_{t}\rho(x,t) dV = - \int_{W} \nabla\cdot(\rho v) dV. </math>


Secondly, we use the definition of length of a curve to introduce a geodesic curve.
Finally, we conclude that:
      <math> \int_{W} \partial_{t}\rho + \nabla\cdot(\rho v) dV = 0, </math>
which implies, since <math> W </math> is arbitrary, that:
      <math> \partial_{t}\rho + \nabla\cdot(\rho v) = 0. </math>
The last equation is the continuity equation in fluid dynamics, written in the differential form. We use the equation in this form in optimal transport.


: '''Definition.''' A curve <math> c:[0,1] \rightarrow X</math> is said to be geodesic between <math> x </math> and <math> y </math> in <math> X </math> if it minimizes the length <math> L(\omega)</math> among all the curves <math> \omega:[0,1] \rightarrow X</math> <br> such that <math> x=\omega(0)</math> and <math> y=\omega(1)</math>.
== Continuity equation in optimal transport ==
 
Since we have a definition of a geodesic in the general metric space, it is natural to think of Riemannian structure. It can be formally defined. More about this topic can be seen in the following article [http://34.106.105.83/wiki/ Formal Riemannian Structure of the Wasserstein_metric].
 
Now, we proceed with necessary definitions in order to be able to understand Wasserstein metric in a different way.
: '''Definition.''' A metric space <math> (X,d) </math> is called a length space if it holds
                    <math> d(x,y)=\inf \{ L(\omega) | \quad  \omega \in AC(X), \quad \omega(0)=x \quad \omega(1)=y \}.</math>


A space <math> (X,d) </math> is called geodesic space if the distance <math> d(x,y) </math> is attained for some curve <math> \omega </math>.
The previous discussion assumed that the density was smooth, which is not true of the general measures we consider in optimal transport. Even when a measure <math> \mu </math> is absolutely continuous with respect to Lebesgue measure, which we write with a mild abuse of notation as <math> d\mu(x) = \mu(x) dx </math>, <math> \mu </math> does not have to be smooth. So, we need to state a proper weak formulation of the continuity equation. Smooth functions satisfy all the cases below.  


: '''Definition.''' In a length space, a curve <math> \omega:[0,1]\rightarrow X </math> is said to be constant speed geodesic between <math> \omega(0)</math> and <math> \omega(1)</math> in <math> X </math> if it satisfies
Sometimes in the literature, authors use continuity equation, and transport equation as synonyms. On the other hand, in the optimal transport we differentiate these two and the standard Cauchy problem. Here, we will present definitions and reasoning from book by  F.Santambrogio<ref name="Santambrogio" />.


                    <math> d(\omega(s),\omega(t))=|t-s|d(\omega(0),\omega(1)) </math> for all <math> t,s \in [0,1]</math>
From this point, we are looking at the following equation:
<math> \partial_{t}\mu_{t} + \nabla\cdot (\mu_{t}v_{t}) = 0 </math>.


It is clear that constant-speed geodesic curve <math> \omega </math> connecting <math> x  </math> and <math> y </math> is a geodesic curve. This is very important definition since we have that every constant-speed geodesic <math> \omega </math> is also in <math> AC(X) </math> where <math> |\omega'(t)|=d(\omega(0),\omega(1)) </math> almost everywhere in <math> [0,1] </math>. <br>
:* All the measures we are interested in satisfy <math> \int_{0}^{1} ||v_{t}||_{L^{1}(\mu_{t})}dt < \infty </math>, and solve continuity equation in a distributional sense, namely
In addition, minimum of the set <math> \{ \int_{0}^{1}|c'(t)|^{p}dt |  c:[0,1]\rightarrow X, c(0)=x, c(1)=y \} </math> is attained by our constant-speed geodesic curve <math> \omega.</math> Last fact is important since it is connected to Wasserstein <math>p</math> metric. For more information, please take a look at [https://en.wikipedia.org/wiki/Wasserstein_metric Wasserstein metric].
    <math> \int_{0}^{T}\int_{\Omega} (\partial_{t}\phi) d\mu_{t} dt + \int_{0}^{T}\int_{\Omega} \nabla\phi\cdot v_{t} d\mu_{t} dt = 0, </math>
for all <math> \phi \in C_{c}^{1}((0,T)X\Omega) </math>, where <math> \Omega </math> is a compact set or the whole space <math> \mathbb{R}^{d}</math>, and <math> 0<T<1 </math>. We assume no-flux condition in this case, namely <math> \mu_{t}v_{t} \cdot n = 0 </math> on the boundary <math> \partial\Omega. </math>


For more information on constant-speed geodesics, especially how they depend on uniqueness of the plan that is induced by transport and characterization of a constant-speed geodesic look at the book by L.Ambrosio, N.Gilgi, G.Savaré <ref name="Ambrosio" /> or the book by Santambrogio<ref name="Santambrogio" />.
The main goal of the classical optimal transport problem is..., we want to move one pile of dirt to another one. So, we have to impose initial and terminal conditions, for example <math> \mu_{0} = \mu  </math>, and <math> \mu_{1} = \nu. </math> Then, our equation becomes
    <math> \int_{0}^{T}\int_{\Omega} (\partial_{t}\phi) d\mu_{t} dt + \int_{0}^{T}\int_{\Omega} \nabla\phi\cdot v_{t} d\mu_{t} dt = \int_{\Omega}\phi(T,x)d\nu(x) - \int_{\Omega}\phi(0,x)d\mu(x),</math>
for all <math> \phi \in C_{c}^{1}([0,T]X\Omega). </math>


== Continuity equation in optimal transport ==
:* Another way to interpret solutions to the continuity equation is to assume that function <math> t \rightarrow \int_{\Omega} \psi d\mu_{t}</math> is absolutely continuous, and for a.e. <math>t</math> it holds:
  <math> \partial_{t} \int_{\Omega} \psi d\mu_{t} = \int_{\Omega} \nabla\phi \cdot v_{t}. </math>
This kind of solution is called a weak solution.


Finally, we can rephrase Wasserstein metrics in dynamic language as mentioned in the Introduction.
Proposition 4.2., on the page 124., in the book by Santambrogio<ref name="Santambrogio" /> states that these solutions are basically equivalent.  


Whenever <math> \Omega \subseteq \mathcal{R}^{d} </math> is convex set, <math> W_{p}(\Omega) </math> is a geodesic space. Proof can be found in the book by Santambrogio<ref name="Santambrogio" />.
:* There is also a third way to think about this solutions, using the Lipschitz functions, and it is contained in the following:


: '''Theorem.'''<ref name=Santambrogio /> Let <math> \mu, \nu \in \mathcal{P}_{2}(R^{d}) </math>. Then
: '''Proposition.'''<ref name=Santambrogio /> Let <math> \mu </math> be the Lipschitz function in <math> (t,x) </math> and <math> v </math> be the Lipschitz function in <math> x.</math> Suppose that the continuity equation is satisfied in the weak sense. Then it is satisfied in a.e. sense.
      <math> W_{p}^{p}(\mu, \nu)=\inf_{(\mu(t).\nu(t))} \{\int_{0}^{1} |v(,t)|_{L^{p}(\mu(t))}^{p}dt \quad | \quad \partial_{t}\mu+\nabla\cdot(v\mu)=0,\quad \mu(0)=\mu,\quad \mu(1)=\nu \}. </math>


In special case, when <math> \Omega </math> is compact, infimum is attained by some constant-speed geodesic.
Previous three definitions and connections help us to conclude this section by referencing to Theorem of Cauchy-Lipschitz(<ref name="Ambrosio" />, p. 184). It is the analogue of the Picard-Lindelof Theorem in ODE theory, and it provides us with the unique solution, which is crucial for finding a proper geodesics in the applications.


== Applications ==
== Applications ==


There are many ways to generalize this fact. We will talk about a special case <math> p=2 </math> and a displacement convexity.
The following theorem can be found at the book by L.Ambrosio, E.Brué, and D.Semola<ref name="Ambrosio" />.
Here we follow again book by Santambrogio<ref name="Santambrogio1" />.
 
In general, the functional <math> \mu \rightarrow W_{2}^{2}(\mu,\nu) </math> is not a displacement convex. We can fix this by introducing a generalized geodesic.
 
: '''Definition.''' Let <math> \rho \in \mathcal{P}(\Omega) </math> be an absolutely continuous measure and <math> \mu_{0} </math> and <math> \mu_{1} </math> probability measures in <math> \mathcal{P}(\Omega) </math>. We say that <math> \mu_{t} = ((1-t)T_{0}+tT_{1})\#\rho </math> <br> is a generalized geodesic in <math> \mathcal{W}_{2}(\Omega) </math> with base <math> \rho </math>, where <math> T_{0} </math> is the optimal transport plan from <math> \rho </math> to <math> \mu_{0} </math> and <math> T_{1} </math> is the optimal transport plan from <math> \rho </math> to <math> \mu_{1} </math>.


By calculation, we have the following <math> W_{2}^{2}(\mu_{t},\rho) \leq (1-t)W_{2}^{2}(\mu_{0},\rho) + tW_{2}^{2}(\mu_{1},\rho). </math>
: '''Theorem (Benamou-Brenier Formula).'''<ref name=Santambrogio /> Let <math> \mu, \nu \in \mathcal{P}_{2}(\mathbb{R}^{d}) </math>. Then
      <math> W_{2}^{2}(\mu, \nu)=\min_{(\mu(t),\nu(t))} \{\int_{0}^{1} |v(\cdot,t)|_{L^{2}(\mu(t))}^{2}dt \quad | \quad \partial_{t}\mu+\nabla\cdot(v\mu)=0,\quad \mu(0)=\mu,\quad \mu(1)=\nu \}. </math>


Therefore, along the generalized geodesic, the functional <math> t \rightarrow W_{2}^{2}(\mu_{t},\rho) </math> is convex.
This formula is important for defining Riemannian structure. You can see more at [http://34.106.105.83/wiki/Formal_Riemannian_Structure_of_the_Wasserstein_metric Formal Riemannian Structure of the Wasserstein metric].


This fact is very important in establishing uniqueness and existence theorems in the geodesic flows.
In addition, using the continuity equation we can describe geodesics in the Wasserstein space. For more details look at [http://34.106.105.83/wiki/Geodesics_and_generalized_geodesics Geodesics and generalized geodesics].


= References =
= References =
Line 69: Line 65:
<ref name="Marsden"> [https://link.springer.com/book/10.1007/978-1-4612-0883-9 A.J.Chorin, J.E.Marsden, ''A Mathematical Introduction to Fluid Mechanics'', Chapter 1, pages 1-11] </ref>
<ref name="Marsden"> [https://link.springer.com/book/10.1007/978-1-4612-0883-9 A.J.Chorin, J.E.Marsden, ''A Mathematical Introduction to Fluid Mechanics'', Chapter 1, pages 1-11] </ref>


<ref name="Santambrogio"> [https://link.springer.com/book/10.1007/978-3-319-20828-2 F. Santambrogio, ''Optimal Transport for Applied Mathematicians'', Chapter 4, pages 123-126] </ref>
<ref name="Santambrogio"> [https://link.springer.com/book/10.1007/978-3-319-20828-2 F.Santambrogio, ''Optimal Transport for Applied Mathematicians'', Chapter 4, pages 123-126] </ref>


<ref name="Ambrosio"> [https://link.springer.com/book/10.1007/978-3-030-72162-6 L.Ambrosio, E.Brué, D.Semola, ''
<ref name="Ambrosio"> [https://link.springer.com/book/10.1007/978-3-030-72162-6 L.Ambrosio, E.Brué, D.Semola, ''Lectures on Optimal Transport'', Lecture 16.1., pages 183-189] </ref>
Lectures on Optimal Transport'', Lecture 16.1., pages 183-189] </ref>


</references>
</references>

Latest revision as of 05:45, 22 February 2022

Introduction

The continuity equation is an important equation in many fields of science, for example, electromagnetism, computer vision, fluid dynamics etc. However, in the field of optimal transport, the formulation from fluid dynamics is of a large significance. This form helps to explain the dynamic formulation of special cases of Wasserstein metric, and we will focus in this direction. For more general information about the continuity equation, look at the article Continuity equation.

Continuity equation in fluid dynamics

First, because of the intuition, we will introduce the definition of the continuity equation in fluid mechanics. The exposition in this section will follow the book by Chorin and Marsden[1].

Suppose that mass of our fluid is conserved, through time. Denote as a density function and as a particle velocity. Then, for any subspace of we have:

    

In this section, we assume both density function and particle velocity are smooth enough. Hence, after differentiating under the integral and applying the Divergence Theorem, we get:

     

Finally, we conclude that:

     

which implies, since is arbitrary, that:

     

The last equation is the continuity equation in fluid dynamics, written in the differential form. We use the equation in this form in optimal transport.

Continuity equation in optimal transport

The previous discussion assumed that the density was smooth, which is not true of the general measures we consider in optimal transport. Even when a measure is absolutely continuous with respect to Lebesgue measure, which we write with a mild abuse of notation as , does not have to be smooth. So, we need to state a proper weak formulation of the continuity equation. Smooth functions satisfy all the cases below.

Sometimes in the literature, authors use continuity equation, and transport equation as synonyms. On the other hand, in the optimal transport we differentiate these two and the standard Cauchy problem. Here, we will present definitions and reasoning from book by F.Santambrogio[2].

From this point, we are looking at the following equation: .

  • All the measures we are interested in satisfy , and solve continuity equation in a distributional sense, namely
     

for all , where is a compact set or the whole space , and . We assume no-flux condition in this case, namely on the boundary

The main goal of the classical optimal transport problem is..., we want to move one pile of dirt to another one. So, we have to impose initial and terminal conditions, for example , and Then, our equation becomes

    

for all

  • Another way to interpret solutions to the continuity equation is to assume that function is absolutely continuous, and for a.e. it holds:
 

This kind of solution is called a weak solution.

Proposition 4.2., on the page 124., in the book by Santambrogio[2] states that these solutions are basically equivalent.

  • There is also a third way to think about this solutions, using the Lipschitz functions, and it is contained in the following:
Proposition.[2] Let be the Lipschitz function in and be the Lipschitz function in Suppose that the continuity equation is satisfied in the weak sense. Then it is satisfied in a.e. sense.

Previous three definitions and connections help us to conclude this section by referencing to Theorem of Cauchy-Lipschitz([3], p. 184). It is the analogue of the Picard-Lindelof Theorem in ODE theory, and it provides us with the unique solution, which is crucial for finding a proper geodesics in the applications.

Applications

The following theorem can be found at the book by L.Ambrosio, E.Brué, and D.Semola[3].

Theorem (Benamou-Brenier Formula).[2] Let . Then
      

This formula is important for defining Riemannian structure. You can see more at Formal Riemannian Structure of the Wasserstein metric.

In addition, using the continuity equation we can describe geodesics in the Wasserstein space. For more details look at Geodesics and generalized geodesics.

References