Laurent Najman
email: rent.najman@esiee.fr@http

Extending the PowerWatershed framework thanks to Γ-convergence *

Keywords: Power Watershed, Γ-convergence, image filtering, image segmentation, classification, spectral clustering AMS subject classifications. 49N99, 68Q25, 68R10, 68U10. 68U05

In this paper, we provide a formal proof of the power-watershed framework relying on the Γconvergence framework. The main ingredient for the proof is a concept of scale. The proof and the formalism introduced in this paper have the added benefit to clarify the algorithm, and to allow to extend the applicability of the power watershed algorithm to many other types of energy functions. Several examples of applications are provided, including Total Variation and Spectral Clustering.

1. Problem statement: the power watershed framework. We are interested in the following problem. Given three strictly positive integers p > 0, m > 0, n > 0 and n real numbers 1 ≥ λ 0 > λ 1 > . . . λ n-1 > 0, we set (1)

Q p (x) = 0≤k<n λ p k Q k (x)
where, for all 0 ≤ k < n, Q k : R m → R is a continuous function. We search x ∈ R m such that [START_REF] Anzellotti | Asymptotic development by γ-convergence[END_REF] x ∈ lim p→∞ arg min

x∈R m Q p (x)
We are going to see that λ k acts as a notion of scale for the problem at hands. Note that we are not interested in the limit of Q p (x) itself as p → +∞. Indeed, if λ 0 < 1, k λ p k Q k (x) tends to 0 uniformly on R m when p → +∞, and any x ∈ R m is a minimizer of 0. Instead, we are interested in the limit x of the minimizers of Q p as p → +∞. The whole question is thus the choice of an informative minimizing sequence. The study of these types of questions is the main objective of the Γ-theory [START_REF] Maso | An Introduction to Γ-convergence[END_REF][START_REF] Braides | A handbook of γ-convergence[END_REF], which has been adapted to the case of space of graphs in [START_REF] De Verdière | Singular limits of schrödinger operators and markov processes[END_REF][START_REF] De Verdière | of Cours Spécialisés[END_REF]. However, as the sequence of (continuous) functional is decreasing (i.e., Q p+1 ≤ Q p ) and converge pointwise to a continuous function (implying Γ-convergence), our formalism is simpler and does not require familiarity with the Γ-convergence framework. Furthermore, the theorems from the Γ-convergence theory are generally written with a coercivity 1 hypothesis (in our case, that would be on the Q k ) not applicable in our framework. We shall replace the coercivity hypothesis by a compactness argument. For the sake of completeness, we shall expose in this paper what is needed to understand the proof, without explicit reference to Γ-convergence.

As in many cases, the (first) limit of Q p provides a functional with a lot of minimizers. However, a further "limit of higher order", with a different scaling, bring more information (for a formalization of this idea in the Γ-convergence framework, see [START_REF] Anzellotti | Asymptotic development by γ-convergence[END_REF]).

The idea is thus the following. In order to observe what happens during the convergence process, one has to apply a change of scale. Roughly speaking, this amounts to dividing the generator Q p by λ 0 for the first scale, and this provides some information; dividing it further by λ 1 for the second scale will provide more information, and so on. By doing so, we build a sequence of functionals the minimizers of which being the solution we are looking for.

Intuitive explanation of the contributions of this paper: as it is clear from the content of the present paper, the proposed framework allows to combine in a specific and rigorous way minimum-spanning-tree based optimization with other optimization algorithms, such as for instance random-walk or spectral clustering. It is well known that minimum spanning tree is an efficient and fast way to do a clustering, although this algorithm is subject to leaks [START_REF] Zahn | Graph-theoretical methods for detecting and describing gestalt clusters[END_REF] (also known as the chaining effect) and can not impose any constraint on the border of the clusters (such as, for example, regularity). The intuitive idea behind the main results of this paper, is to compute a minimum spanning tree where it is easy to do so, i.e., the centers of the clusters, and to apply a more evolved algorithm on an "extended" boundary of the clusters, in order to impose the constraints. This is somehow similar to what is often done for solving practical problems when the data is large: in such cases, one often starts by reducing the data size by applying a first clustering algorithm, such as the minimum spanning tree. Thus, a different way to look at this paper is the following: we propose a theory and some algorithms to combine data reduction and optimization-based clustering, based on first principles.

Section 2 provides some motivations for solving [START_REF] Anzellotti | Asymptotic development by γ-convergence[END_REF], the main one being the powerwatershed [START_REF] Couprie | Power watershed: A unifying graph-based optimization framework[END_REF]. In section 3, the main theorem of this paper is demonstrated, with its associate generic algorithm. In section 4, a specific algorithm dedicated to a particular class of functions is given and proved. Section 5 clarifies the links of the proposed framework with the (union of) maximum spanning trees. Two examples of applications are then developed. Section 6 shows how total-variation is related to watershed-based mosaic images. Section 7 exhibits an application to spectral clustering. Finally, in section 8, we propose some ideas for extension and future work.

Motivation.

Although it is by no means necessary from a theoretical point of view, it is convenient for many practical purposes to think of R m as a graph. We shall adopt the following notations in this paper, which will allows us to clarify the links between Equation (2) and the classical minimum spanning tree problem.

Notations

. A (simple) graph G consists of a pair G = (V, E) with vertices v in a finite set V of cardinality |V | = m and edges e ∈ E ⊆ V × V with cardinality |E| ≤ m 2 .
An edge, e, spanning two vertices, v i and v j , is denoted by e ij . In 2D image processing applications, each pixel is typically associated with a vertex of the graph and the vertices are connected locally via a 4 or 8-connected lattice. An edge-weighted graph assigns a real value to each edge, called a weight. In this work, the weights are assumed to be non-negative and bounded by 1. The weight of an edge e ij is denoted by w(e ij ) or w ij . We also denote by w i the (unary) weights penalizing the observed configuration at node v i . In the context of filtering, segmentation and clustering applications, the weights encode nodal affinity such that nodes connected by an edge with high weight are considered to be strongly connected and edges with a low weight represent nearly disconnected nodes.

2.2. Power-watershed with q ≥ 0. Let q ≥ 0, we set

(3) W p (x) = e ij ∈E w p ij |x i -x j | q + v i ∈V w p i |x i -f i | q
This problem was introduced for segmentation purposes in [START_REF] Couprie | Power watershed: A unifying graph-based optimization framework[END_REF], with q ≥ 1. In this case, Eq. ( 3) is a discrete formulation of the many possible variations on total variation denoising. In these formulations, w ij are the pairwise weights, which can be interpreted as a weight on the gradient of the target configuration, such that the first term penalizes any unwanted high-frequency content in x and essentially forces x to vary smoothly within an object, while allowing large changes across the object boundaries. The second term enforces fidelity of x to a specified configuration f , w i being the unary weights enforcing that fidelity. If q > 1, the function W p in (3) is usually (depending on the w ij ) coercive, proper and strictly convex2 , and a unique minimum arg min x W p (x) exists for each p > 0. The existence and the unicity of the solution x to Eq. ( 2) thus depends on the convergence of these solutions. The earlier proof provided in [START_REF] Couprie | Power watershed: A unifying graph-based optimization framework[END_REF] is, unfortunately, incomplete and difficult to understand. In [START_REF] Allène | Some links between extremum spanning forests, watersheds and min-cuts[END_REF], there is a proof corresponding to the case q = 1, where several solutions arg min x W p (x) may exist. For a different perspective on the same topic in a different framework, see [START_REF] Ciesielski | Fuzzy connectedness image segmentation in graph cut formulation: A linear-time algorithm and a comparative analysis[END_REF]. We can rewrite Eq. (3) as follows:

(4)

W p (x) = 0≤k<n λ p k    e i,j ∈E k |x i -x j | q + v i ∈V k |x i -f i | q    with λ 0 > λ 1 > . . . > λ n-1
, where n ≤ |V | + |E| is the number of different weights present in the graph G, be they pairwise (i.e., on a edge linking two different x i and x j ) or unary (i.e., on a edge linking x i to f i ), E k is the set of edges with weights equal to λ k and V k is the set of vertices with data-fidelity weights equal to λ k . For 0 ≤ k < n, we set

(5) W k (x) = e i,j ∈E k |x i -x j | q + v i ∈V k |x i -f i | q
We have (6)

W p (x) = 0≤k<n λ p k W k (x)
(a) Some seeds (b) Result of the segmentation Figure 1: From [START_REF] Couprie | Power watershed: A unifying graph-based optimization framework[END_REF], an example of segmentation in Figure 1(b) with the power-watershed watershed framework, by computing the Γ-limit of (3) when q = 2, using the seeds shown in Figure 1(a)

Theorem 3.3 on page 6 ensures the convergence of the minimizers of W p . In particular, when q > 1 and when the problem is strictly convex, we have unicity of the limit of the minimizers. An example of application to seeded segmentation is shown in Figure 1 (see [START_REF] Couprie | Power watershed: A unifying graph-based optimization framework[END_REF] for more details on this example.)

We can extend the power-watershed formulation, while keeping the same properties. Let q 1 > 0, q 2 > 0, a ij ≥ 0 and a k ≥ 0. We set

(7) W p (x) = e ij ∈E w p ij a ij |x i -x j | q 1 + v i w p i a i |x i -f i | q 2
With the notation of the present paper, we can rewrite this equation as

(8) W p (x) = 0≤k<n λ p k W k (x) with (9) W k = e ij ∈E k a ij |x i -x j | q 1 + v i ∈V k a i |x i -f i | q 2
We remark that (loosely speaking) computing the limit of the minimizers amounts to solving a weighted-graph variational problem on each one of the subgraph defined by (V k , E k ).

2.3. Multi-scale regularization on weighted graphs. Let 1 ≥ λ 0 > λ 1 > . . . > λ n-1 > 0. For 0 ≤ k < n, let q k > 0, and we set [START_REF] Ciesielski | Fuzzy connectedness image segmentation in graph cut formulation: A linear-time algorithm and a comparative analysis[END_REF] T

k (x) = 1 q k v i ∈V k   {v j |{v i ,v j }∈E k } a ij |x i -x j | 2   q k 2 + v i ∈V k a i 2 |x i -f i | 2 where (V k , E k ) is any subgraph of G, a ij ≥ 0 and a k ≥ 0. Let us write (11) T p (x) = 0≤k≤n λ p k T k (x)
We recognize in Eq. ( 10) a discrete Total-Variation-based regularization (more precisely, a discrete weighted p-Dirichlet regularization) of the subgraph (V k , E k ) weighted with the corresponding a ij and a i [START_REF] Elmoataz | Nonlocal discrete regularization on weighted graphs: a framework for image and manifold processing[END_REF]. Theorem 3.3 (on page 6) allows us to combine several graph regularizations into one unique formulation: minimizing Eq. ( 11) can then be thought of as a combination of several scales of Total-Variation regularizations.

