james&percival, dimitrios&pavlidis, zhihua&xie,&chris&pain ... · p = ⇢2 @e...
TRANSCRIPT
James Percival, Dimitrios Pavlidis, Zhihua Xie, Chris Pain (Applied Modelling & Computa>on Group,
Earth Science & Engineering, Imperial College London) Omar Matar (Chemical Engineering, Imperial College London) Federico Alberini, Mark Simmons (University of Birmingham)
APS DFD mee>ng Monday 24th November 2014
San Francisco, California
Slides available from hRp://jrper.github.io/talks/APS-‐DFD2014
Fluidity – a finite element flow simulator
• (CV)FEM based Navier-‐Stokes/Darcy flow solver framework • Mesh adap>vity capability
on unstructured meshes • Parallelized [MPI/OpenMP] • Mul>material & mul>phase
formula>ons (and both together)
• Used for CFD, GFD and oil reservoir simula>ons
www.fluidity-‐project.org
[email protected] hRp://jrper.github.io/talks/APS-‐DFD2014
Fluidity – mul4phase implementa4on
• Volume of fluid (VOF) approach for interface capturing.
• Compressible advec>on for two phase (n-‐phase) indicator func>ons
• Op>mized for unstructured mesh modeling on simplices (triangles & tetrahedra).
• Control volume-‐ finite element method • Control volumes [phase indicator
func>ons/phase volume frac>on] • Finite elements [pressure/velocity]
• Surface tension also implemented [Z. Xie. R33.1]
• Mul>ple Rheologies: • Power law/Herschel Bulkley • Carreau • Viscoelas>c (Oldroyd – B)
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Pavlidis et. al IJMF(2014) Xie et al. IJMF (2014) Percival et al. IJMF (2014)
Fluidity – mul4phase implementa4on
@Ii@t
+ u ·rIi = 0
@⇢u
@t+ ⇢u ·ru = �rp+ ⇢g + Fvisc
⇢ = ⇢(I)
r · u = 0
Equa>on Set
p = ⇢2@e
@⇢
momentum
mass con>nuity @⇢
@t+r · ⇢u = 0
Implying either:
Indicator func>on
(incompressible) (compressible)
F
visc
=
8><
>:
r · µD Newtonian
r · µe↵
(D)D Shear Dependent
r · ⌧ ⌧ := ⌧(t,x,u) Viscoelastic
Dij =1
2
✓@ui
@xj+
@uj
@xi� 2�ij
3r · u
◆
Fvisc = Fvisc(I)
103 104 105
degrees of freedom
10�2
10�1
100
L2
erro
rno
rm
Fixed MeshAdaptive Mesh
Mesh Adap4vity -‐ examples Ini>al adap>ve
mesh Adap>ve mesh
Fixed mesh 1
Fixed mesh 2
Adap>ve mesh
Fixed mesh 1
Fixed mesh 2
Analy>c solu>on
2 orders of magnitude smaller problem/half error
30x speed up
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Mesh Adap4vity– Interpola4on Error es4mates
Mo>va>on: Céa’s Lemma For sufficiently nice PDEs and linear (or beRer) elements error :=
��� exact �
�
��� C1
��� exact �
proj
���
C2
X
i
h
2i
max
x2⌦
����@
2
@x
2
����
H ( ) =
0
B@
@
2
@x
2@
2
@x@y
@
2
@x@z
@
2
@x@y
@
2
@y
2@
2
@y@z
@
2
@x@z
@
2
@y@z
@
2
@z
2
1
CA
In higher dimensions, error es>mate is a func>on of the Hessian matrix and the edge vectors.
error ⇠X
k
vTk Mvk
M = M (H( ))“Mesh metric”
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Mesh Adap4vity – Interpola4on Error Es4mates
Problem: we don’t know ψexact
Answer: Use old ψδ instead.
Try to extremize
Where the vs are the edges of the mesh M = M �H( �)�
Es>mate second deriva>ves from the finite element data
I(v) =X
k
1
✏vTk Mvk � 1
Addi>onal constraints for • Bounds on min/max edge lengths • Grada>on of the increase • Aspect ra>os • Metric advec>on
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Mesh Adaptvity: Error Es4mate Op4miza4on
Local remeshing algorithm. Preserve the old mesh in regions where it is adequate.
Apply hr adap>vity in the regions where fixing is necessary: Add, remove nodes, reconnect nodes and move nodes. Algorithm works itera>vely, aRacking areas in which edge lengths are far from the ideal calculated from interpola>on error es>mate and freezing sufficently good elements.
!" #$% &' ()'* +,- $../0#$"0,%) -$%10%1 +-,2 ,&"$0%0%1 1,,* 3($/0"4 2')5') 60"5,(" .-0,- 7%,6/'*1' ,+ "5'),/("0,% ", $*$."0%1 "5' 2')5') ", +,//,6 "-$%)0'%") $%* ", 0"'-$"08'/4 $*$." "5' 9%0"' '/'2'%" ),/("0,%:2')5 ",6$-*) $% ,."02$/ )"'$*4 )"$"'; <=$2./') ,+ "50) $-' .-')'%"'* 0% >'#"0,% ? 60"5 $../0#$"0,% ",(%)"'$*4 @(0* @,6 $%* )"'$*4A)"$"' -$*0$"0,% "-$%).,-" .-,&/'2);
!" # $%&' ()*+$+&,*+(- ,-. ,.,)*+/+*0 $%*'(.
B5' 2')5 $*$."080"4 $..-,$#5 *')#-0&'* &'/,6 0) &$)'* ,% $ 8$-0$"0,%$/ +(%#"0,%$/ 650#5 1$(1') "5'3($/0"4 ,+ "5' 2')5 0%#/(*0%1 &,"5 '/'2'%" )0C' $%* )5$.' $) ,&D'#"08'); B5' +(%#"0,%$/ 0) ,."020)'* ()0%1/,#$/ )'$-#5') ,+ "5' 2')5 #,%%'#"080"4 $%* %,*' .,)0"0,%); E% $..-,.-0$"' *'9%0"0,% ,+ $ 2'"-0# &$)'* ,%"5' F'))0$% $//,6) *0)"$%#') 0% "5' *')0-'* <(#/0*'$% ).$#' ", &' #$/#(/$"'*G 650#5 0% "(-% $//,6) "5''/'2'%" H/'%1"5I )0C' ", &' #,%"-,//'* &4G +,- '=$2./'G $ ).'#09'* 0%"'-.,/$"0,% '--,-;
!"#" $%&'(')*&'+, -./0')&'1)
B5' ,."020)$"0,% 2'"5,* $02) ", 02.-,8'G /,#$//4G "5' 6,-)" '/'2'%"; B5' ,8'-$// ,&D'#"08' +(%#"0,% 0)"5' '/'2'%" 3($/0"4 $)),#0$"'* 60"5 "5' 6,-)" '/'2'%" ,+ "5' 2')5; J0"50% "5' ,."020)$"0,%G '$#5 '/'2'%" 0%"5' 2')5 0) 80)0"'* 0% "(-% $%* "5' +,//,60%1 ,.'-$"0,%) $-' .'-+,-2'* 60"50% "5' 80#0%0"4 ,+ "5' '/'2'%"KHLI '*1' #,//$.)0%1M HNI '*1' )./0""0%1M HOI +$#' ", '*1' HP01; LH&II $%* '*1' ", +$#' HP01; LH$II )6$..0%1MH?I '*1' )6$..0%1M HQI %,*' 2,8'2'%";
B5' 2')5 ,."020)'- .-,.,)') $ %'6 %'015&,(-5,,* 2')5 #,%91(-$"0,% H/,#$/ 2')5 "-$%)+,-2$"0,%I650#5 0) $ )2$// #5$%1' 0% "5' 2')5G ()0%1 ,%' ,+ "5' $&,8' ,.'-$"0,%); B50) 0) $##'."'* $) "5' #(--'%" 2')5#,%91(-$"0,% 0+ "5' #5$%1' 0% "5' 2$=02(2 +(%#"0,%$/ $)),#0$"'* 60"5 $// "5' '/'2'%") $R'#"'* &4 "5'#5$%1'G 0) %'1$"08' $%* /')) "5$% $ )2$//%')) .$-$2'"'- !; !% $**0"0,%G 0+ "5' 2$=02(2 +(%#"0,%$/ 8$/(' ,+$// "5' '/'2'%") "5$" 6,(/* &' $R'#"'* &4 $ /,#$/ 2')5 "-$%)+,-2$"0,% 0) /')) "5$% $ #'-"$0% "5-')5,/* 8$/('!! H$ 8$/(' ,+ S;LQ 0) ()'* 5'-'I "5'% "50) 2')5 "-$%)+,-2$"0,% 0) %," #,%)0*'-'*; B5' 8$/(') ,+ ! $%* !!
$-' *'9%'* &'$-0%1 0% 20%* "5' '/'2'%" 3($/0"4G "5' 2,)" #,22,% ,+ 650#5 H$+"'- 2')5 ,."020)$"0,%I 0)$&,(" S;N 2'$)(-'* &4 <3; HQIG )'' >'#"0,% ?; B5$" 0)G
2$="!""!
##"! $ %2$="""
##"$! % ! $%* 2$="""
##"$ ! !! &L'
+,- '/'2'%") 0% "5' )'" " $%* '/'2'%" +(%#"0,%$/) #" (" " " H650#5 2'$)(-' "5' 3($/0"4 ,+ '/'2'%") .I "5$"60// &' '++'#"'* &4 $ .-,.,)'* /,#$/ 2')5 "-$%)+,-2$"0,%M "! 0) "5' )'" ,+G $%* #"! $-' "5' +(%#"0,%$/ 8$/(') ,+"5' '/'2'%") #5$%1'* ,- #-'$"'* &4 "5' .-,.,)'* /,#$/ 2')5 "-$%)+,-2$"0,%; E .,)0"08' %,%AC'-, 8$/(' ,+ !0) ()'* ", $8,0* .-,&/'2) 60"5 -,(%*A,++ '--,- $%* $/), .-,80*') ),2' $**0"0,%$/ #,%"-,/ ,8'- "5' TUV-'3(0-'2'%") ,+ "5' $/1,-0"52 H! ) S"SL 0) "5' *'+$(/" $%* 0) ()'* 0% "5' $../0#$"0,%)I;
P01; L; W01-$2 )5,60%1K H$I '*1' ", +$#' $%* +$#' ", '*1' )6$..0%1M H&I '*1' ", '*1' )6$..0%1 60"5 +,(- '/'2'%");
2"2" 3*', .& *4" 5 2+(%/&" 6.&-+7) 8%%4" 6.1-" 9,:0:" #;< =!<<#> ?@@#A?@;B OXXO
Pain, Umpleby, de Oliveira & Goddard,(2001). Tetrahedral mesh op>misa>on and adap>vity for steady-‐state and transient finite element calcula>ons, Computer Method in Applied Mechanics & Engineering
Anisotropic mesh adaptivity 4593
nodeinsertion
(a) (b)
(d )(c)
edgeswap
nodedeletion
nodemovement
Figure 1. Local element operations used to optimize the mesh in two dimensions. (a) Node insertionor edge split. (b) Node deletion or edge collapse. (c) Edge swap. (d) Node movement.
barotropic gyre-based examples are presented to demonstrate the advantages thatanisotropic variable resolution may deliver over the use of fixed uniform isotropicresolution. The paper concludes with a summary of the findings of this work anddiscussions on some of the extensions required for the use of mesh adaptivity onmore complex real-world problems.
2. Optimization-based mesh adaptivity
(a) Mesh optimization operations
Given an unstructured mesh and information regarding the ideal shape and sizesof the elements making up the mesh, an optimization-based adaptivity algorithmcan be formulated via the use of local topological operations that seeks to improvethe quality of elements.
In the examples presented in this work, a two-dimensional mesh optimizationalgorithm (Agouzal et al. 1999; Vasilevskii & Lipnikov 1999) is used that employsthe following local operations depicted in figure 1.
(i) Node insertion or edge split. Here a node is inserted on a pre-existingedge in the mesh so that the four new elements have improved shape/sizecharacteristics compared with the original two; while the location of thisnew node along the pre-existing edge can be optimized, it is common tosimply split it at its midpoint.
(ii) Node deletion or edge collapse. Here the inverse operation is performedwhereby an edge in the mesh is collapsed, and consequently a node isdeleted and two elements removed from the mesh.
(iii) Edge swap. Here an edge between two elements is removed and replacedwith the only other possible configuration in two dimensions; the numberof nodes and elements is preserved through the operation, but the edgelengths and element shapes are manipulated.
Phil. Trans. R. Soc. A (2009)
on 18 November 2009rsta.royalsocietypublishing.orgDownloaded from
PiggoR, Farrell, Wilson, Gorman & Pain (2009) Anisotropic mesh adap>vity for mul>-‐scale ocean modelling Philosophical Transac<ons of the Royal Society A
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Mesh to mesh interpola4on -‐ supermeshing
FE solu>ons/test func>ons piecewise smooth over mesh elements
Allows efficient conserva>ve mesh to mesh interpola>on via projec>on methods
P. E. Farrell & J. R. Maddison (2011) Computer Methods in Applied Mechanics and Engineering
Elements of supermesh: old variables and new test fns both smooth. No jumps.
X
j
Z
⌦Nnew
i Nnew
j newj dV =
X
k
Z
⌦Nnew
i Nold
k oldk dV
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Single Phase Newtonian flow
Single phase laminar channel flow
u(y) = � 1
2µ
@p
@x
(h2 � y
2)
Spin up from Pressure differen>al
mul>phase laminar channel flow
Spin up from Pressure differen>al
c0 =1
2
(µ1 � µ0)h2
c + µ0h2
(µ1 � µ0)hc + µ0h
�
u(y) = � 1
2µ0
@p
@x
⇥2c0y � y
2⇤
u(y) = � 1
2µ1
@p
@x
⇥2c0(y � h) + h
2 � y
2⇤
Two phase Newtonian flow
Newtonian Fluid
Newtonian Fluid
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Spin up from Pressure differen>al
c0 =1
2
(µ1 � µ0)h2
c + µ0h2
(µ1 � µ0)hc + µ0h
�
u(y) = � 1
2µ0
@p
@x
⇥2c0y � y
2⇤
u(y) = � 1
2µ1
@p
@x
⇥2c0(y � h) + h
2 � y
2⇤
mul>phase laminar channel flow
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Two phase Newtonian flow
Convergence rates and error reduc4on
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Temporal convergence to steady state
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Non-‐Newtonian Rheologies mul>phase laminar channel flow : power law
Newtonian Fluid
Power law fluid
µe↵ = k(2DmnDmn)n�12 D =
1
2
⇣ru+ (ru)2
⌘
u(y) =
8>>>>>><
>>>>>>:
n
n+1
h1k
dp
dx
i 1n⇣|y � c|
n+1n � |c|
n+1n
⌘
y � hc
1µb
dp
dx
✓(y2�h
2)2 � c (y � h)
◆
y < hc
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Convergence rates and error reduc4on
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Carreau fluids
3D problems in non-‐idealized geometries
hRp://jrper.github.io/talks/APS-‐DFD2014 [email protected]
Other Rheologies � viscoelastic stress model
� Oldroyd B � Adds fluid memory term � Includes rotational terms for convection of local coordinate
Polymers & Boger fluids
@@t (⇢u) +r · ⇢uu = �rp� ⇢g +r ·
⇣µs
hru+ (ru)T � 2
3Ir · ui+ ⌧p
⌘
@⌧p
@t +u·r⌧p�h(ru)T · ⌧p + ⌧p ·ru
i= 1
�1
hµp
hru+ (ru)T � 2
3Ir · ui� ⌧p
i
Upcoming MEMPHIS talks @ APS-‐DFD
Dr. Zhihua Xie
Dr. Maxime Chinaud
Dr. Zhizhao Che
R33.1 R35.9 M22.8
Slides available from hRp://jrper.github.io/talks/APS-‐DFD2014
Studies of Interfacial Perturba4ons in Two Phase Oil-‐Water Pipe Flows Induced by a Transverse Cylinder
Numerical study of Taylor bubbles with adap4ve unstructured meshes
Op4misa4on of sensor loca4ons for falling film problems based on importance maps
www.memphis-multiphase.org