Many mathematical models involve m+1 unknown functions governed by a system of m+1 differential equations. In abstract form we may denote the unknowns by u(0),…,u(m) and write the governing equations as
where Li is some differential operator defining differential equation number i.
There are basically two ways of formulating a variational form for a system of differential equations. The first method treats each equation independently as a scalar equation, while the other method views the total system as a vector equation with a vector function as unknown.
Let us start with the approach that treats one equation at a time. We multiply equation number i by some test function v(i)∈V(i) and integrate over the domain:
Terms with second-order derivatives may be integrated by parts, with Neumann conditions inserted in boundary integrals. Let
such that
where B(i) is a boundary function to handle nonzero Dirichlet conditions. Observe that different unknowns may live in different spaces with different basis functions and numbers of degrees of freedom.
From the m equations in the variational forms we can derive m coupled systems of algebraic equations for the Πmi=0Ni unknown coefficients c(i)j, j=0,…,Ni, i=0,…,m.
The alternative method for deriving a variational form for a system of differential equations introduces a vector of unknown functions
a vector of test functions
with
With nonzero Dirichlet conditions, we have a vector B=(B(0),…,B(m)) with boundary functions and then it is u−B that lies in V, not u itself.
The governing system of differential equations is written
where
The variational form is derived by taking the inner product of the vector of equations and the test function vector:
Observe that (4) is one scalar equation. To derive systems of algebraic equations for the unknown coefficients in the expansions of the unknown functions, one chooses m linearly independent v vectors to generate m independent variational forms from (4). The particular choice v=(v(0),0,…,0) recovers (1), v=(0,…,0,v(m)) recovers (3), and v=(0,…,0,v(i),0,…,0) recovers the variational form number i, ∫ΩL(i)v(i)dx=0, in (1)-(3).
We now consider a specific system of two partial differential equations in two space dimensions:
The unknown functions w(x,y) and T(x,y) are defined in a domain Ω, while μ, β, and κ are given constants. The norm in (6) is the standard Euclidean norm:
The boundary conditions associated with (5)-(6) are w=0 on ∂Ω and T=T0 on ∂Ω. Each of the equations (5) and (6) needs one condition at each point on the boundary.
The system (5)-(6) arises from fluid flow in a straight pipe, with the z axis in the direction of the pipe. The domain Ω is a cross section of the pipe, w is the velocity in the z direction, μ is the viscosity of the fluid, β is the pressure gradient along the pipe, T is the temperature, and κ is the heat conduction coefficient of the fluid. The equation (5) comes from the Navier-Stokes equations, and (6) follows from the energy equation. The term −μ||∇w||2 models heating of the fluid due to internal friction.
Observe that the system (5)-(6) has only a one-way coupling: T depends on w, but w does not depend on T. Hence, we can solve (5) with respect to w and then (6) with respect to T. Some may argue that this is not a real system of PDEs, but just two scalar PDEs. Nevertheless, the one-way coupling is convenient when comparing different variational forms and different implementations.
Let us first apply the same function space V for w and T (or more precisely, w∈V and T−T0∈V). With
we write
Note that w and T in (5)-(6) denote the exact solution of the PDEs, while w and T in (7) are the discrete functions that approximate the exact solution. It should be clear from the context whether a symbol means the exact or approximate solution, but when we need both at the same time, we use a subscript e to denote the exact solution.
Inserting the expansions (7) in the governing PDEs, results in a residual in each equation,
A Galerkin method demands Rw and RT do be orthogonal to V:
Because of the Dirichlet conditions, v=0 on ∂Ω. We integrate the Laplace terms by parts and note that the boundary terms vanish since v=0 on ∂Ω:
The equation Rw in (8) is linear in w, while the equation RT in (9) is linear in T and nonlinear in w.
The alternative way of deriving the variational from is to introduce a test vector function v∈V=V×V and take the inner product of v and the residuals, integrated over the domain:
With v=(v0,v1) we get
Integrating the Laplace terms by parts results in
or since μ and κ are considered constant,
Note that the left-hand side of (13) is again linear in w, the left-hand side of (14) is linear in T and the nonlinearity of w appears in the right-hand side of (14)
The linear systems governing the coefficients c(w)j and c(T)j, j=0,…,N, are derived by inserting the expansions (7) in (10) and (11), and choosing v=ψi for i=0,…,N. The result becomes
It can also be instructive to write the linear systems using matrices and vectors. Define K as the matrix corresponding to the Laplace operator ∇2. That is, Ki,j=(∇ψj,∇ψi). Let us introduce the vectors
We can solve the first system for c(w), and then the right-hand side b(T) is known such that we can solve the second system for c(T). Hence, the decoupling of the unknowns w and T reduces the system of nonlinear PDEs to two linear PDEs.
Despite the fact that w can be computed first, without knowing T, we shall now pretend that w and T enter a two-way coupling such that we need to derive the algebraic equations as one system for all the unknowns c(w)j and c(T)j, j=0,…,N. This system is nonlinear in c(w)j because of the ∇w⋅∇w product. To remove this nonlinearity, imagine that we introduce an iteration method where we replace ∇w⋅∇w by ∇w−⋅∇w, w− being the w computed in the previous iteration. Then the term ∇w−⋅∇w is linear in w since w− is known. The total linear system becomes
This system can alternatively be written in matrix-vector form as
with L as the matrix from the ∇w−⋅∇ operator: Li,j=A(w,T)i,j. The matrix K is Ki,j=A(w,w)i,j=A(T,T)i,j.
The matrix-vector equations are often conveniently written in block form:
Note that in the general case where all unknowns enter all equations, we have to solve the compound system (23)-(24) since then we cannot utilize the special property that (15) does not involve T and can be solved first.
When the viscosity depends on the temperature, the μ∇2w term must be replaced by ∇⋅(μ(T)∇w), and then T enters the equation for w. Now we have a two-way coupling since both equations contain w and T and therefore must be solved simultaneously. The equation ∇⋅(μ(T)∇w)=−β is nonlinear, and if some iteration procedure is invoked, where we use a previously computed T− in the viscosity (μ(T−)), the coefficient is known, and the equation involves only one unknown, w. In that case we are back to the one-way coupled set of PDEs.
We may also formulate our PDE system as a vector equation. To this end, we introduce the vector of unknowns u=(u(0),u(1)), where u(0)=w and u(1)=T. We then have
It is easy to generalize the previous formulation to the case where w∈V(w) and T∈V(T), where V(w) and V(T) can be different spaces with different numbers of degrees of freedom. For example, we may use quadratic basis functions for w and linear for T. Approximation of the unknowns by different finite element spaces is known as mixed finite element methods.
We write
The compound scalar variational formulation applies a test vector function v=(v(w),v(T)) and reads
valid ∀v∈V=V(w)×V(T).
As earlier, we may decoupled the system in terms of two linear PDEs as we did with (15)-(16) or linearize the coupled system by introducing the previous iterate w− as in (23)-(24). However, we need to distinguish between ψ(w)i and ψ(T)i, and the range in the sums over j must match the number of degrees of freedom in the spaces V(w) and V(T). The formulas become
Here, we have again performed a linearization by employing a previous iterate w−. The corresponding block form
has square and rectangular block matrices: K(w) is Nw×Nw, K(T) is NT×NT, while L is NT×Nw,