FMIA F Moukalled L Mangan M Darwsh An Advanced Introducton wth OpenFOAM and Matlab Ths textbook explores both the theoretcal foundaton of the Fnte Volume Method (FVM) and ts applcatons n Computatonal Flud Dynamcs (CFD) Readers wll dscover a thorough explanaton of the FVM numercs and algorthms used n the smulaton of ncompressble and compressble flud flows, along wth a detaled examnaton of the components needed for the development of a collocated unstructured pressure-based CFD solver Two partcular CFD codes are explored The frst s ufvm, a three-dmensonal unstructured pressure-based fnte volume academc CFD code, mplemented wthn Matlab The second s OpenFOAM, an open source framework used n the development of a range of CFD programs for the smulaton of ndustral scale flow problems Moukalled Mangan Darwsh Flud Mechancs and Its Applcatons 113 Seres Edtor: A Thess The Fnte Volume Method n Computatonal Flud Dynamcs Wth over 220 fgures, numerous examples and more than one hundred exercses on FVM numercs, programmng, and applcatons, ths textbook s sutable for use n an ntroductory course on the FVM, n an advanced course on CFD algorthms, and as a reference for CFD programmers and researchers Flud Mechancs and Its Applcatons F Moukalled L Mangan M Darwsh The Fnte Volume Method n Computatonal Flud Dynamcs The Fnte Volume Method n Computatonal Flud Dynamcs An Advanced Introducton wth OpenFOAM and Matlab Engneerng ISBN 978-3-319-16873-9 9 783319 168739 The Dscretzaton Process Chapter 04
The Dscretzaton Process
The Process Physcal Doman Physcal Phenomena Doman Modelng Physcal Modelng Set of Governng Equatons Defned on omputatonal Doman Doman Dscretzaton Equaton Dscretzaton Structured Grds Cartesan, Non-Orthogonal) Block Structured grds Unstructured Grds Chmera Grds System of Algebrac Equatons Fnte Dfference Fnte Volume Fnte Element Boundary Element Numercal Solutons Soluton Method Combnatons of Multgrd Methods Iteratve Solvers Coupled-Uncoupled 3
Doman Modelng Physcal Modelng heat snk heat spreader base Tsnk Insulated ( k T ) = Q Q smk mcroprocessor Tmcroprocessor Q source Doman Dscretzaton Equatons Dscretzaton ρφ + ( ρvφ) t = ( Γ φ ) + Q transent term convecton term φ C + dffuson term NB( C) source term a NB φ NB = b P Soluton Method = 4
Doman Dscretzaton T snk nsulated T mcroprocessor 5
Numberng 1 2 3 4 5 6 7 58 35 36 37 38 39 8 9 10 11 12 13 14 1 2 3 4 5 6 57 1 2 3 4 5 40 15 16 17 18 19 20 21 7 8 9 10 11 56 6 62 7 8 9 61 59 11 12 13 60 10 41 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 12 13 14 15 16 17 18 19 20 21 22 23 24 25 55 14 15 16 17 18 19 20 21 22 23 54 53 52 51 50 49 24 25 26 27 28 29 63 66 64 30 65 31 32 33 48 34 47 46 42 43 44 45 F 2 F 3 C F 4 F 1 Element 9 Connectvty Neghbours Faces Vertces [10 4 8 15] [12 8 11 16] [19 11 12 18] E S 1 f E f 2 owner neghbour Face 12 Connectvty Element1 9 Element2 10 Vertces [19 12] Vertex Connectvty Elements [ ] Faces [ ] 6
Sparse Matrx Equaton 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 Element 3 Neghbors 1 local element equaton s assemble for element 3 element connectvty s used to transform local ndces to global ndces T C + a F1 T F1 + a F2 T F2 + a F3 T F3 = b C 2 2 5 1 a F 1 F 2 F 3 33 T 3 + a 32 T 2 + a 35 T 5 + a 31 T 1 = b 3 21 22 23 24 25 a N3 a N1 a N2 element equaton s assembled nto global matrx 3 = 7
Element Felds Element Feld nteror patch#1 patch#2 patch#3 1 2 3 25 1 2 3 4 25 1 2 3 4 1 2 3 4 8
Equaton Dscretzaton x 3 4 5 F 2 f 2 F 2 8 9 10 F 3 C f 3 f 1 F f 1 4 δ y f 2 S f2 14 15 16 F 4 F 3 f 3 C S f1 F 1 y S f3 f 1 S f4 f 4 F 4 δ x ( k T ) = 0 ( k T ) ds ( k T ) f S f = 0 S C! = 0 f C S f1 δ x f1 T f1 = y f1 = x N1 x C = T x + T y j ( k T ) f1 S f1 ( k T ) f2 S f2 ( k T ) f3 S f3 ( k T ) f4 S f4 = 0 9
Coeffcents x F 2 T f1 S f1 = T x + T y j y f1 f 1 δ y F 3 f 3 S f3 f 2 C S f2 S f1 f 1 F 1 y = T x y f1 f 1 S f4 F 4 f 4 δ x T x f 1 = T N1 T C δ x f1 T f1 S f1 = T F 1 T C y f1 ( k T ) δ x f1 S f1 = a F1 T F1 T C f1 a F1 = k y f 1 δ x f1 10
Algebrac Equaton F 2 a F2 = k x f 2 δ y f2 f 2 4 S f2 a F3 = k y f 3 δ x f3 F 3 8 f 3 S f3 C 9 S f1 f 1 10 F 1 S f4 f 4 a F4 = k x f 4 δ y f4 F 4 15 0 = ( k T ) f S f = a NB T NB T C f C NB C = ( a F1 + a F2 + a F3 + a F4 )T C + a F1 T F1 + a F2 T F2 + a F3 T F3 + a F4 T F4 T C + a NB T NB = 0 NB C = NB C a NB = ( a F1 + a F2 + a F3 + a F4 ) 11
System of Equatons 1 2 3 4 5 Element 3 Neghbors 1 local element equaton s assemble for element 3 element connectvty s used to transform local ndces to global ndces 2 5 1 T C + a F1 T F1 + a F2 T F2 + a F3 T F3 2 = b C a F 1 F 2 F 3 33 T 3 + a 32 T 2 + a 35 T 5 + a 31 T 1 = b 3 a N3 a N1 a N2 element equaton s assembled nto global matrx 3 = 12
Solvng the Equatons 13 T C = a NB T NB NB(C ) + b C = 9 9 10 8 4 15
Face Feld Face Feld nteror patch#1 patch#2 patch#3 1 2 3 33 1 2 3 25 1 2 3 4 1 2 3 4 S f d CF g CF S f 14
Node feld Vertex Feld nteror patch#1 patch#2 patch#3 1 2 3 8 1 2 3 25 1 2 3 4 1 2 3 4 15