Derivation of the Adjoint Drift Flux Equations for Multiphase Flow

: The continuous adjoint approach is a technique for calculating the sensitivity of a ﬂow to changes in input parameters, most commonly changes of geometry. Here we present for the ﬁrst time the mathematical derivation of the adjoint system for multiphase ﬂow modeled by the commonly used drift ﬂux equations, together with the adjoint boundary conditions necessary to solve a generic multiphase ﬂow problem. The objective function is deﬁned for such a system, and speciﬁc examples derived for commonly used settling velocity formulations such as the Takacs and Dahl models. We also discuss the use of these equations for a complete optimisation process. scenarios and geometries, but this work will remain private and unpublished.


Introduction
The adjoint method is currently attracting significant interest as an optimization process in CFD. The objective of the adjoint approach is to calculate the sensitivity of the flow solution with respect to changes in the input parameters, most commonly changes in the geometry. This can then in principle be used as the basis for an iterative optimization algorithm based on gradient information (the sensitivities) which can optimize the design with many fewer function evaluations than would be the case for non-gradient-based approaches (such as genetic algorithms). Calculating the sensitivities requires differentiating the governing equations with respect to the changes of the input parameters, and since the governing equations for fluid flow are the Navier-Stokes equations (or equations derived from these such as the Reynolds Averaged Navier Stokes equations), this is understandably very challenging. There are two main approaches; the discrete adjoint approach, and the continuous adjoint approach. In the discrete adjoint approach, the sensitivity matrix is calculated numerically by evaluating the system for small changes in the inputs and applying standard finite difference methods. In the continuous adjoint approach, the sensitivities are calculated mathematically using lagrange multipliers. This is more elegant and provides an implementation which is easier to code, requires fewer evaluations and can be made numerically consistent with the evaluation of the original equation set. However it does require significant mathematical analysis in advance, and if the problem formulation changes (different equations, boundary conditions etc) this has to be repeated. Examples of the application of the continuous adjoint method for single phase flow can be found in a range of areas [1,2] such as automotive [3][4][5], aerospace [6,7] and turbomachinery [8][9][10], and implementations of the equations can be found in general purpose CFD codes such as STAR-CCM, ANSYS Fluent [11] and Engys Helyx [4]. However the equations are complex to develop and application to multiphase systems is only just starting [12]. In many cases, even just the evaluation of the sensitivities is valuable, as they can be used to indicate possible changes to the design engineers. Beyond this the sensitivities can also be used as the basis for an optimization loop [2]. This of course necessitates the morphing of the geometry through techniques such as volumetric B-splines [13] or Radial Basis Functions [14] and consequent updating of the mesh [15].
Multiphase flow is the simultaneous flow of two or more immiscible phases in a system. In dispersed multiphase systems, one or more of the phases exists as fluid particles small enough not to be resolved in the simulation; examples include gas bubbles in water, emulsions (liquid droplets in another immiscible liquid) and actual solid particles in gas or liquid. A wide variety of different mathematical models have been derived over the years to describe dispersed multiphase flow, including mixture models, lagrangian particle tracking, and eulerian n-fluid models [16,17]. Which is used depends on the exact physics of the problem, as well as factors such as available computing resources and desired accuracy. In many physical systems, the density ratio between the two phases is low, generally less than 2:1, and the drag force between them is high. Therefore, to a good approximation, the two phases can be considered to respond to pressure gradients as a single phase. Additionally, the slip (drift) between the phases is primarily due to the gravitational settling of the dispersed phase. This might adequately describe solid particles in water or an emulsion of immiscible liquids, and in these cases a commonly used mathematical model is the drift flux model. Hence it is this set of equations we have decided to focus on.
In the drift flux model, the two phases are treated as one: the momentum and continuity equations for both phases are summed to create a mixture-momentum and mixture-continuity equation, and the transport of the dispersed phase is modelled using a drift equation. The three equations, collectively called the drift flux equations, are listed below: where: • α is the dispersed-phase volume fraction, • ρ c is the continuum density, µ m is the mixture viscosity, defined as the sum of the continuum, dispersed-phase and mixture turbulent viscosities, g is the acceleration due to gravity, • F is the capillary force and • K is the turbulent diffusion coefficient, defined as the mixture eddy diffusivity, ν t m = µ t m ρ m . In summing the momentum equations, not only have the number of equations been reduced from four to three, but the inter-phase momentum transfer terms have also been eliminated which were numerically unstable [18]. Hence, a far more robust equation set has been produced and the computational resources required to solve the system have been reduced. This also makes it a very appropriate basis from which to develop an adjoint formulation suitable for applying to dispersed multiphase flows in this regime. This is the challenge of the current paper. We focus in particular on wall-bounded or ducted flows, in which there is no contribution to the objective function from the interior of the domain, in other words, the performance of the system is entirely governed by the boundary properties.
The paper is organized as follows. The optimization problem is stated in Section 2 and the adjoint equations for the drift flux model are derived for the general case in Section 2.1. These equations are then applied to the specific case of ducted or wall-bounded flows in Section 3, with the objective function for this case being specified in Section 4, and different settling velocities in Section 5. Finally, the conclusions follow in Section 6.