3. Scale-based approach for the Power Watershed framework.

3.1. A simple example. For any ε > 0, let Q ε : R 2 → R be defined by

(12) Q ε (x 0 , x 1 ) = ε(x 0 -x 1 ) 2 + ε 2 (x 0 -1) 2 + x 2 1
Note that Q ε → 0 when ε tends to 0. Also note that the functional Q ε is quadratic positive definite for any ε > 0. It is strongly convex with a single minimum (as we are going to verify shortly).

3.1.1. Direct approach. By consideration of symmetry, we can reduce the problem to a single variable λ ∈ R: we set x 0 = 1 2 -λ and x 1 = 1 2 + λ. We then have

(13) Q ε (λ) = 2ε 2 (λ + 1 2 ) 2 + 4ελ 2 = λ 2 (4ε + 2ε 2 ) + 2λε 2 + ε 2 2
A derivation with respect to λ leads to

(14) d dλ Q ε (λ) = 4ε(2 + ε)λ + 2ε 2
A second derivation yields:

(15) d 2 dλ 2 Q ε (λ) = 4ε(ε + 2),
which shows that the functional is strongly convex. As a minimum is reached for λ ε such that

d dλ Q ε (λ ε ) = 0, we get (16) λ ε = -ε 2(2 + ε) which corresponds to the point (x ε 0 , x ε 1 ) such that x ε 0 = 1 2 - -ε 2(2 + ε) = 1 + ε 2 + ε (17) x ε 1 = 1 2 + -ε 2(2 + ε) = 1 2 + ε (18) The distance of (x ε 0 , x ε 1 ) to ( 1 2 , 1 2 ) is equals to ε √ 2(2+ε)
, which proves the convergence of the sequence to ( 12 , 1 2 ) when ε tends to 0.

3.1.2. Scale-based approach. We first note that

(19) Q ε (x) ε = (x 0 -x 1 ) 2 + ε (x 0 -1) 2 + x 2 1
tends to (x 0 -x 1 ) 2 when ε tends to 0. Minimizing Q ε , a first approximation at scale ε imposes x 0 = x 1 . This corresponds to a restriction of the space on which Q ε is defined. From a graph point of view, this corresponds to identifying v 0 to v 1 by (continuously) contracting the edge e 01 = {v 1 , v 0 }. Minimizing the restriction of Q ε to the space {v 0 = v 1 } leads to x 0 = x 1 = 1 2 . The rest of the paper is dedicated to justifying that

x 0 = x 1 = 1 2 is indeed the limit of the minimizers of Q ε , generalizing Q ε to Q p .
Remark 3.1. Using results from [START_REF] De Verdière | of Cours Spécialisés[END_REF], Γ-theory allows to prove that [START_REF] De Verdière | of Cours Spécialisés[END_REF] (1, 0) = lim

ε→∞ arg min x Q ε (x).
3.2. Proof of the existence of the limit of the minimizers of Eq. ( 3).

Remark 3.2. The following theorem could also be proved with several applications of Claude Berge's maximum theorem [START_REF] Berge | Topological Spaces: including a treatment of multi-valued functions, vector spaces, and convexity[END_REF] (well known in mathematical economics), which provides conditions for the continuity of an optimized function and the set of its maximizers as a parameter changes.

We shall prove the following.

Theorem 3.3. Let Q p := 0≤k<n λ p k Q k , where (λ k ) 0≤i<n ∈ R n is such that 1 ≥ λ 0 > λ 1 > . . . > λ n-1 > 0, and (Q k ) 0≤k<n are real-valued continuous functions defined on R m .
Let M 0 be the set of minimizers of Q 0 , and for 0 < k < n, M k be recursively defined as follows:

M 0 = arg min x∈R m Q 0 (x) (21) ∀ 1 ≤ k < n, M k = arg min x∈M k-1 Q k (x) (22)
Any convergent sequence (x p ) p>0 of minimizers of Q p converges to some point of M n-1 . In particular, if for all p > 0, (x p ) p>0 is bounded (i.e. if there exists C > 0 such that for all p > 0, x p ∞ ≤ C), then, up to a subsequence, the sequence (x p ) p is convergent towards a point of M n-1 . Furthermore, we can then estimate the minimum of Q p as follows:

(23) min x∈R m Q p (x) = 0≤k<n λ p k m k + o(λ p n-1 )
where

m k = min x∈M k Q k (x)
and where o(λ p n-1 ) is the Landau notation for negligibility 3 . Note that there exist many applications where the minimizers of Q p are bounded. This is in particular the case for elliptical problems, and for many problems where Total-Variation is used as a regularizer. 3 In our case, this means that limp→∞

Q p (x)-0≤k<n λ p k m k λ p n-1 = 0
Thanks to Theorem 3.3, we remark that if M n-1 is a singleton set, then any sequence of minimizers converges to the point in M n-1 . Thanks to Theorem 3.3 and to the continuity of the application p → Q p (.), we can also remark that if for all p > 0, Q p has only one minimizer, then there exists a unique x ∈ R m such that {x} ⊆ M n-1 .

We are now ready to prove Theorem 3.3.

3.2.1. Scale λ 0 . We write

(24) Q p (x) λ p 0 = Q 0 (x) + k>0 λ k λ 0 p Q k (x)
As λ 0 > λ k for any k > 0, the second term of Eq. ( 24) is negligible with respect to Q 0 (x) as soon as p is large enough. Let us write

M 0 := arg min x Q 0 (x) = {y | y ∈ arg min x Q 0 (x)}. Let us set m 0 = min x Q 0 (x)
. By definition of M 0 , for any x ∈ M 0 , we have Q 0 (x) = m 0 . If the minimizers of Q p are bounded, i.e., if they live in a compact, then we can also bound the Q k (x) for any x in the same compact and for all k. We thus have [START_REF]On the shortest spanning subtree of a graph and the traveling salesman problem[END_REF] min

x Q p (x) = λ p 0 m 0 + o(λ p 0 ) 3.2.2. Scale λ 1 .
The process can be repeated with the next scale λ 1 . We set

(26) R p 0 (x) = Q p (x) -λ p 0 Q 0 (x)
and we note that

R p 0 (x) λ p 1 = Q 1 (x) + k>1 ( λ k λ 1 ) p Q k (x). We set M 1 := arg min x∈M 0 Q 1 (x)
, and we have [START_REF] Nagao | Region extraction and shape analysis in aerial photographs[END_REF] min

x Q p (x) = λ p 0 m 0 + λ p 1 m 1 + o(λ p 1 )
where

m 1 = min x∈M 0 Q 1 (x).
3.2.3. Scale λ k . More generally, the step corresponding to scale λ k is

(28) R p k (x) = R p k-1 (x) -λ p k Q k (x)
and the whole process is repeated for all k.

Repeating the process for all scales λ k , we obtain (29) min

x Q p (x) = 0≤k<n λ p k m k + o(λ p n-1 )
where

m k = min x∈M k Q k (x).
Now, let us take a sequence (x p ) p of minimizers of Q p converging to some x ∈ R m . Thanks to the continuity of the application (x, p) → Q p (x) and to the continuity of Q 0 , we obtain x ∈ M 0 . By reiterating the argument, we get that x ∈ M 1 , and so on, until we get x ∈ M n-1 .

Hence the Theorem 3.3.

Data: A set of n continuous functions (Q k ) 0≤k<n from R m to R, together with their scale λ 0 > λ 1 > . . . > λ n-1 . Result: x solution to Eq. ( 2) forall scales λ k by decreasing value do

Compute M k = arg min x∈M k-1 Q k . end return some x ∈ M n-1
Algorithm 1: Generic hierarchical optimization algorithm, optimizing Eq. (2)

A generic algorithm.

The algorithm 1 is a direct application of Theorem 3.3. However, in its generic form, it is not easy to implement. In the next section, we are going to particularize the function Q k , so that we can provide a more specific implementation and so that we can link this implementation with minimum spanning tree algorithms.

4. Algorithm for the Power Watershed.

4.1. Notations and preliminary concepts. We are going to detail how the limit of the minimizers in Eq. ( 2) is obtained for a specific class of functions Q p that extends the powerwatershed formulation given by Eq. ( 9).

We suppose that the graph G is weighted by w, and that we are given a family (ϕ ij ) e ij ∈E of positive functions from R to R + such that ϕ ij (z) = 0 if and only if z = 0. We set

(30) Q p (x) = e ij ∈E w p ij ϕ ij (x i -x j ) Let V f ⊆ V , V f = ∅.
The set V f is the set of boundary conditions for which the value x i = f i of a point v i ∈ V f is known (fixed). If there exists (at least) w ij > 0 for which v i ∈ V f , then one can show that the minimum of Q p is bounded.

Let n be the number of different weights w ij , and let λ 0 > λ 1 > . . . > λ n-1 be those different weights. We set

E k = {e ij | w ij = λ k }. We write (31) Q k (x) = e ij ∈E k ϕ ij (x i -x j ).
Then Q p can be written as

(32) Q p (x) = λ p k Q k (x)
Recall that an edge-induced subgraph of a graph G is a subset of the edges of G together with any vertices that are their endpoints. A path in a graph G is a sequence of edges of the graph which connect a sequence of vertices. A connected component is a subgraph of G in which any two vertices are connected to each other by paths, and which is connected to no additional vertices in G. We denote by CC(G) the set of connected components of a graph G.

In the rest of the paper, we suppose that the graph G is connected. For any t ≥ 0, the level set [w] t is the graph induced by {e ij ∈ E | w ij ≥ t}. We remark that any two connected components of ([w] t ) t>0 are either disjoint or nested. Thus, these connected components can be organized in a tree structure 4

. [w t ] is a subgraph of G. If a connected component C of CC([w] t ) is such that V (C) ∩ V f = ∅,
we say that C is seeded. As V f = ∅, at least one of the connected component of one the level sets is seeded.

Lemma 4.1. Let t > 0 and C ∈ CC([w] t ). We have e ij ∈E(C) ϕ ij (x i -x j ) = 0 if and only if x i = x j for any v i , v j ∈ V (C).
In particular, if C is not seeded, then arg min x e ij ∈E(C) ϕ ij (x i -x j ) = 0, and any x that achieves the minimum is constant on C.

Proof. As for any z ∈ R, ϕ ij (z) ≥ 0 a the sum can only vanish if all terms ϕ ij (x i -x j ) vanish. Thus, if two vertices v i and v j are connected by an edge of C, then x i needs to be equal to x j . As ϕ ij (z) = 0 if and only if z = 0, we see that x needs to be constant for all vertices which can be connected by a path in the graph. By definition of a connected component, all the vertices of C are connected by a path, hence x needs to be constant on C.

In particular, if C is not seeded, then any x that achieves the minimum is constant on C.

4.2.

