**3. Optimal control**

Function *T*0ð Þ *x* represents the distribution of the temperature at the initial time:

The fluid velocity *u* is obtained by solving, in Ω��0*, Tf* ½, the incompressible

� *ν*Δ*u* þ ð Þ *u:*∇ *u* þ ∇*p* ¼ *f* <sup>1</sup>*ψ*<sup>1</sup> þ *f* <sup>2</sup>*ψ*2*,*

where *p x*ð Þ *; t* is the water pressure; *ν* . 0 is the kinematic viscosity; *f* <sup>1</sup>ð Þ*t* and *f* <sup>2</sup>ð Þ*t* are, respectively, the velocity sources in Ω<sup>1</sup> and Ω2. At the inlet, the velocity is

On the impermeable boundary, it is assumed that the velocity is equal to zeros

The boundary conditions applied to the velocity and the pressure are summa-

The system is also completed by the initial condition for the velocity:

In order to reduce the pollution in an arbitrary area Ω*OBS*, a freshwater is introduced in the subdomain Ω2. We are seeking the optimal rate *U* at which the freshwater is introduced, such that the temperature in Ω*OBS* must be as closed as possible to a prescribed threshold denoted *Td*. This optimal control must be the

*div u*ð Þ¼ 0*,*

*2.2.2 Velocity and pressure*

Navier-Stokes system:

due to the viscosity:

rized in **Figure 3**.

*2.2.3 Cost functional*

**Figure 3.**

**24**

minimum of the cost function:

*Boundary conditions for the velocity and pressure.*

*∂u ∂t*

*Numerical Modeling and Computer Simulation*

known and given by a function *uin*ð Þ *x; t* . It is written

On the outflow boundary, the pressure is equal to zeros:

*T*ð Þ¼ 0 *T*<sup>0</sup> on Ω*:* (6)

*u* ¼ *uin* on Γ*IN*��0*, Tf* ½*:* (8)

*u* ¼ 0 on Γ*N*��0*, Tf* ½*:* (9)

*p* ¼ 0 on Γ*OUT*��0*, Tf* ½*,* (10)

*u*ð Þ¼ 0 *u*<sup>0</sup> on Ω*:* (11)

(7)

### **3.1 Cost functional**

The aim is to find an optimal control *U* minimizing the cost function:

$$\tilde{f}(v) = f(T(v), v), \quad \forall v \in \mathcal{U}\_{ad}. \tag{13}$$

where <sup>U</sup>*ad* <sup>¼</sup> *<sup>L</sup>*<sup>2</sup> ð Þ Ω<sup>2</sup> is the admissible function space. By considering the symmetric, continuous, coercive bilinear form

$$\pi(\mathfrak{s}, \boldsymbol{v}) = \; ^\leq T(\mathfrak{s}) - T\_{\mathfrak{0}}, T(\boldsymbol{v}) - T\_{\mathfrak{0}} > + \boldsymbol{\beta} \; \lhd \; \mathfrak{s} - U\_{\mathfrak{d}}, \boldsymbol{v} - U\_{\mathfrak{d}} > \tag{14}$$

for all *s, v*∈ *Uad*, and the linear bounded functional

$$F(v) = \le T\_d - T\_{0\*} \, T(v) - T\_0 >,\tag{15}$$

the cost function is written

$$\tilde{J}(\boldsymbol{\nu}) = \frac{1}{2} \left( \boldsymbol{\pi}(\boldsymbol{\nu}, \boldsymbol{\nu}) + \|T\_d - T\_0\|^2 \right) - F(\boldsymbol{\nu}).\tag{16}$$

We are in the framework of Theorem 16.1 in [12] that establishes the existence and uniqueness of solution to the minimization problem.

#### **3.2 Directional derivative**

First, for a fixed *h*∈*L*<sup>2</sup> ð�0*, Tf* ½ Þ *;* U*ad* , two function sequences

$$T\_{\lambda} = T(U + \lambda h), \quad w\_{\lambda} = T\_{\lambda} - T \tag{17}$$

are considered, for all λ . 0.

#### *3.2.1 Sequences convergence*

The difference between equations satisfied by *T*<sup>λ</sup> and *T* results to the following one:

$$\frac{\partial w\_{\lambda}}{\partial t} - k \Delta w\_{\lambda} + u.\nabla w\_{\lambda} = \lambda h \nu\_{2} \text{ in } \Omega \times ]0, T\_{f}[,$$

$$w\_{\lambda} = \mathbf{0} \text{ on } \Gamma\_{IN} \times ]\mathbf{0}, T\_{f}[, \tag{18}$$

$$-k \frac{\partial w\_{\lambda}}{\partial \vec{n}} = \mathbf{0} \text{ on } \Gamma\_{N} \times ]\mathbf{0}, T\_{f}[,$$

$$-k\frac{\partial w\_{\lambda}}{\partial \overrightarrow{n}} + a\_T \left( u, \overrightarrow{n} \right) w\_{\lambda} = \mathbf{0} \text{ on } \Gamma\_{OUT} \times ]\mathbf{0}, T\_f[,$$

$$w\_{\lambda}(\mathbf{0}) = \mathbf{0} \text{ on } \overline{\Omega}.$$

Unfortunately, this directional derivative does not provide an explicit expression

must be written as a scalar product on *h*. In this scope, the Lagrangian approach

Equation (25) is multiplied by the adjoint function *p*~ and integrated over

ð *Tf*

0 , *∂wu*

! � �*p*~Þ*wu* � *<sup>k</sup> <sup>∂</sup>wu*

By using the initial and boundary conditions of *wu*, the terms *I*<sup>1</sup> and *I*<sup>2</sup> become

� �*dσdt:*

<sup>Γ</sup>*<sup>N</sup> <sup>k</sup> <sup>∂</sup>p*<sup>~</sup> *∂n*

Hence, we assume that *p*~ is solution of the adjoint problem:

*k ∂p*~ *∂n*

*p T* ~ð Þ¼ 0 on Ω*:*

*∂n* ! *p*~

! þ *α<sup>T</sup> u: n*

! *pd*<sup>~</sup> *<sup>σ</sup>* <sup>þ</sup> <sup>Ð</sup>

! � �*p*<sup>~</sup> � �*wud<sup>σ</sup>* <sup>þ</sup> <sup>Ð</sup>

<sup>Γ</sup>*<sup>N</sup>* <sup>∪</sup> <sup>Γ</sup>*OUT <sup>k</sup> <sup>∂</sup>p*<sup>~</sup>

! <sup>¼</sup> <sup>0</sup> on ð Þ�� <sup>Γ</sup>*<sup>N</sup>* <sup>∪</sup> <sup>Γ</sup>*OUT* <sup>0</sup>*, Tf* <sup>½</sup>*,*

*∂n* ! *wudσ*

� �*dt:*

� �*dt:*

� *k*Δ*p*~ � *u:*∇*p*~ ¼ ð Þ *T* � *Td ψOBS* in Ω��0*, Tf* ½*,*

*p*~ ¼ 0 on Γ*IN*��0*, Tf* ½*,*

, � *<sup>∂</sup> <sup>p</sup>*<sup>~</sup> *∂t*

, ð Þ *T* � *Td ψOBS, wu* . *dt* (27)

*<sup>∂</sup><sup>t</sup>* � *<sup>k</sup>*Δ*wu* <sup>þ</sup> *<sup>u</sup>:*∇*wu, <sup>p</sup>*<sup>~</sup> . *dt:* (28)

� *k*Δ*p*~ � *u:*∇*p,w* ~ *<sup>u</sup>* . *dt* þ *I*<sup>1</sup> þ *I*2*,* (29)

<sup>Γ</sup>*OUT <sup>k</sup> <sup>∂</sup>p*<sup>~</sup> *∂n* ! *wudσ*

(30)

of the gradient. To achieve this, the term

*DOI: http://dx.doi.org/10.5772/intechopen.88646*

**3.3 Explicit gradient**

Ω��0*, Tf* ½. The result is

ð *Tf*

, *hψ*Ω<sup>2</sup>

<sup>Ω</sup> *wu Tf*

<sup>Ω</sup>*wu Tf*

<sup>0</sup> � Ð <sup>Γ</sup>*IN <sup>k</sup> <sup>∂</sup>wu ∂n*

0

where

• *<sup>I</sup>*<sup>1</sup> <sup>¼</sup> <sup>Ð</sup>

• *<sup>I</sup>*<sup>2</sup> <sup>¼</sup> <sup>Ð</sup> *Tf* 0 Ð

• *<sup>I</sup>*<sup>1</sup> <sup>¼</sup> <sup>Ð</sup>

• *<sup>I</sup>*<sup>2</sup> <sup>¼</sup> <sup>Ð</sup> *Tf*

**27**

ð *Tf*

0

Integrations by parts lead to

*, p*~ . *dt* ¼

� �*p T* ~ *<sup>f</sup>*

*<sup>∂</sup><sup>Ω</sup> <sup>k</sup><sup>∂</sup> <sup>p</sup>*<sup>~</sup> *∂n*

� �*p T* ~ *<sup>f</sup>*

� �*dx,*

From the condition *u* ¼ 0 on Γ*N*, it becomes

*<sup>I</sup>*<sup>2</sup> <sup>¼</sup> <sup>Ð</sup> *Tf*

� *∂p*~ *∂t*

! *pd*<sup>~</sup> *<sup>σ</sup>* <sup>þ</sup> <sup>Ð</sup>

<sup>0</sup> � Ð <sup>Γ</sup>*IN <sup>k</sup> <sup>∂</sup>wu ∂n*

Consequently, it becomes *I*<sup>1</sup> ¼ 0, *I*<sup>2</sup> ¼ 0, and

�

ð *Tf*

*Optimal Control of Thermal Pollution Emitted by Power Plants*

0

, *hψ*Ω<sup>2</sup> *, p*~ . *dt* ¼

ð *Tf*

0

� � � *wu*ð Þ <sup>0</sup> *<sup>p</sup>*~ð ÞÞ <sup>0</sup> *dx,* �

! þ *α<sup>T</sup> u: n*

is used and consists of solving an adjoint system, stated below.

If *<sup>u</sup>* <sup>∈</sup>*L*<sup>∞</sup>ð � <sup>Ω</sup>� <sup>0</sup>*, Tf* ½Þ, this previous system admits a unique weak solution satisfying

$$\|\|\boldsymbol{\mu}\_{\lambda}\|\|\_{L^{2}(]0,T\_{f}[\boldsymbol{V}]} + \|\|\boldsymbol{w}\_{\lambda}\|\|\_{C\left(\left[0,T\_{f}\right],H\right)} + \|\boldsymbol{w}\_{\lambda}\|\|\_{L^{2}(]0,T\_{f}\left[L^{2}(\Gamma\_{\rm OUT})\right)} \leq \mathsf{C}\lambda \|\boldsymbol{h}\|\|\_{L^{2}(]0,T\_{f}[\boldsymbol{\mathcal{U}}\_{\rm ad}]}.\tag{20}$$

with *<sup>C</sup>* . 0 [13]. The functional spaces are defined by *<sup>H</sup>* <sup>¼</sup> *<sup>L</sup>*<sup>2</sup> ð Þ Ω and

$$W = \left\{ v \in H^1(\Omega) \text{ such that } v = 0 \text{ on } \Gamma\_{\mathcal{N}} \right\}. \tag{21}$$

It can be deduced from the preceding inequality that

$$\lim\_{\lambda \to 0} w\_{\lambda} = 0 \quad \text{in} \ L^2(]0, T\_f[, V) \cap C([\mathbf{0}, T\_f], H). \tag{22}$$

#### *3.2.2 Directional derivative computation*

A direct computation gives us

$$\tilde{f}(U + \lambda h) - \tilde{f}(U) = \frac{1}{2} \int\_0^{T\_f} (\leq (T\_\lambda + T - 2T\_d)\mu\_{\rm OLS}, \boldsymbol{w}\_\lambda > + \, \prec \lambda \beta (2(U - U\_d) + \lambda h)\boldsymbol{\mu}\_\lambda, h > ) d\text{t.s.} \tag{23}$$

By dividing this last equality by λ, it becomes

$$\frac{\tilde{J}(U+\lambda h)-\tilde{J}(U)}{\lambda} = \frac{1}{2} \left| \left( <(T\_{\lambda}+T-2T\_{d})\psi\_{\text{OBS}}, \mu\_{u}>+\right.<\!/2(U-U\_{d})+\lambda h \right) \mu\_{2}, h>\!/\!/4,\tag{24}$$

where *wu* <sup>¼</sup> *<sup>w</sup>*<sup>λ</sup> <sup>λ</sup> is solution of the equation:

$$\frac{\partial w\_u}{\partial t} - k \Delta w\_u + u.\nabla w\_u = h\psi\_2 \text{ in } \Omega \times ]0, T\_f[,$$

$$w\_u = 0 \text{ on } \Gamma\_{IN} \times]0, T\_f[,$$

$$-k \frac{\partial w\_u}{\partial \vec{n}} = 0 \text{ on } \Gamma\_N \times ]0, T\_f[, \tag{25}$$

$$-k \frac{\partial w\_u}{\partial \vec{n}} + a\_T \begin{pmatrix} u. \ \vec{n} \end{pmatrix} w\_u = 0 \text{ on } \Gamma\_{OUT} \times ]0, T\_f[,$$

$$w\_u(0) = 0 \text{ on } \overline{\Omega}.$$

By passing to the limit λ ! 0, the directional derivative is written

$$\tilde{J}'(U) \cdot h = \int\_0^{T\_f} (<(T - T\_d)\mu\_{\text{ORS}}, \mu\_u > +<\beta(U - U\_d)\mu\_2, h >) dt. \tag{26}$$

Unfortunately, this directional derivative does not provide an explicit expression of the gradient. To achieve this, the term

$$\left. \int\_{0}^{T\_f} \right| < (T - T\_d) \nu\_{\text{OBS}}, w\_u > dt \tag{27}$$

must be written as a scalar product on *h*. In this scope, the Lagrangian approach is used and consists of solving an adjoint system, stated below.