The Optimization Problem
If the performance of a device is measured by an objective function, J, and the residuals of the primal (flow) equations are given by R, the optimisation problem can be stated as, where x are the design parameters and y are the primal variables [19]. It can then be formulated as, where L is the Lagrange function, λ are the Lagrange multipliers (also referred to as the adjoint variables) and Ω is the flow domain. In this case, the primal equations are the steady state drift flux equations, with the capillary force taken to be zero [18] and a Darcy term included in the mixture-momentum equation. They are rearranged in terms of their residuals, R = (R 1 , R 2 , R 3 , R 4 , R 5 ) T , as follows: where ℵ is the porosity, associated with the Darcy term. The variation of the Lagrange function with respect to the primal variables, (v m , p m , α), and the design parameter, ℵ, is, where, for example, δ α L = L (α + δα) − L (α). We choose the adjoint variables, (u, q, β) = (u 1 , u 2 , u 3 , q, β), so that the variation with respect to the primal variables vanishes, i.e.
and the Lagrange function now varies only with respect to the design parameter,

Derivation of the Adjoint Drift Flux Equations
The adjoint drift flux equations are derived by substituting Equation (3) into Equation (6), giving, which can be expanded to, The variation of R with respect to the primal variables can be determined as: Derivation of Equations (10a), (10g) and (10i) can be found in Appendies A-C, respectively, where the variation of µ t m has been neglected. This is correct only for laminar flow regimes. For turbulent flows, neglecting this variation constitutes a common approximation, known as frozen turbulence [19]. This may introduce errors into the optimisation [20], although there are cases in the literature where the frozen turbulence assumption can be demonstrated to be acceptable [21].
With these variations, Equation (9) now reads, Decomposing the objective function into contributions from the boundary, Γ, and interior, Ω, of the domain, Equation (11) can be reformulated as, Derivation of Equation (13) can be found in Appendix D. In order to satisfy Equation (13) in general, the integrals must vanish individually. The adjoint drift flux equations are deduced from the integrals over the interior of the domain: where: and the boundary conditions for the adjoint variables are deduced from the surface integrals: where: and u n = u · n is the normal component of the adjoint velocity. This is the general form of the adjoint equation system for the steady state drift flux equations with Darcy porosity term and frozen turbulence.

Application to Wall Bounded Flows
Thus far in the paper we have presented the optimisation problem in as generic a way as possible. To proceed further with the derivation we now need to derive expressions for the boundary conditions, objective function and slip velocity. We will examine these for the case of wall-bounded or ducted flows, for which there is no contribution to the objective function from the interior of the domain. So, in the cases where the objective function only involves integrals over the surface of the flow domain rather than over its interior, the adjoint equations reduce to: These equations no longer depend on the objective function, so when switching from one optimisation objective to another, they remain unchanged and only the boundary conditions have to be adapted to the specific objective function. Note that as a result of Equation (18b), ∇ · u = 0 [22] and, therefore, S 2 = 0.
For the adjoint boundary conditions, the terms in Equation (16a) involving µ m can be rewritten as, (Ref. [19]) and therefore the adjoint boundary conditions, Equation (16), reduce to: In order to determine the boundary conditions of the adjoint variables, the boundary conditions imposed on the primal variables are listed in Table 1. We will derive expressions for the three main boundary conditions.

Adjoint Boundary Conditions at the Inlet
At an inlet, the primal velocity and dispersed-phase volume fraction are usually fixed, so, δv m = 0 and δα = 0.
The first integrals in Equations (20a) and (20c) therefore go to zero and Equation (20) reduces to: When both fluids are incompressible, ∇ · v m = 0 [22], and as δv mt = 0 along the inlet, (n · ∇)δv m = (n · ∇)δv mt [19], where v mt is the tangential component of the mixture velocity. Hence, Equation (22) reduces to: where u t is the tangential component of the adjoint velocity, from which we deduce the boundary conditions for the adjoint variables at the inlet to be: Note that these derivations do not impose a condition for q. Since q enters the adjoint drift flux equations in a manner similar to the way p m enters the primal drift flux equations, the zero gradient boundary condition of p m at the inlet is applied to q as well,

Adjoint Boundary Conditions at the Wall
At a wall, typical primal conditions are zero velocity and zero gradient of the dispersed-phase volume fraction. Therefore, we have, v m = 0, δv m = 0 and (n · ∇)δα = 0. (26) The first integral in Equation (20a) and the second integral in Equation (20c) therefore go to zero and the terms in the first integral in Equation (20c), containing v m , go to zero. Equation (20) therefore reduces to: As at the inlet, the primal velocity does not diverge and δv mt = 0 along the wall, so Equation (27) reduces to: from which we deduce the boundary conditions for the adjoint variables at the wall to be: Equation (29c) is used to determine β and, as at the inlet, Equation (25) applies.