Algorithm for the power watershed.. To provide an algorithm computing Eq. ( 2) where Q p is given by Eq. ( 30), we need to define the contract operation. We say that we contract two connected vertices v 1 and v 2 when we remove the edge {v 1 , v 2 } linking v 1 to v 2 while simultaneously merging the two vertices into a unique vertex. We say that we contract a connected subgraph C when we repeat the contraction until there is no edge in C, i.e. when C is reduced to a unique vertex. We remark that the order of the sequence of edge removal has no consequence on the result. We also remark that when we contract a connected subgraph C of a simple graph G, the resulting graph G might no longer be a simple graph, but G can be a multi-graph, i.e., a graph in which an edge is repeated several times 5 .

We are now ready to state algorithm 2. This algorithm is essentially the same as the one proposed in [START_REF] Couprie | Power watershed: A unifying graph-based optimization framework[END_REF], although the presentation is simplified by the formalism we introduce in this paper. As stated previously, the various λ k act as a notion of scale for the problem. Roughly speaking, at a given scale λ k , this algorithm considers the level set of the graph corresponding to λ k , and find the minimum of Q k on this part of the graph. In the subsequent scales, the potentials fixed at previous scales are used as initial conditions.

We have the following theorem.

Theorem 4.2. Let Q p given by Eq. ( 30), and such that, for any p ≥ 0, arg min x Q p (x) is bounded. Then algorithm 2 computes the solution to Eq. (2).

Remark that Eq. ( 30) includes ϕ ij (z) = a ij z q ij , with a ij > 0 and q ij > 0, which itself generalizes the power-watershed equation [START_REF] Bao | Tree filtering: Efficient structure-preserving smoothing with a minimum spanning tree, Image Processing[END_REF]. When the solutions to arg min x Q p (x) can be bounded (which is the case for the power-watershed), then, by application of Theorem 3.3, there exists at least one minimizer x ∈ M n-1 such that x ∈ lim p arg min x Q p (x).

Data: A weighted graph G = (V , E , w) and the functions Q k Result: x solution to Eq. ( 2 The rest of the section is dedicated to proving Th. 4.2. We will proceed by successively considering the various scales λ k .

Scale λ

0 . As the restriction of Q 0 to any connected component of [w] λ 0 is positive, we can independently optimize Q 0 on each element C ∈ CC([w] λ 0 ).
If C is seeded, the data attachment term provides a boundary condition for finding the minimum, and a potential x i for any v i ∈ V (C) is fixed at this scale.

Otherwise, if C is not seeded (i.e., there is no data attachment for C and only the regularization term is present), we obtain x i = x j for any v i , v j ∈ V (C) thanks to Lemma 4.1. In other word, we contract C.

For the sake of simplicity, in the sequel, we still denote by G the resulting contracted multi-graph. 4.2.2. Scale λ 1 . At scale λ 1 , we want to find a minimizer of Q 1 restricted to the minimizers of Q 0 . In other words, we want to obtain the potential x i of any v i in [w] λ 1 , constrained by the information on any v j ∈ V ([w] λ 0 ) obtained at the previous scale. The x i of any v i ∈ V ([w] λ 0 ) plays the role of a data attachment for the vertices of [w]

λ 1 \ [w] λ 0 .
As in the previous step, the restriction of Q 1 to any connected component of [w] λ 1 being positive, we can independently optimize Q 1 on each element C ∈ CC([w] λ 1 ). If C is seeded, then the data attachment allows us to fix the potential x i of any v i ∈ [w] λ 1 not already fixed at the previous scale. Otherwise, if C is not seeded, (i.e., there is no data attachment for C), Lemma 4.1 ensures that x i = x j for any v i , v j ∈ V (C). We thus contract C onto a unique vertex. As before, we continue to denote by G the resulting contracted multi-graph.

Other scales λ

k , 1 < k < n.
The process is straightforwardly repeated for all the other scales λ k , 1 < k < n. At each step of the scaling process, the potential x i of some vertices v i becomes known. At the end, as the graph G is connected and as at least one of component of the level set is seeded, a complete potential x ∈ R m has been obtained. This concludes the proof.

1 x 0 x 1 x 2 x 3 0 1 2 1 2 1 1 2 1 2 1 2
(a) Graph corresponding to Eq. ( 33)

1 x 0 x 2 x 2 x 3 0 (b) After the contraction
) Q p (x) = (x 0 -x 1 ) 2 + ( 1 2 ) p ((x 1 -x 2 ) 2 + (x 0 -x 2 ) 2 + (x 2 -x 3 ) 2 + (x 0 -1) 2 + x 2 33
))

The graph corresponding to Eq. ( 33) is depicted in Figure 2(a). After the contraction, we obtain the unweighted multi-graph depicted in Figure 2(b), which corresponds to the polynomial [START_REF] Stawiaski | Minimum spanning tree adaptive image filtering[END_REF] 2

(x 0 -x 2 ) 2 + (x 2 -x 3 ) 2 + (x 0 -1) 2 + x 2 3 .
Hence, the solution of the minimization leads to x 0 = x 1 = 5 7 , x 3 = 2 7 and x 2 = 4 7 . 5. Power-watershed and the union of all maximum spanning trees. Algorithm 2 has the structure of Kruskal's algorithm for the maximum spanning tree [START_REF]On the shortest spanning subtree of a graph and the traveling salesman problem[END_REF], and thus this invites us to look precisely at the relation between Eq. ( 2) and the maximum spanning tree problem.

A tree T is a connected graph such |E(T ) = |V (T )| -1. A spanning tree T of a graph G is a tree such that V (T ) = V (G). The weight of a weighted graph (G, w) is the number [START_REF] Strang | Maximal flow through a domain[END_REF] W (G) :=

e ij ∈E(G) w ij
A maximum spanning tree of a graph G is a spanning tree T such that the weight of T is greater or equal to the weight of any other spanning tree of G.

The problem of finding a maximum spanning tree is the oldest problem in combinatorial optimization [START_REF] Nešetřil | Otakar Borůvka on minimum spanning tree problem: translation of both the 1926 papers[END_REF].

In general, there exist several maximum spanning trees of a given weighted graph. We denote by M ST (G) the union of all the maximum spanning trees of the graph G. We remark that

M ST (G) is a subgraph of G such that |E(M ST (G))| ≤ |E(G)|.
The following lemma, illustrated on Fig. 3, is easily deduced from the proof of Kruskal's algorithm for maximum spanning tree, and thus its proof is left for the reader. To ease the writing of the lemma, we note by convention [w] λ -1 = ∅, where λ -1 > λ 0 . Lemma 5.1. Let e ij = {x i , x j } be an edge of [w] λ k such that w ij = λ k . Then one of the two situations holds:

• either e ij links two different components of [w] λ k-1 . In this case, e ij belongs to a maximum spanning tree of G, i.e., e ij ∈ E(M ST (G)).

x 0

x 1

x 2

x 3 x 4

x 5

x 6

x 7 Figure 3: A graph illustrating lemma 5.1. The edges in red and blue form the union of all the maximum spanning trees of the graph. The grey edges {x 2 , x 3 } and {x 4 , x 6 } do not belong to any maximum spanning tree. One can check that both x 2 and x 3 (resp. x 4 and x 6 ) belong to the same red component of [w] 3 . Each of the blue edges {x 1 , x 6 }, {x 3 , x 4 } and {x 2 , x 5 } belongs to different maximum spanning trees of the graph. One can check that each one of these edges links the two red components of [w] 2 .

• or x i and x j belong to the same component of [w] λ k-1 . In that case e ij ∈ E(M ST (G)). Proof. This theorem is also a straightforward consequence of Theorem 4.2, Theorem 5.2, and Lemma 5.1.

6. An application to Total Variation: the watershed-based mosaic image. Let p ≥ 0, and q ∈ {0, 1, 2}. We set [START_REF] Luxburg | A tutorial on spectral clustering[END_REF] T V p q (x) =

e ij ∈E w p ij |x i -x j | + v i ∈V w p i |x i -f i | q
In this section, we study the dependence of the solution x of Eq. ( 2) with respect to data f when Q p = T V p q is given by Eq. [START_REF] Luxburg | A tutorial on spectral clustering[END_REF]. This corresponds to a discrete version of the Total Variation problem [START_REF] Rudin | Nonlinear total variation based noise removal algorithms[END_REF][START_REF] Darbon | Image restoration with discrete constrained total variation part I: Fast and exact optimization[END_REF]. More precisely, depending on the value of q, it is a discrete Total Variation model with a data attachment term in L 0 (with the convention that 0 0 = 0), L 1 (TV-L1) or L 2 (the ROF model) norm.

Let T q be the operator that maps f to a solution x of Eq. (2).

6.1. Inheriting some properties of TV-L1. The following properties are inherited from the properties of the classical TV-L1 model, see for example [START_REF] Duval | The TVL1 model: a geometric point of view[END_REF]. Formal proofs are omitted for brevity. Property 6.1. The operator T 1 is idempotent, i.e.. T 1 (T 1 (f )) = T 1 (f ). Property 6.2. The operator T 1 commutes with the addition of constants (i.e., T 1 (f + C) = T 1 (f ) + C) and is self-dual (i.e., T 1 (1 -f ) = 1 -T 1 (f )). Property 6.3. The operator T 1 is a contrast-invariant operator, i.e., T 1 (g • f ) = g(T 1 (f )), where g is an bounded increasing C 1 diffeomorphism. Property 6.4. The operator T 1 satisfies the maximum principle (m

≤ f ≤ M =⇒ m ≤ T 1 (f ) ≤ M ).
6.2. Total Variation and the flat-zone hierarchy. In this section, we fix f ∈ [0, 1] m , and we set w ij = exp(-|f i -f j |). For the sake of simplicity, we set w i = exp(-µ) for all i, with µ ∈ R (so that µ varies in the same range as the gradient). For any 0 ≤ µ ≤ 1, we note x µ q a solution to Eq. ( 2), i.e., x µ q = T q (f ). We remark that for µ = 0 (strong data attachment), x µ q = f and that for µ ≥ 1 (no data attachment), x µ q is constant. For 0 ≤ µ ≤ 1, let us denote by CC µ q (v i ) the connected component that contains v i such that x µ q is constant on the component. We call CC µ q (v i ) a flat zone of x µ q . It is easy to see, thanks to a simple computation that, for e ij ∈ E, as soon as

µ > |f i -f j |, then x i = x j . Conversely, if µ < |f i -f j |, then x i = f i . Thus the class CC µ q of a point v i is given by CC µ q (v i ) = {v i } ∪ v j | there exists a path v i = v 1 , . . . , v n = v j , such that |f k -f k+1 | < µ ∀1 ≤ k < n (37)
It is the quasi-flat zones hierarchy, introduced by Nagao et al. in 1979 [START_REF] Nagao | Region extraction and shape analysis in aerial photographs[END_REF], recently revived in [START_REF] Soille | Constrained connectivity for hierarchical image decomposition and simplification[END_REF] and shown to be equivalent to an edge-based topological watershed of the gradient in [START_REF] Najman | On the equivalence between hierarchical segmentations and ultrametric watersheds[END_REF].

