Chapter 8 Configuring Fluidity - The Applied Modelling and ...
Chapter 8 Configuring Fluidity - The Applied Modelling and ...
Chapter 8 Configuring Fluidity - The Applied Modelling and ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
34 Numerical discretisation<br />
where the hatted symbols indicate that the quantity in question is continuous between elements. In<br />
the following sections, û will be used to indicate the flux velocity, which will have been calculated<br />
with one of these methods. Note that using the averaging method, û = u on the interior of each<br />
element with only the inter-element flux differing from u while for the projection method, û <strong>and</strong> u<br />
may differ everywhere.<br />
Upwind Flux In this case, the value of c at each quadrature point on the face is taken to be the<br />
upwind value. For this purpose the upwind value is as follows: if the flow is out of the element then<br />
it is the value on the interior side of the face while if the flow is into the element, it is the value on<br />
the exterior side of the face. If we denote the value of c on the upwind side of the face by cupw then<br />
equation (3.27) becomes:<br />
�<br />
ϕ<br />
e<br />
∂c<br />
�<br />
− (∇ · ϕ û) c + ϕn · û cupw = 0,<br />
∂t ∂e<br />
(3.29)<br />
Summing over all elements, including boundary conditions <strong>and</strong> writing cint to indicate flux terms<br />
which use the value of c from the current element only, we have:<br />
�<br />
��<br />
ϕ<br />
e e<br />
∂c<br />
�<br />
− (∇ · ϕ û) c +<br />
∂t ∂e∩∂Ω Dc<br />
n · û gD<br />
−<br />
�<br />
+<br />
∂e∩∂ΩNc ∩∂Ω Dc<br />
n · û cint<br />
+<br />
�<br />
�<br />
(3.30)<br />
+<br />
n · û cupw = 0.<br />
∂e\(∂ΩD∩∂ΩN )<br />
Second integration by parts In <strong>Fluidity</strong> the advection term with upwinded flux may be subsequently<br />
integrated by parts again within each element. As this is just a local operation on the continuous<br />
pieces of c within each element, the new boundary integrals take the value of c on the inside<br />
of the element, cint. On the outflow boundary of each element this means the cint cancels against<br />
cupw (when the summation over all elements occurs). Writing ∂e− for the inflow part of the element<br />
boundary, we therefore obtain:<br />
�<br />
��<br />
ϕ<br />
e e<br />
∂c<br />
�<br />
− ϕ û · ∇c +<br />
∂t<br />
�<br />
+<br />
∂e−∩∂Ω Dc<br />
−<br />
n · û (gD − cint)<br />
n · û (cupw − cint)<br />
∂e−\(∂ΩD∩∂ΩN )<br />
�<br />
= 0.<br />
(3.31)<br />
<strong>The</strong> difference cint − cupw on the inflow boundary remains, <strong>and</strong> is often referred to as a jump condition.<br />
Note also that the boundary terms on the Neumann domain boundary <strong>and</strong> the outflow part of the<br />
Dirichlet boundary (really also a Neumann boundary) have disappeared. Note that (3.30) <strong>and</strong> (3.31)<br />
are completely equivalent. <strong>The</strong> advantage of the second form, referred to in <strong>Fluidity</strong> as “integratedby-parts-twice”,<br />
is that the numerical evaluation of the integrals (quadrature), may be chosen not<br />
to be exact (incomplete quadrature). For this reason the second form may be more accurate as the<br />
internal outflow boundary integrals are cancelled exactly.<br />
Local Lax-Friedrichs flux <strong>The</strong> local Lax-Friedrichs flux formulation is defined in Cockburn <strong>and</strong> Shu<br />
[2001, p208]. For the particular case of tracer advection, this is given by:<br />
�n · u c = 1<br />
2 n · û (cint + cext) − C<br />
2 cint − cext<br />
(3.32)<br />
where cext is the value of c on the exterior side of the element boundary <strong>and</strong> in which for each facet<br />
s ⊂ ∂e:<br />
C = sup |û · n| (3.33)<br />
x∈s