Adjoint Boundary Conditions at the Outlet
At an outlet, typical primal conditions are zero pressure and zero gradient of velocity and dispersed-phase volume fraction. Therefore, we have, δp m = 0, (n · ∇)δv m = 0 and (n · ∇)δα = 0.
The second integral in Equations (20a) and (20c) therefore goes to zero and, with δp m = 0, Equation (20b) is identically fulfilled. The remaining terms in Equation (20) are the first integrals in Equations (20a) and (20c), which can be made to go to zero by enforcing the integrands to vanish: Note that the term containing D(v m ) = 0, because (n · ∇)v m = 0. Decomposing Equation (31a) into its normal and tangential components yields: Equations (31b), (32a) and (32b) are used to determine β, q and u t , respectively. Since u n is prescribed at the inlet, the adjoint continuity equation, Equation (18b), is used to calculate u n at the outlet, Φ Γ . The boundary conditions for the adjoint variables at the outlet are summarised as: where ν m = µ m ρ m is the mixture kinematic viscosity. A summary of the boundary conditions for the adjoint variables is presented in Table 2.

Objective Function
The objective function is related to the dispersed-phase mass-flow rate at the boundaries of the domain, where αρ d is the dispersed-phase mass fraction and v d · n is the dispersed-phase velocity normal to the boundary. Since the phase fraction at the inlet is specified, the objective function is defined as the mass-flow rate of solid at the outlet, and Equation (12) becomes, where o refers to the outlet. The derivatives of the objective function, Equation (34), with respect to the primal variables are: Derivation of Equation (36c) can be found in Appendix E. Using these derivatives, the adjoint boundary conditions at an inlet reduces to: At a wall, there is no contribution from the objective function, so: Note that C 2 = 0 because u = 0. At an outlet, to satisfy the adjoint continuity equation, Equation (18b), u n = 0, so: Note that C 2 = 0 because u n = 0 and D(v m ) = 0 when (n · ∇)v m = 0. A summary of the adjoint boundary conditions, using the objective function defined in Equation (34), is presented in Table 3.

Settling Velocity
The equations thus far have been derived for the most general case in which the settling (drift) velocity has not been specified. Of course the settling velocity is key to the behaviour of the drift flux model, and incorporates much of the physics of the multiphase system. Here we will derive the appropriate additional equations for two common settling velocity models, vis. the Dahl [23] and Takacs [24] models.

Dahl Model
In this formulation v dj is modelled using, where v 0 is the maximum theoretical settling velocity and k is a settling parameter, and its partial derivative with respect to α is given by,

Takacs Model
In this formulation v dj is modelled using, where: • a is the hindered settling parameter, • a 1 is the flocculent settling parameter, • α r is the volume fraction of non-settleable solids at the inlet and • v 00 is the maximum practical settling velocity, and its partial derivative with respect to α is given by, For both models the partial derivative of αv dj with respect to α is given by,

Conclusions
In this paper we have derived, for the first time, the adjoint equations based on the drift flux model for dispersed multiphase flow. In addition to the adjoint drift flux equations themselves we have presented the adjoint boundary conditions for the common boundary conditions (Inlet, Outlet, Wall), as well as a treatment of the generic objective function, and specific formulations corresponding to the common settling velocity models proposed by Dahl [23] and Takacs [24]. From these elements a full adjoint set of equations can be derived for any specific ducted flow problem, and of course implemented in an appropriate numerical code. This of course also presents many, largely numerical and coding, challenges, and this will be the subject of subsequent papers.

Conflicts of Interest:
There is no conflict of interest for Hydro International Ltd. in the publication of the paper. Hydro International holds interests in the implementation and application of the methods discussed in the paper for specific scenarios and geometries, but this work will remain private and unpublished.

Appendix A. Derivation of Equation (10a)
The variation of (R 1 , R 2 , R 3 ) T with respect to v m is calculated as, As stated above, µ m is defined as the sum of the continuum, dispersed-phase and mixture turbulent viscosities, where µ c is constant, µ d is a function of v m and α, and µ t m is obtained from turbulence modelling. Equation (A1) can now be rewritten as, where δ v m µ t m has been neglected.
Substituting Equation (A6) into Equation (A11) and rewriting the parentheses as binomial expansions, As α 1 and ρ d ≈ 2ρ c =⇒ 1 − 1 1−α ρ d ρ c < 2 and ignoring terms containing squared and higher powers of α, As stated above, K is defined as the mixture eddy diffusivity, From Equation (A6), 1 ρ m can be written as, ignoring terms containing squared and higher powers of α. Substituting Equations (A14) and (A15) into the term containing K in Equation (A10), ignoring the term containing δα∇δα, because when substitued into Equation (9) becomes terms containing squared powers of δα. Equation (A10) now becomes, where δ α µ t m has been neglected.

Appendix D. Derivation of Equation (13)
Decomposing the objective function into contributions from the boundary and interior of the domain, according to Equation (12), the terms in Equation (11) can be written as follows. The variations of the objective function can be written as, and Applying the product rule, divergence theorem and continuity equation, and using the Einstein notation for clarity, the terms containing u, v m and ∇ can be written as, Applying the tensor-vector identity [25], the divergence theorem and a property of the colon product, demonstrated below, and Applying the product rule and divergence theorem, the remaining terms in Equation (11) can be written as,  Applying the product rule,