Let H q be the the family of all flat zones of the solutions x µ q for all µ. The family H q is hierarchical in the sense that:

• For any q ∈ {0, 1, 2}, x 1 q is totally flat. Indeed, we have x 1 0 is the mode of the vector f , x 1 1 is the median of f and x 1 2 = 1 N v i f i is the mean of f . Hence the whole space is an element of H, • x 0 q is exactly f , hence all the points are elements of H, • two elements of H are either disjoint or nested. Thus, we have the following remarkable result. A classical morphological idea [START_REF] Beucher | Watershed, hierarchical segmentation and waterfall algorithm[END_REF][START_REF] Beucher | The morphological approach to segmentation: the watershed transformation[END_REF] consists in computing a watershed of the gradient and building a mosaic image by setting the value of the mosaic image to be the mode for q = 0 (resp. the median for q = 1, the mean for q = 2) of the original image on each one of the regions of the watershed segmentation. Such a mosaic image is the optimal solution of Eq. (2).

As an example of application, let us consider the graph depicted in Figure 4(a), that corresponds to the following equation

T V L p 1 (x) =e -9p |x 0 -x 1 | + e -4p |x 0 -x 2 | + e -3p |x 1 -x 3 | + e -2p |x 2 -x 3 | (38) + e -µ [|x 0 -1| + |x 1 -10| + |x 2 -5| + |x 3 -7|] .
The hierarchy H 1 corresponding to all flat zones of the solution x µ 1 to Eq. ( 2) for all µ is depicted in Figure 4(b). Some x µ 1 are given in Figures 4(c) to 4(f) depending on different values for µ. For fast algorithms computing the complete hierarchy of mosaic images, we refer to the ultrametric/saliency framework [START_REF] Najman | On the equivalence between hierarchical segmentations and ultrametric watersheds[END_REF][START_REF] Cousty | Incremental algorithm for hierarchical minimum spanning forests and saliency of watershed cuts[END_REF][START_REF] Najman | Playing with Kruskal: algorithms for morphological trees in edge-weighted graphs[END_REF][START_REF] Cousty | Watershed cuts: Minimum spanning forests and the drop of water principle[END_REF]. Such algorithms allows one to compute the whole family of x µ q for µ ∈ [0, 1] m in linear or quasi-linear time.

7. An application to spectral clustering: the power-ratio cut. Spectral clustering [START_REF] Luxburg | A tutorial on spectral clustering[END_REF] is a successful approach to clustering and many different variations do exist. One of those variations is called ratio-cut [START_REF] Wei | Towards efficient hierarchical designs by ratio cut partitioning[END_REF], and can be described thanks to the following optimization where L is the graph-laplacian 6 , T r is the trace operator and I is the identity matrix. Without restriction in generality, let us suppose that the graph has distinct weights w 1 < w 2 < . . . < w j with j ≤ m. Let us define L k as the graph-laplacian of the subgraph induced by the edges whose weight is exactly w k . As described in [START_REF] Challa | Gamma limit for spectral clustering[END_REF], it can be easily seen that ( 39) is equivalent to (41) minimize

H∈R m×k j k=1 w k T r(H t L k H)
subject to H t H = I By raising the w k at the power p, we can see that (41) fits into the power-watershed framework. Thus, we can define the power-ratio cut as the solution to the γ-limit of (41) when raising w k at the power p and letting p tends to infinity. Algorithm 2 is not applicable to this situation, but we can apply some variation of algorithm 1. A complete theory, together with an efficient algorithm for solving this problem, as well as illustrations (such as the one of Figure 5) and experiments, can be found in [START_REF] Challa | Gamma limit for spectral clustering[END_REF]. 6 The elements of L are given by (40)

Li,j :=

     deg(vi) if i = j -wij if i = j
and vi is adjacent to vj 0 otherwise where deg(vi) = j wij is the degree of the vertex 8. Conclusion: some ideas for extensions and applications. The framework developed in this paper casts a new light on the links and differences between the mathematical morphology theory for segmentation and filtering, and the more classical one based on optimization. We would like to highlight here some possible research directions for the future. Some of those ideas are natural extension of the current paper.

• Exploring the extension of the classical power-watershed, as proposed in Eq. ( 7), is a must. • We showed in section 6 how to express the morphological mosaic images as a Γ-limit of some Total-Variation operators. The next steps would be to look at the theory of scale-set image analysis [START_REF] Guigues | Scale-sets image analysis[END_REF][START_REF] Kiran | Global-local optimizations by hierarchical cuts and climbing energies[END_REF] and find if it would be possible to obtain optimal hierarchies composed of optimal partitions. This possibly would allows us to think the watershed operator as a projector, and would probably allows to strenghten the ideas developed in [START_REF] Couprie | Anisotropic Diffusion Using Power Watersheds[END_REF] regarding anisotropic diffusion. • Regarding spectral classification, we hint in section 7 at what can be done with the ratio-cut criterion [START_REF] Challa | Gamma limit for spectral clustering[END_REF]. Other criterions, such as normalized cuts [START_REF] Shi | Normalized cuts and image segmentation[END_REF], should of course be studied, but this could be more difficult. Such a study could lead to applications in machine learning such as graph matching and non-linear dimensionality reduction techniques. • Application of the proposed framework for morphological filtering, in order to clarify links and differences between for example MST-based filtering [START_REF] Stawiaski | Minimum spanning tree adaptive image filtering[END_REF][START_REF] Bao | Tree filtering: Efficient structure-preserving smoothing with a minimum spanning tree, Image Processing[END_REF] and distancebased filtering (such as the amoeba framework [START_REF] Lerallut | Image filtering using morphological amoebas[END_REF]) is also of interest. A first step in this direction can be found in [START_REF] Danda | Power tree filter: A theoretical framework explaining and extending the minimum spanning tree filter[END_REF]. We list below some other open problems.

8.1. Is x useful for estimating x p ?. Such an estimation would be most useful. For example, if we know that x p is close to x , then x can be used to initialize a convergence process to x p .

Under certain conditions, we can obtain such an estimation. For example, with strong convexity: for any strongly convex function γ, there exists ν > 0 such that (42)

xx 0 2 2 ≤ 2 ν (γ(x) -γ(x 0 )).

where x 0 is the unique minimum of γ. Hence we can approximate x p with x . However, ν would also tend to 0 when p → ∞, so this has to be dig in.

8.2. Link between the continuous world and the discrete one. When ϕ ij (x) = ϕ k (x) = |x|, Eq. ( 3) is equivalent to a min-cut/max-flow problem. This problem has a continuous formulation, that was proposed by G. Strang [START_REF] Strang | Maximal flow through a domain[END_REF]. But the maximum spanning tree problem, being a tree problem, is purely discrete, and we do not see any obvious formulation in continuous terms.

Can the link between max-flow/min-cut and maximum spanning tree described in the present paper be used for proposing a continuous notion of maximum spanning tree?

Figure 2 : 4 . 3 .

 243 Figure2: Applying algorithm 2 on Eq.[START_REF] Soille | Constrained connectivity for hierarchical image decomposition and simplification[END_REF]

Theorem 5 . 2 .

 52 Solving Eq. (2) on G is equivalent to solving it on M ST (G). Proof. It is a straightforward consequence of Theorem 4.2 and of Lemma 5.1. Indeed, let e ij ∈ M ST (G), with w ij = λ k . According to Lemma 5.1, e ij links two vertices of a component C of [w] λ k-1 . Hence, by Theorem 4.2 (more precisely, by application of algorithm 2), either all the potential of the vertices of C have been fixed at a previous scale, or C has been contracted. We denote by R(G) the graph obtained by contracting any non-seeded component of [w] t for any t > 0. Theorem 5.3. Solving Eq. (2) on G is equivalent to solving it on M ST (R(G)).

4 Figure 4 :

 44 Figure 4: An example of application of the Γ-limit of the TV-L1 scheme corresponding to Eq. subsection 6.2.

Figure 5 :

 5 Figure5: From[START_REF] Challa | Gamma limit for spectral clustering[END_REF], an example of comparison between ratio-cut and power-ratio cut spectral clusterings on two nested noisy circular sets of 2D points.

8. 3 .

 3 Extension to quantum mechanics. Everything here should extend to Schrödinger operators. This might open the door for novel applications in physics.

  ) forall scales λ k by decreasing value do forall connected components C of [w] λ k do if C is seeded then Fix the unknown potential x i of the vertices v i ∈ V (C) by minimizing Q k

	on C.
	end
	else Contract C. ;
	end
	end
	Algorithm 2: Power watershed algorithm, optimizing Eq. (2)

See article by Combettes & Pesquet[START_REF] Combettes | Proximal splitting methods in signal processing[END_REF] for all the necessary hypotheses.

This tree structure is called the Max-tree in the literature. There exist fast algorithms for building this Max-tree[START_REF] Carlinet | A comparative review of component tree computation algorithms[END_REF].

As in the contraction of a connected set C we remove any edge connecting two (not necessarily different) vertices of the set, there is no loop in the resulting contracted set.

Acknowledgments. The author would like to thank A. Challa, S. Danda, F. Malgouyre, J.-C. Pesquet and H. Talbot, as well as the anonymous reviewers, for their insightful comments of previous versions of this paper.

Dedicated to the memory of Monique Benayoun (14 novembre 1944 -24 janvier 2014), in whose apartment I wrote the very first draft of this paper.

Submitted to the editors DATE. Funding: This work has been partly funded by ANR-15-CE40-0006 CoMeDiC and ANR-14-CE27-0001 GRAPH-SIP research grants.


Mireille Tixier
email: mireille.tixier@uvsq.fr

Joël Pouget
email: pouget@lmm.jussieu.fr

Conservation laws of an electro-active polymer

Keywords: Electro-active polymers, balance laws, conservation laws, multiphysics coupling, deformable porous media PACS 47.10.ab, PACS 47.56.+r, PACS 61.41.+e, PACS 83.60.Np

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

Electro-active polymers (EAP) have attracted much attention from scientists and engineers of various disciplines. In particular, researches in the field of biomimetics (for instance, in robotic mechanisms are based on biologicallyinspired models) and for the use as artificial muscles (see, for instance, the review of Shahinpoor [START_REF] Shahinpoor | Ionic polymer-metal composites (IPMC's) as biomimetic sensors, actuators and artificial muscles -a review[END_REF] and [START_REF] Shahinpoor | Ionic polymer-metal composites (IPMC's) as biomimetic sensors, actuators[END_REF] or [START_REF] Samatham | Active polymers: An overview[END_REF]) and more recently EAPs are excellent candidates for energy harvesting devices [START_REF] Sodano | A review of power harvesting from vibration using piezoelectric materials[END_REF], [START_REF] Liu | Electroactive polymers for mechanical energy harvesting[END_REF] and [START_REF] Liu | Investigation of electrostrictive polymers for energy harvesting[END_REF]. Roughly speaking, such polymers have responses to external electric stimulation by displaying a significant shape and size variations. This interesting property offers many promising applications in advanced technologies. In addition, they can be used as actuators or sensors. As actuators the EAPs are characterized by the fact they undergo a large amount of deformation while sustaining large forces. They are often called artificial muscles [START_REF] Shahinpoor | Continuum electromechanics of ionic polymeric gels as artificial muscles for robotic applications[END_REF], [START_REF] Shahinpoor | The effect of surface-electrode resistance on the performance of ionic polymer-matal composite (IPMC) artificial muscles[END_REF] and [START_REF] Bar-Cohen | Characterization of the electromechanical properties of EAP materials[END_REF]. Electro-active polymers can be divided in several categories according to their process of activation and chemical compositions. Nevertheless, they can be placed in two major categories : electronic and ionic categories. These both categories come in several families [START_REF] Samatham | Active polymers: An overview[END_REF] (among them, ferroelectric polymers, dielectric EAP, electrostrictive paper, electro-viscoelastic elastomers, ionic polymer gels, conductive polymers, etc.). The first category of EAP is the electronic type. Concerning their advantages the E.A.P. can operate in room conditions with rapid response in time; in addition they induce relatively large actuation forces. One of the main disadvantage is that they require high voltage (150 MV/m). The second category, the ionic EAPs, with which the present work is concerned, operates with low voltage (few volts) producing large bending displacements. Their drawbacks are more or less slow response and low actuation force. They operate best in humid environment and they can be made as self-contained encapsulated actuators to be used in dry environment.

In the present study the emphasis is placed especially on the ionic polymer metal composite (IPMC) [START_REF] Nemat-Nasser | Electromechanical response of ionic polymers metal composites[END_REF]. The structure consists of thin ion-exchange membrane of Nafion, Flemion or Aciplex (polyelectrolyte) plated on both faces by conductive electrodes (generally platinum or gold). In short, to explain the mechanism of deformation of an EAP, a thin trip of polymers is placed between thin conductive electrodes. Upon the application of an electric field across a slightly humid EAP, the positive counter ions move towards the negative electrode (cathode), whole negative ions that are fixed (or immobile) to the polymer backbone experience an attractive force from the positive electrode (anode). At the same time, water molecules in the EAP backbone diffuse towards the region of high positive ion concentration (near the negative electrode) to equalize the charge distribution. As a result, the water or solvent concentration in the region near the anode increases and the concentration in the region near the cathode decreases, leading to strain with linear distribution along the step thickness which causes the bending towards the positive anode. Conversely, if the strip of electro-active polymers is suddenly bent, a difference of electric voltage is produced between electrodes [START_REF] Newbury | Electromechanical modelling and characterization of ionic polymer benders[END_REF] and [START_REF] Yoon | Analysis of electro-active polymers bending : A component in a low cost ultrathin scanning endoscope[END_REF].

The theories or models to explain the mechanism of deformation in EAP are yet to emerge. Nevertheless, some heuristic or empiric models are available in the literature. One of the most interesting and comprehensive accounts for chemical mechano-electric effect of the ionic transport coupled to electric field and elastic deformation of the polymer. A micro mechanical model has been developped by Nemat-Nasser [START_REF] Nemat-Nasser | Electromechanical response of ionic polymers metal composites[END_REF] and [START_REF] Nemat-Nasser | Micro-mechanics of actuator of ionic polymer-metal composites[END_REF] accounting for coupled ion transport, electric field and elastic deformation to predict the response of the IPMC. The model presented is mostly governed by Gauss equation for the conservation of electric charge, a constitutive equation for ion flux vector and a so-called generalized Darcy's law for the water molecule velocity. Other models based on linear irreversible thermodynamics have been proposed by Shahinpoor et al. [START_REF] Shahinpoor | The effect of surface-electrode resistance on the performance of ionic polymer-matal composite (IPMC) artificial muscles[END_REF] and [START_REF] Gennes | Mechanoelectric effects in ionic gels[END_REF]. The model considers standard Onsager formulation for the simple description of ion transport (current density) and the flux of the solvent transport. The conjugate forces are the electric field and the gradient of pressure. In different way, Shahinpoor and co-workers propose models for micro-electro-mechanics of ions polymeric gels based on continuum electromechanics [START_REF] Shahinpoor | Continuum electromechanics of ionic polymeric gels as artificial muscles for robotic applications[END_REF].

The present work focus on a novel approach for electro-active polymers based on thermodynamics of continua. More precisely, we present a detailed approach for such polymer material using the concepts of non-equilibrium thermodynamical processes. The material is then modeled by the coexistence of two phases. The first one is the backbone polymer or the solid phase with fixed anion while the second phase is the solvent containing the free cations. The method consists of computing an average of the different phases over a representative elementary volume containing the phases at the micro scale. The statistical average leads to macro scale quantities defined all over the material. The main difficulty of the method is that we must account for the interfaces which exist between phases for which interfacial quantities must be defined. On using this procedure for different conservation laws of the present multiphase material, we deduce the equation of mass conservation, the electric charge conservation, the conservation of the momentum, the different energy balance equations at the macroscopic scale of the whole material.

The paper is organized as follows. The description of the model and the definition of phases are presented with underlying physics in the next Section. Section 3 is devoted to the equations of conservation of mass. Since the polymer contains electric charges, the electric charge conservation and interface equations are presented in Section 4. The following Section places the emphasis on the linear momentum balance equation where the macroscopic stress tensor is defined. Moreover, the Maxwell's tensor is placed in evidence due to the action of the electric field on the moving electric charges. The Section 6 presents the energy balance laws, that is, the potential energy, the kinetic energy, the total energy and internal energy balance equations. At last, the discussion is reported in Section 7 and finally conclusions are drawn in Section 8.

Modelling

As mentioned in the introduction, the system under study is made of a thin membrane of an ionic electro-active polymer saturated with water and coated on both sides with thin metal layers used as electrodes. Water, even in small quantity, causes a quasi-complete dissociation of the polymer and the release of positive ions (cations) in water; negative ions (anions) remain bound to the polymer backbone [START_REF] Chabé | Etude des interactions moléculaires polymère-eau lors de l'hydratation de la membrane Nafion[END_REF]. When an electric field perpendicular to the electrodes is applied, cations move towards the negative side, carrying solvent away by an osmosis phenomenon. This solvent displacement leads to a polymer swelling on the negative electrode side and to a compression on the opposite side, resulting in a bending of the strip.

To model this system, we describe the polymer chains as a deformable porous medium; this solid is saturated by an ionic solution composed by water and cations. The whole material is considered as a continuum, which is the superposition of three systems whose velocity fields are different : a deformable solid component made up of polymer backbone negatively charged and fluid trapped in the unconnected porosity (the "solid component"), and a liquid composed of water and cations located in the connected porosity. Anions are bound to the solid component. Quantities relative to the different components will be respectively identified by subscripts 1, 2 and 3 for cations, solvent and solid. Subscript 4 will refer to the solution, i.e. both components 1 and 2. Quantities without subscript refer to the whole material. Solid and solution are separated by an interface (subscript i) whose thickness is supposed to be negligible. Components 2, 3 and 4 as well as the global material are assimilated to continua. Modelling of the interface is detailled in the appendix.

Solid and solution are supposed to be incompressible phases. We assume the gravity and the magnetic field are negligible; the only external force acting on the system is the electric force.

To describe this complex dispersed medium, we use a coarse-grained model developed by Nigmatulin [START_REF] Nigmatulin | Spatial averaging in the mechanics of heterogeneous and dispersed systems[END_REF], [START_REF] Nigmatulin | Dynamics of multiphase media[END_REF], Drew [START_REF] Drew | Mathematical modeling of two-phase flows[END_REF], Drew and Passman [START_REF] Drew | Theory of multicomponents fluids[END_REF] and Ishii and Hibiki [START_REF] Ishii | Thermo-fluid dynamics of two-phase flow[END_REF] for two-phase mixtures [START_REF] Lhuillier | A mean-field description of two-phase flows with phase changes[END_REF]. We use two scales. The microscopic scale must be small enough so that the corresponding volume only contains a single phase (3 or 4), but large enough to use a continuous medium model. For Nafion completely saturated with water, it is about hundred Angstroms. At the macroscopic scale, the representative elementary volume (R.E.V.) contains phases 3 and 4. It must be large enough so that average quantities relative to the whole material make sense, and small enough so that these quantities can be considered as local. Its characteristic length is about micron [START_REF] Collette | Vieillissement hygrothermique du Nafion[END_REF], [START_REF] Gierke | The morphology in Nafion perfluorinated membrane products, as determined by wide-and small-angle X-ray studies[END_REF] and [START_REF] Chabé | Etude des interactions moléculaires polymère-eau lors de l'hydratation de la membrane Nafion[END_REF]. For each phase 3 and 4, we define a microscale Heaviside-like function of presence χ k ( -→ r , t) by χ k = 1 when phase k occupies point -→ r at time t, χ k = 0 otherwise [START_REF] Shahinpoor | Ionic polymer-metal composites (IPMC's) as biomimetic sensors, actuators and artificial muscles -a review[END_REF] χ k remains unchanged in case of displacement following the interface velocity -→ V 0 i . We obtain

--→ gradχ k = --→ n k χ i ∂χ k ∂t = -→ V 0 i • -→ n k χ i for k = 3, 4 (2)
where the Dirac-like function

χ i = - --→ gradχ k • -→ n k (in m -1
) denotes the function of presence of the interface and -→ n k the outward-pointing unit normal to the interface in the phase k.

The quantities related to each phase have significant variation over space and time, as well as the positions of each phase. In order to define macroscale quantities relative to the whole material, we consider a representative elementary volume (R.E.V.) containing the three components and the microscale quantities are statistically averaged over the R.E.V.. This statistical average, denoted by and obtained by repeating many times the same experiment with the same boundary and initial conditions, is supposed to be equivalent to a volume average (ergodic hypothesis). The average thus defined commutes with the space and time derivatives (Leibniz' and Gauss' rules, Drew [START_REF] Drew | Mathematical modeling of two-phase flows[END_REF]; Lhuillier [START_REF] Lhuillier | A mean-field description of two-phase flows with phase changes[END_REF]). On denoting by k the average over the phase k of a quantity relative to the phase k only, a microscale quantity g 0 k satisfies

g k = χ k g 0 k = φ k g 0 k k (3)
where φ k = χ k is the volume fraction of the phase k. The macroscale quantity g k is defined all over the material. In the following, superscript 0 denotes the microscale quantities of each phase. The macroscale quantities, which are averages defined everywhere, are written without superscript.

Equation of conservation of mass

In the following, we assume that the polymer is enough hydrated to be completely dissociated. For the water, solution and solid phases, the microscale mass continuity equation can be written as

∂ρ 0 k ∂t + div ρ 0 k -→ V 0 k = 0 (4)
where -→ V 0 k is the local velocity of the phase k and ρ 0 k its mass density. Phases 2 and 3 are incompressible, so we obtain

div -→ V 0 k = 0 (5)
The different phases do not interpenetrate, thus we can write

-→ V 0 1 χ i = -→ V 0 2 χ i = -→ V 0 3 χ i = -→ V 0 4 χ i = -→ V 0 i χ i (6)
Using ( 4) and ( 2) we deduce

∂χ k ρ 0 k ∂t + div χ k ρ 0 k -→ V 0 k = ρ 0 k -→ V 0 i • -→ n k χ i -ρ 0 k -→ V 0 k • -→ n k χ i (7)
For the phase k, the mass density relative to the whole material volume and the barycentric velocity are defined respectively by

ρ k = χ k ρ 0 k = φ k ρ 0 k -→ V k = χ k ρ 0 k -→ V 0 k χ k ρ 0 k = -→ V 0 k (8)
neglecting the velocities fluctuations on the R.E.V. scale.

ρ 0 4 = ρ 0 2 φ 2 φ 4 + CM 1 (9)
where M k is the molar mass of the component k and C the cations molar concentration relative to the solution volume. It follows

ρ 4 = ρ 1 + ρ 2 with ρ 1 = φ 4 CM 1 (10)
assuming that the concentration fluctuations are negligible and that the solution is diluted. In the same way the velocity of the solution can be written as

ρ 0 4 -→ V 0 4 = CM 1 -→ V 0 1 + ρ 0 2 φ 2 φ 4 -→ V 0 2 ρ 4 -→ V 4 = ρ 1 -→ V 1 + ρ 2 -→ V 2 (11)
Averaging over the material R.E.V., we finally obtain

∂ρ k ∂t + div ρ k -→ V k = 0 k = 1, 2, 3, 4 (12)
The interfaces have no mass. Consequently, we deduce for the complete material

∂ρ ∂t + div ρ -→ V = 0 ( 13
)
where ρ and -→ V denote the mass density and the barycentric velocity of the whole material

ρ = k=3,4 ρ k ρ -→ V = k=3,4 ρ k -→ V k ( 14
)
4 Electric equations

Electric charge conservation

The microscale electric charge conservation of the phase k can be written

div -→ I 0 k + ∂ ρ 0 k Z 0 k ∂t = 0 (15)
where -→ I 0 k denotes the current density vector and Z 0 k the electric charge per unit of mass (Z 0 2 and Z 0 3 are constants).

-→ I 0 3 = ρ 0 3 Z 0 3 -→ V 0 3 -→ I 0 4 = M 1 CZ 0 1 -→ V 0 1 ( 16
)
Z 0 k = z k F M k for k = 1, 3 Z 0 2 = 0 Z 0 4 = CM 1 Z 0 1 ρ 0 4 ( 17
)
where z k is the number of elementary charges of an ion and F the Faraday's constant.

Averaging over the R.E.V., we obtain

div -→ I k + ∂ρ k Z k ∂t = - -→ i 0 k • -→ n k χ i (18)
in which the macroscale mass charge and current density vector are defined as

ρ k Z k = χ k ρ 0 k Z 0 k -→ I k = χ k -→ I 0 k (19)
with

-→ I 3 = χ 3 -→ I 0 3 = ρ 3 Z 3 -→ V 3 -→ I 4 = χ 4 -→ I 0 4 = ρ 1 Z 1 -→ V 1 (20)
-→ i 0 k = -→ I 0 k -ρ 0 k Z 0 k -→ V 0
k denotes the microscale diffusion current in phase k. Quantities relative to the interfaces are defined in the appendix. The interface electric charge density per unit surface Z i and the current density vector -→ I i satisfy the following mean condition

∂Z i ∂t + div -→ I i = -→ i 0 3 • -→ n 3 χ i + -→ i 0 4 • -→ n 4 χ i (21)
Adding up equations [START_REF] Drew | Mathematical modeling of two-phase flows[END_REF] for the solid, the solution and ( 21) for the interfaces, it follows for the whole material

div -→ I + ∂ρZ ∂t = 0 ( 22
)
where ρZ = 3,4 ρ k Z k + Z i -→ I = ρ 1 Z 1 -→ V 1 + ρ 3 Z 3 -→ V 3 + -→ I i (23)

Maxwell's equations

One can reasonably neglect the effects of the magnetic field. The electric fields -→ E 0 k and the electric displacements -→ D 0 k of the solid and the solution are governed by the Maxwell's equations

-→ rot -→ E 0 k = -→ 0 div -→ D 0 k = ρ 0 k Z 0 k ( 24
)
The associated boundary conditions can be presented as

-→ n 3 ∧ -→ E 0 3 χ i = --→ n 4 ∧ -→ E 0 4 χ i -→ D 0 3 • -→ n 3 χ i + -→ D 0 4 • -→ n 4 χ i + Z 0 i χ i = 0 (25)
Averaging equations ( 24) over the R.E.V., we derive the following macroscale equations for the solid and the solution

-→ rot -→ E k = -→ 0 div -→ D k = ρ k Z k - -→ D 0 k • -→ n k χ i ( 26
)
in which the macroscale electric fields and displacements are defined as

-→ E k = χ k -→ E 0 k χ k -→ D k = χ k -→ D 0 k ( 27
)
Electric field is an intensive thermodynamic variable. In principle, it displays spatial and time fluctuations within the R.E.V.. Considering this volume is tiny, we assume that the fluctuations are not relevant; we venture the same hypothesis for the concentration and the velocities of the phases. Furthermore, we suppose that macroscale electric fields are identical in all the phases. Adding up equations [START_REF] Coussy | Thermomechanics of saturated porous solids in finite deformation[END_REF] for the solid and the solution, it follows for the whole material

-→ rot -→ E = -→ 0 div -→ D = ρZ (28)
using [START_REF] Biot | Variational Lagrangian-thermodynamics of nonisothermal finite strain. Mechanics of porous solids and thermonuclear diffusion[END_REF]. Parameters of the complete material are defined by

-→ E = 3,4 φ k -→ E k = -→ E k -→ D = 3,4 -→ D k (29)
We conclude that the E.A.P. verifies the same Maxwell's equations and the same law of conservation of charge as an isotropic homogeneous linear dielectric.

Constitutive relations

A reasonable approximation is that solid and solution can be regarded as isotropic linear dielectrics

-→ D 0 k = ε 0 k -→ E 0 k ( 30
)
where ε 0 k denotes the permittivity of the phase k. Average over the R.E.V. gives

-→ D k = ε k -→ E k (31)
in which :

ε k = χ k ε 0 k (32)
is the mean permeability of the phase k relative to the total volume. The constitutive relation of the E.A.P. takes on the following form

-→ D = ε -→ E ( 33
)
where the whole material permittivity is defined by

ε = k=3,4 ε k (34)
On considering our assumptions, the E.A.P. is equivalent to an isotropic linear dielectric. We however point out that its permittivity a priori varies over time and space because of variations of the volume fractions φ 3 and φ 4 .

5 Linear momentum conservation law

Particle derivatives and material derivative

In order to write the remaining balance equations, it is necessary to calculate the variations of the extensive quantities following the material motion. This raises a problem because the different phases do not move with the same velocity : velocities of the solid and the solution are a priori different. For a quantity g, we can define particle derivatives following the motion of the solid ( d3 dt ), the solution ( d4 dt ) or the interface ( di dt )

d k g dt = ∂g ∂t + --→ gradg • -→ V k (35)
Let us consider an extensive quantity of density g ( -→ r , t) relative to the whole material. According to the theory developped by O. Coussy [START_REF] Coussy | Mechanics of porous continua[END_REF] and implicitly used in [START_REF] Biot | Variational Lagrangian-thermodynamics of nonisothermal finite strain. Mechanics of porous solids and thermonuclear diffusion[END_REF] and [START_REF] Coussy | Thermomechanics of saturated porous solids in finite deformation[END_REF], we are able to define a derivative following the motion of the different phases of the medium. We will call it the "material derivative"

D Dt g ρ = k=3,4,i ρ k ρ d k g k ρ k dt ( 36
)
where g 3 , g 4 and g i are the densities relative to the total actual volume attached to the solid, the solution and the interface, respectively (for example, if g is the volume density, we set g 3 = 1φ and g 4 = φ where φ is the porosity)

g = g 3 + g 4 + g i (37) d k dt g k ρ k
is the derivative following the motion of the phase k of the mass density associated with the quantity g k . Using [START_REF] Yoon | Analysis of electro-active polymers bending : A component in a low cost ultrathin scanning endoscope[END_REF], we derive

ρ D g ρ Dt = k=3,4,i ∂g k ∂t + div g k -→ V k (38)
for a scalar quantity and

ρ D -→ g ρ Dt = k=3,4,i ∂ -→ g k ∂t + -→ div -→ g k ⊗ -→ V k ( 39
)
for a vector quantity. This derivative must not be confused with the derivative d dt following the barycentric velocity -→ V .

Linear momentum balance equation

On assuming that the gravity and the magnetic field are negligible, the only applied volume force is the electric one. The microscale momentum balance equation of the phase k is then written as

∂ρ 0 k -→ V 0 k ∂t + -→ div ρ 0 k -→ V 0 k ⊗ -→ V 0 k = -→ divσ 0 k + ρ 0 k Z 0 k -→ E 0 k ( 40
)
where σ 0 k , the microscale stress tensor of the phase k, is symmetric. The linear momentum of the interfaces per surface unit is zero (see appendix). On accounting for the assumptions concerning the local velocities, it follows that at the macroscopic scale

∂ρ k -→ V k ∂t + -→ div ρ k -→ V k ⊗ -→ V k = -→ divσ k + ρ k Z k -→ E k + -→ F k (41)
where

σ k = χ k σ 0 k -→ F k = σ 0 k • -→ n k χ i (42)
We verify that the macroscale stress tensor of the phase k, σ k , is symmetric. -→ F k represents the resultant of the mechanical stresses exerted on the phase k by the other phase; it is an interaction force. Concerning the interfaces, we obtain the following mean condition (cf § 9), which expresses the linear momentum conservation law for the interfaces

-→ F 3 + -→ F 4 = Z i -→ E i (43)
The interface momentum is zero, then the volume linear momentum of the whole material is ρ

-→ V = ρ 3 -→ V 3 + ρ 4 -→ V 4 .
On using the definition of the material derivative (39), we obtain

ρ D -→ V Dt = -→ divσ + ρZ -→ E (44) in which σ = k=3,4 σ k (45)
We check that σ is a symmetric tensor and that in the absence of any external force (

-→ E = -→ 0 ), the total linear momentum is conserved. Using Maxwell's equations ( 28) and ( 33), (44) becomes

ρ D -→ V Dt = -→ div σ + ε -→ E ⊗ -→ E - E 2 2 I + E 2 2 --→ gradε (46) ε -→ E ⊗ -→ E -E 2 2 I
is the Maxwell's tensor, which is here symmetric. The additional term E 2 2 --→ gradε is produced by the non homogeneous material permittivity.

6 Energy balance laws

Potential energy balance equation

Solid and solution are supposed to be non-dissipative isotropic linear media. As a consequence the balance equation for the potential energy or Poynting's theorem can be written in the integral form [START_REF] Jackson | Classical electrodynamics[END_REF], [START_REF] Maugin | Continuum mechanics of electromagnetic solids[END_REF]

d dt Ω 1 2 -→ E • -→ D + -→ B • -→ H dv = - ∂Ω -→ E ∧ -→ H • -→ n ds - Ω -→ E • -→ I dv (47)
assuming that no charge goes out of the volume Ω. The left hand side represents the variation of the potential energy attached to the volume Ω following the charge motion. If the charges are mobile, the associated local equation writes for the phase k, neglecting the magnetic field

∂E 0 pk ∂t + div E 0 pk -→ V 0 k = - -→ E 0 k • -→ I 0 k k = 3, 4 (48)
in which

E 0 pk = 1 2 -→ D 0 k • -→ E 0 k k = 3, 4 (49)
is the potential energy per unit of volume of the phase k. On taking the statistical average of (48) over the R.E.V., we obtain

∂E pk ∂t + div E pk -→ V k = - -→ E k • -→ I k (50)
where

E pk = χ k E 0 pk = 1 2 -→ D k • -→ E k (51)
The mean volume potential energy associated to the interfaces satisfies (see appendix)

∂E pi ∂t + div E pi -→ V i = - -→ E i • -→ I i (52)
The potential energy balance equation for the whole material is then

ρ D Dt E p ρ = - -→ E • -→ I ( 53
)
where

E p = 3,4,i E pi = 1 2 -→ D • -→ E ( 54
)
The production of potential energy in the R.E.V. is equal to the volume power --→ E • -→ I of the force due to the action of the electric field on the density of electric charges.

Kinetic energy balance equation

The microscale kinetic energy balance equation derives from (40)

∂E 0 ck ∂t + div E 0 ck -→ V 0 k = div σ 0 k -→ V 0 k -σ 0 k : grad -→ V 0 k + ρ 0 k Z 0 k -→ E 0 k • -→ V 0 k ( 55
)
where the microscale volume kinetic energy of the phase k is

E 0 ck = 1 2 ρ 0 k V 02 k (56)
In the same way, (41) is transformed into

∂E ck ∂t + div E ck -→ V k = -→ V k • -→ divσ k + ρ k Z k -→ V k • -→ E k + -→ F k • -→ V k (57)
where

E ck = 1 2 ρ k V 2 k ( 58
)
is the macroscale volume kinetic energy of the phase k. The interface kinetic energy is zero (see appendix).

On summing up the equations (57) for phases 3 and 4, we arrive at

ρ D Dt EcΣ ρ = 3,4 ∂E ck ∂t + div E ck -→ V k = 3,4 div σ k • -→ V k -σ k : grad -→ V k + 3,4 ρ k Z k -→ V k + Z i -→ V i • -→ E (59
) where E cΣ is the sum of the volume kinetic energies of the different phases with respect to the laboratory reference frame

E cΣ = E c3 + E c4 (60)
E cΣ is distinct from the kinetic energy of the whole material because the phase velocities are different. The total volume kinetic energy E c is defined as

E c = 1 2 ρV 2 = 3,4 1 2 ρ k V 2 (61)
From (38), we deduce

ρ D Dt E c ρ = ∂E c ∂t + div E c -→ V (62)
Using (59), it follows

ρ D Dt Ec ρ = ∂ ∂t E c - 3,4 E ck + div 3,4 σ k • -→ V k -E ck -→ V k + E c -→ V - 3,4 σ k : grad -→ V k + 3,4 ρ k Z k -→ V k + Z i -→ V i • -→ E (63)
The last two terms of this equation are source terms. The penultimate one represents the viscous dissipation, that is to say kinetic energy conversion into internal energy. The last term is the electric force volume power, which corresponds to a potential energy conversion into kinetic energy. As for the first two terms, they correspond to the kinetic energy flux, which is both due to the contact forces work

3,4 div σ k • -→
V k and to the relative velocity of the two phases: the kinetic energy of the phases with respect to the barycentric reference frame becomes indeed part of the internal energy of the whole material.

Total energy conservation law

The total energy of the present system is the sum of its internal, potential and kinetic energies. The energy fluxes come from contact forces work and heat conduction. The microscale energy conservation law for the phase k can be written as

∂E 0 k ∂t + div E 0 k -→ V 0 k -σ 0 k • -→ V 0 k + -→ Q 0 k = 0 (64)
where

E 0 k = U 0 k + 1 2 ρ 0 k V 02 k + 1 2 -→ E 0 k • -→ D 0 k (65)
is the total microscale energy of the phase k.

-→ Q 0 k denotes the microscale heat flux of the phase k and U 0 k its microscale internal energy. Average over the R.E.V. leads to

∂E k ∂t + div E k -→ V k -div σ k • -→ V k + div -→ Q k = -→ F k • -→ V k + P k ( 66
)
where

E k = χ k E 0 k = U k + E ck + E pk U k = χ k U 0 k -→ Q k = χ k -→ Q 0 k (67
) and

P k = - -→ Q 0 k • -→ n k χ i (68) -→ F k • -→ V k + P k
represents the energy exchanges between the different phases through the interfaces : contact forces work and heat fluxes. We obtain the following condition for the interfaces (see appendix)

∂E i ∂t + div E i -→ V i = -P 3 -P 4 - -→ F 3 • -→ V 3 - -→ F 4 • -→ V 4 ( 69
)
where E i is the total energy density of the interfaces averaged over the R.E.V.. On summing equations (66) for k = 3, 4 and (69), we obtain the conservation law of the total volume energy of the whole material

E ρ D Dt E ρ = div   k=3,4 σ k • -→ V k   -div -→ Q (70)
where

E = 3,4,i E k = U + E c + E p -→ Q = k=3,4 -→ Q k (71)
The source term of this equation is zero, which is the expression of the conservation law of the energy.

3,4 σ k • -→ V k and -→ Q represent the volume power
of the contact forces and the heat fluxes of the complete medium, respectively.

Internal energy balance equation

The internal energy equation is obtained by subtracting kinetic and potential energy equations ( 55) and (48) from the total energy conservation law (64)

∂U 0 k ∂t + div U 0 k -→ V 0 k + -→ Q 0 k = σ 0 k : grad -→ V 0 k + -→ I 0 k -ρ 0 k Z 0 k -→ V 0 k • -→ E 0 k (72)
Algebraic manipulations of (66), ( 57) and (50) lead to

∂U k ∂t + div U k -→ V k + -→ Q k = σ k : grad -→ V k + -→ i k • -→ E k - -→ Q 0 k • -→ n k χ i ( 73
)
and for the interfaces (see appendix)

∂U i ∂t + div U i -→ V i = -→ Q 0 3 • -→ n 3 χ i + -→ Q 0 4 • -→ n 4 χ i - -→ i i • -→ E i ( 74
)
where U i denotes the volume internal energy of interfaces included in the R.E.V.. Let us define U Σ as the sum of the volume internal energies of the different phases

U Σ = U 3 + U 4 + U i (75)
From (38), we derive

ρ D Dt U Σ ρ = 3,4 σ k : grad -→ V k + -→ i • -→ E -div -→ Q (76)
where -→ i represents the diffusion current, consisting of the diffusion currents of the interfaces and of the cations in the solution

-→ i = -→ I - k=3,4 ρ k Z k -→ V k -Z i -→ V i = ρ 1 Z 1 -→ V 1 - -→ V 4 + -→ i i (77)
U Σ represents only a part of the internal energy of the whole material; another part comes from the motion of the different phases in the barycentric reference frame. The internal energy of the whole material is defined by

U = E -E c -E p = U Σ + E cΣ -E c (78)
One deduces

ρ D Dt U ρ = div 3,4 E ck -→ V k -E c -→ V + ∂ ∂t 3,4 E ck -E c -div -→ Q + 3,4 σ k : grad -→ V k + -→ i • -→ E (79)
The first two terms in the right-hand side represent the volume internal energy flux due to the relative velocities of the phases. The fourth one is the volume kinetic energy converted into heat by viscous dissipation. And the last term is the volume heat source by Joule effect in the solution.

Discussion

The conservation laws obtained for the global material include simplest cases. Assuming that the material is not electrically charged or removing the electric field, we obtain the equations governing a single-phase flow in porous medium [START_REF] Coussy | Mechanics of porous continua[END_REF]. In case that the stress tensor is zero and that the velocities of the two phases are identical and uniform, we find the equations of a charged rigid solid subjected to an electric field.

The balance equations of the kinetic, potential, internal and total energies all have the same structure : the energy variation following the motion of one constituent, which is a particle derivative, is the sum of a flux and of source terms. The equations we write are relative to a thermodynamic closed system because of the use of the material derivative. Source terms correspond to conversion of one kind of energy into another one. At the microscopic scale, we obtain the following tables for the phase k

flux E 0 pk E 0 ck div σ 0 k • -→ V 0 k U 0 k -div -→ Q 0 k E 0 k div σ 0 k • -→ V 0 k - -→ Q 0 k (80)
and

E c ←→ E p U ←→ E p E c ←→ U E 0 pk -ρ 0 k Z 0 k -→ E 0 k • -→ V 0 k - -→ I 0 k -ρ 0 k Z 0 k -→ V 0 k • -→ E 0 k E 0 ck +ρ 0 k Z 0 k -→ E 0 k • -→ V 0 k -σ 0 k : grad -→ V 0 k U 0 k + -→ I 0 k -ρ 0 k Z 0 k -→ V 0 k • -→ E 0 k +σ 0 k : grad -→ V 0 k E 0 k (81)
Fluxes can be considered as the rate of variation of the quantity associated with the conduction phenomenon. The flux of kinetic energy is due to the contact force work, and the flux of internal energy to the heat conduction. The total energy flux is then the sum of the two previous ones. We point out that there is no flux for the potential energy. The viscous dissipation σ 0 k : grad

-→ V 0 k
transforms the kinetic energy into heat, that is to say into internal energy. The work of the electric forces produces two source terms : the first one is the scalar product of the electric field -→ E 0 k and of the diffusion current

-→ I 0 k -ρ 0 k Z 0 k -→ V 0
k , which is the electric current measured in the barycentric reference frame. It can be seen as Joule heating, that is as a conversion of potential energy into internal energy. The other part ρ

0 k Z 0 k -→ V 0 k • -→ E 0
k results in a motion of the electric charges subject to the electric field; potential energy is thus transformed into kinetic energy. Furthermore, the energy conservation law is consequently satisfied. Accordingly, there is no source term in the balance equation of the total energy.

We can examine in the same way the balance equations for one phase averaged over the R.E.V. That highlights the source terms

E c ←→ E p U ←→ E p E c ←→ U E pk -ρ k Z k -→ V k • -→ E k - -→ i k • -→ E k E ck +ρ k Z k -→ V k • -→ E k -σ k : grad -→ V k U k + -→ i k • -→ E k +σ k : grad -→ V k (82)
Viscous dissipation and Joule heating transform kinetic energy and potential energy into internal energy, respectively. And conversion of potential energy into kinetic energy is due once more to electric charges motion subject to the effect of the electric field. The other terms of the equations can be presented in the form flux interfacial exchanges

E pk E ck div σ k -→ V k + -→ F k • -→ V k U k -div -→ Q k - -→ Q 0 k • -→ n k χ i E k div σ k • -→ V k - -→ Q k + -→ F k • -→ V k + P k (83)
where

-→ F k • -→ V k = σ 0 k • -→ n k • -→ V 0 k χ i P k = - -→ Q 0 k • -→ n k χ i (84)
As before, the flux of internal energy is the heat transfer by conduction, and the flux of kinetic energy is the volume power of the contact forces within the phase. Additional terms arise from this analysis; they represent exchanges between the phases through the interfaces.

-→ F k • -→ V k is thus the volume power of the interaction forces acting on the phase k and corresponds to a kinetic energy input. --→ Q 0 k • -→ n k χ i results from the heat transfer through the interface and modifies the internal energy. The sum of these two terms modifies the total energy of the considered phase.

Concerning the whole E.A.P., we obtain the following decomposition

flux E p E c div 3,4 σ k • -→ V k -E ck -→ V k + E c -→ V + ∂ ∂t E c - 3,4 E ck U div 3,4 E ck -→ V k -E c -→ V - -→ Q + ∂ ∂t 3,4 E ck -E c E div 3,4 σ k • -→ V k - -→ Q (85)
and

E c ←→ E p U ←→ E p E c ←→ U E p - k=3,4 ρ k Z k -→ V k + Z i -→ V i • -→ E - -→ i • -→ E E c + 3,4 ρ k Z k -→ V k + Z i -→ V i • -→ E - 3,4 σ k : grad -→ V k U + -→ i • -→ E + 3,4 σ k : grad -→ V k
(86) The energy flux comes from the work of the contact forces in the different phases and from the heat transfer by conduction; the first one is a flux of kinetic energy, the second one is the flux of internal energy. The flux of potential energy is still zero. An additional flux term appears : the kinetic energy of the different phases measured in a barycentric reference frame; this kinetic energy is indeed a part of the internal energy of the global material. The source terms include viscous dissipation, which transforms kinetic energy into heat, and Joule heating, which transforms potential energy into internal energy. This last term is linked to the diffusion current created by the interfacial charges motion and by the cations motion in the solution reference frame. The global motion of the charges under the influence of the electric field turns potential energy on kinetic energy.

Conclusion

We have modelled an electroactive, ionic, water-saturated polymer placed in an electric field. The polymer is fully dissociated, releasing cations of small size. This system is depicted as the superposition of two continuous media : a deformable porous medium constituted by the polymer backbone embedded with anions, in which flows an ionic solution composed by water and released cations. We have deduced the microscale conservation laws of each phase : mass continuity equation, linear momentum conservation law, Maxwell's equations and energy balance laws. Then we derived the physical quantities attached to the interfaces. An average over the R.E.V. of the material has provided one with macroscale conservation laws for each phase first and for the global E.A.P., next. Having the three constituents of the material (solid, solvent and cations) different velocities, we have used for this last step, the material derivative concept in order to obtain an Eulerian formulation of the conservation laws.

We have examined the balance equations of the different energies (kinetic, potential and internal ones), and we have put the emphasis on the phenomena responsible for the conversion of one kind of energy into another : viscous frictions, Joule effect and charge motion under the effect of the electric field. The first two results in dissipation. Moreover, the macroscale equations relative to each phase allow an evaluation of energy exchanges through the interfaces.

Using the linear thermodynamics of the irreversible processes we should now be able to determine the potential of dissipation and to derive the phenomenological equations governing this system. This will be the subject of a forthcoming work.

Appendix : interface modelling

In practice, contact area between phases 3 and 4 has a certain thickness; extensive physical quantities like mass density, linear momentum and energy continuously vary from one bulk phase to the other one. This complicated reality can be modelled by two uniform bulk phases separated by a discontinuity surface Σ whose localization is arbitrary. Let Ω be a cylinder crossing Σ, whose bases are parallel to Σ. We denote by Ω 3 and Ω 4 the parts of Σ respectively included in phases 3 and 4.

The continuous quantities relative to the contact zone are identified by a superscript 0 and no subscript. A microscale quantity per surface unit g 0 i related to the interface is defined by

g 0 i = lim Σ-→0 1 Σ Ω g 0 dv - Ω3 g 0 3 dv - Ω4 g 0 4 dv (87)
where Ω 3 and Ω 4 are small enough so that g 0 3 and g 0 4 are constant. Its average over the R.E.V. is the volume quantity g i defined by

g i = g 0 i χ i (88)
The balance equation of the interfacial quantity g 0 i is written as (Ishii,[START_REF] Ishii | Thermo-fluid dynamics of two-phase flow[END_REF])

∂g 0 i ∂t + div s g 0 i -→ V 0 i = 3,4 g 0 k -→ V k - -→ V 0 i • -→ n k + -→ J 0 k • -→ n k -div s -→ J 0 i + φ 0 i
where div s denotes the surface divergence operator.

-→ J 0 i is the surface flux of g 0 i , -→ J 0 k the flux of g 0 k and φ 0 i the surface source term.

We arbitrarily fix the interface position in such a way that it has no mass density

ρ 0 i = lim Σ-→0 1 Σ Ω ρ 0 dv - Ω3 ρ 0 3 dv - Ω4 ρ 0 4 dv = 0 (89)
From ( 6), we deduce that the linear momentum and the kinetic energy per surface unit of the interface, respectively denoted -→ P 0 i and E 0 ci , are zero -→

P 0 i = -→ 0 E 0 ci = 0 (90)
In the same way, we define the charge per unit surface Z 0 i , the surface current vector -→ I 0 i , the surface diffusion current -→ i 0 i , the surface potential energy E 0 pi , the surface internal energy U 0 i and the surface total energy E 0 i . The balance equations of these quantities write

∂Z 0 i ∂t + div s Z 0 i -→ V 0 i = -→ i 0 3 • -→ n 3 + -→ i 0 4 • -→ n 4 -div s -→ i 0 i (91) ∂ -→ P 0 i ∂t + --→ div s -→ P 0 i ⊗ -→ V 0 i = -σ 0 3 • -→ n 3 -σ 0 4 • -→ n 4 + Z 0 i -→ E 0 i ( 92
)
∂E 0 pi ∂t + div s E 0 pi -→ V 0 i = - -→ I 0 i • -→ E 0 i ( 93
)
∂E 0 i ∂t + div s E 0 i -→ V 0 i = -σ 0 3 • -→ n 3 • -→ V 0 3 -σ 0 4 • -→ n 4 • -→ V 0 4 + -→ Q 0 3 • -→ n 3 + -→ Q 0 4 • -→ n 4 ( 94
)
∂U 0 i ∂t + div s U 0 i -→ V 0 i = -→ Q 0 3 • -→ n 3 + -→ Q 0 4 • -→ n 4 + -→ i 0 i • -→ E 0 i ( 95
)
Averaging over the R.E.V., this leads to the boundary conditions below

∂Z i ∂t + div -→ I i = -→ i 0 3 • -→ n 3 χ i + -→ i 0 4 • -→ n 4 χ i (96) -→ F 3 + -→ F 4 = Z i -→ E i (97)
∂E pi ∂t + div E pi -→ V i = - -→ I i • -→ E i ( 98
)
∂E i ∂t + div s E i -→ V i = -P 3 -P 4 - -→ F 3 • -→ V 3 - -→ F 4 • -→ V 4 ( 99
)
∂U i ∂t + div U i -→ V i = -→ Q 0 3 • -→ n 3 χ i + -→ Q 0 4 • -→ n 4 χ i + -→ i i • -→ E i (100)
Moreover, we have -→

I i = Z i -→ V i + -→ i i 10 Notations k = 1,
( -→ Q k , -→ Q 0 k ) : heat flux; U (U Σ ,U k ,U 0 k ) : internal energy density; -→ V ( -→ V k , -→ V 0

  k ) : velocity; z k : number of elementary charges of a ion k; Z (Z k ,Z 0 k ) : total electric charge per unit of mass; Z i (Z 0 i ) : electric charge density per unit surface; ε (ε k ,ε 0 k ) : permittivity; ρ (ρ k ,ρ 0 k ) : mass density; σ (σ k ,σ 0 k ) : stress tensor; φ k : volume fraction of phase k; χ k : function of presence of phase k ;

  2, 3, 4, i subscripts respectively represent cations, solvent, solid, solution (water and cations) and interface; quantities without subscript refer to the whole material. Superscript 0 denotes a local quantity; the lack of superscript indicates average quantity at the macroscopic scale. Microscale volume quantities are relative to the volume of the phase, average quantities to the volume of the whole material. E c (E cΣ ,E ck ,E 0 ck ) : kinetic energy density; E p (E pk ,E 0 pk ) : potential energy density; F = 96487 C mol -1 : Faraday's constant ; -→ F k : resultant of the mechanical stresses exerted on the phase k by the other phase;

	C : cations molar concentration (relative to the liquid phase); -→ D ( -→ D k , -→ D 0 k ) : electric displacement field; E (E k ,E 0 k ) : total energy density (internal, kinetic and potential); -→ E ( -→ E k , -→ E 0 k ) : electric field;
	-→ I ( -→ I k , -→ i ( -→ i k ,	-→ I 0 k ) : current density vector; -→ i 0 k ) : diffusion current;
	M k : molar mass of component k; -→ n k : outward-pointing unit normal of phase k;
	P k : heat flux through interfaces; -→ P 0 i : local surface linear momentum of interface; -→ Q

Acknowledgements The authors would like to thank D. Lhuillier and O. Kavian for their fruitful and stimulating discussions.