Главная » Просмотр файлов » Moukalled F., Mangani L., Darwish M. The finite volume method in computational fluid dynamics. An advanced introduction with OpenFOAM and Matlab

Moukalled F., Mangani L., Darwish M. The finite volume method in computational fluid dynamics. An advanced introduction with OpenFOAM and Matlab (811443), страница 27

Файл №811443 Moukalled F., Mangani L., Darwish M. The finite volume method in computational fluid dynamics. An advanced introduction with OpenFOAM and Matlab (Moukalled F., Mangani L., Darwish M. The finite volume method in computational fluid dynamics. An advanced introduction with OpenFOAM and Matlab.pdf) 27 страницаMoukalled F., Mangani L., Darwish M. The finite volume method in computational fluid dynamics. An advanced introduction with OpenFOAM and Matlab2020-08-25СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 27)

Instructured grid systems local indices are used interchangeably as global indices6.3 Structured Grids143aC(1)global indexaC( 2 )n = i + ( j 1) NiaC( 3)1b(1)2b( 2 )n Nib( nNi )b( n1)local indicesaF ( nNi )aC( n1)aF ( n1)n 1aC( n )aF( n+1)aF( n+Ni )naC( n+1)Njj +1jj 1aC( NiNj )=b( n )n+1b( n+1)n+Nib( n+Ni )NiNjb( NiNj )11i 1 i i + 1 NiFig. 6.5 Local versus global indicesbecause they can be readily translated to global indices and vice versa, as illustratedin Fig.

6.5. In two dimensional spaces the relation between local indices (i, j) andthe global index (n) is given byn ¼ i þ ðj 1ÞNi1 i Ni1 j Njð6:7Þand the corresponding global indices for the neighbors of cell (i, j) are obtained asði; jÞ!ði þ 1; jÞ !ði; j þ 1Þ !nnþ1n þ Niði 1; jÞði; j 1Þ! n1! n Nið6:8ÞOn the other hand, in three-dimensional spaces the relation isn ¼ i þ ðj 1ÞNi þ ðk 1ÞNi Nj1 i Ni1 j Nj1 k Nkð6:9Þand the corresponding global indices for the neighbors of cell (i, j, k) are given byði; j; k Þði þ 1; j; k Þði; j þ 1; k Þði; j; k þ 1Þ!!!!nnþ1n þ Nin þ Ni Njði 1; j; k Þ !ði; j 1; k Þ !ði; j; k 1Þ !n1n Nin Ni Njð6:10ÞThis greatly simplifies the access to the coefficients and the solution of the systemof equations, since the coefficients constructed over the local stencil of a cell arebasically used in the general system of equations with no need for a translational1446 The Finite Volume Meshstep between local and global indices as the mapping between them is readilyavailable.

This also applies to the geometric fields and the various conservationfields that are being resolved.Example 2In a 5 × 7 structured grid find the global indices of the neighbors of theelement C defined by the local index (3, 4).SolutionFor the defined mesh Ni = 5 and Nj = 7, the global index of element C(3, 4) isthus 3 þ ð4 1Þ 5 ¼ 18, the neighbors of elements C in terms of their localand global indices are (2, 4) → 17, (4, 4) → 19, (3, 3) → 13, and (3, 5) → 23.6.3.2Geometric InformationAs shown in Fig.

6.6, accessing the local geometric information around an elementis quite simple. For element (i, j) the surrounding stored faces are S1(i, j), S2(i, j),S1(i + 1, j), and S2(i, j + 1). Since for any element the faces have to be pointingoutward (see Fig. 6.6), thenSi1=2;j ¼ S1ði; jÞSi;j1=2 ¼ S2ði; jÞð6:11Þwhile for other faces, the following applies:Siþ1=2;j ¼ S1ði þ 1; jÞSi;jþ1=2 ¼ S2ði; j þ 1Þð6:12ÞThe element field in a structured two or three dimensional mesh is also defined asan array of size ½Nx½Ny or ½Nx½Ny½Nz, respectively.

Thus accessing the elementvalue and its neighbors is equally simple. The element field of a multi-dimensionalsystem may also be defined using a one dimensional array, which in twoSi1/2, jS1( i, j ) Element ( i, j )S2 ( i, j )S i, jFig. 6.6 Geometric information1/26.3 Structured Grids145dimensions will be of size ½Ni Nj and in three dimensions of size ½Ni Nj Nk.Representing a multi-dimensional field by a one-dimensional array, with valuesstored using the global indexing system, saves a lot of computer memory when amulti grid system is adopted.6.3.3Accessing the Element FieldAccessing the field in a structured grid is as simple as using the indices of theelement. Therefore, in a two-dimensional space, /ði; jÞ or /i;j is the value of field ϕat element (i, j). As shown in Fig.

6.7a the values of ϕ at the neighboring cells to(i, j) are, respectively, /iþ1; j , /i1; j , /i; jþ1 , and /i; j1 .As mentioned above computing the gradient using Eq. (6.4) requires calculatingthe value of ϕ at each face of the finite volume (for our pseudo elements the front andback faces have the same value and thus will not be included in the computation).Thus in addition to the value of ϕ at point (i, j), the values of ϕ at the neighboringpoints (i + 1, j), (i − 1, j), (i, j + 1), and (i, j − 1) are also needed.

In a structured gridthis information is readily available and the value at the face is computed by simpleinterpolation between the values of ϕ at the centroids of the two volumes sharing theface. Using Eq. (6.5), the interpolated value at face (i +1/2, j) in terms of local indicescan be written as/iþ1=2;j ¼ giþ1=2;j /iþ1;j þ 1 giþ1=2;j /i;jð6:13ÞDetails of the linear interpolation will be presented later in the chapter. Referring toFig.

6.7a, the gradient at element (i, j) can be computed using local indexing asr/i;j1 /iþ1=2;j Siþ1=2;j þ /i1=2;j Si1=2;j þ /i;jþ1=2 Si;jþ1=2 þ /i;j1=2 Si;j1=2Vij1 ¼/iþ1=2;j S1iþ1;j /i1=2;j S1i;j þ /i;jþ1=2 S2i;jþ1 /i;j1=2 S2i;jVij¼ð6:14Þ(a)(b)i 1, j+1i, j+1i 1, jiji+1, jn-1i 1, j 1i, j 1i+1, j 1n-1-Nii+1, j+1n-1+Ni(c)n+Ninn-Nin+1+NiNWNNEn+1WCEn+1-NiSWSSEFig. 6.7 Local versus discretization versus global indices. a Local indexing, b global indexing,and c discretization indexing1466 The Finite Volume Meshwhile using a global indexing system, Fig. 6.7b, it becomesr/n ¼1 /nþ1=2 Snþ1=2 þ /n1=2 Sn1=2 þ /nþNi=2 SnþNi=2 þ /nNi=2 SnNi=2Vnð6:15ÞIt should be mentioned that S is the outward vector normal to the surface at thecontrol volume face. Except at the domain boundaries, control volume faces areshared by two elements.

Therefore the outward direction for one element willrepresent the inward direction for the other element. Thus to avoid duplicatingsurface vectors at interfaces, only one vector is computed and stored at an interface;the one in the direction of increasing i or j. The embedded features in a structuredgrid system allows for the correct direction to be chosen with no need to store anyadditional information. For any element (i, j), the surface with an index greater thani or j is positive while the surface with an index lower than i or j is multiplied by anegative sign.

This explain the negative signs in Eqs. (6.11) and (6.14).6.3.3.1Discretization IndexingIn addition to local and global indexing, another type known as discretizationindexing is sometimes used, where the fields and geometric quantities are defined interms of their position or neighboring values. Referring to Fig. 6.7c, the gradient atelement (i, j) can be computed using discretization indexing asr/C ¼1 / Se þ /w Sw þ /n Sn þ /s SsVC eð6:16ÞThus the algorithm for computing the gradient could be written as>Loop over elements (i,j)> initialize element gradient to zero grad(i,j) = 0> loop over the element faces> compute the flux_f = phi_f*S_f> add/subtract flux_f to the element gradientdepending on the orientation of S_f (pointingout of/into element)> divide the sum of the fluxes stored in thegradient by the volume of the element to yield theelement gradient6.4Unstructured GridsUnstructured grids offer more flexibility in meshing a domain both in terms of theelement types that can be used and in terms of where the elements can be concentrated.

This flexibility, however, comes at the cost of additional complexity.6.4 Unstructured Grids147Fig. 6.8 Unstructured meshglobal indexing28212720222624191817232515161181471396511021243In an unstructured mesh system, elements are numbered sequentially, as are faces,nodes, and other geometric quantities. This means that there is no direct way to linkvarious entities together based on their indices alone. Thus local connectivity has tobe defined explicitly starting with determining the geometric quantities for a particular element. In Fig. 6.8, for example, the neighbors of element 9 cannot bedirectly derived from its index. Similarly the bounding faces of element 9, or forthat matter their nodes, cannot be guessed or derived from its index in the same waythis can be done in a structured grid.Therefore detailed topological information about neighboring elements, faces,and nodes is needed to complement the global indexing of the grid.6.4.1Topological Information (Connectivities)As shown in Fig.

6.9, topological information is developed by explicitly constructingthe local, Fig. 6.9a, and global, Fig. 6.9b, indices that define the geometric componentconnectivities (element to element, element to faces, faces to elements, element tonodes, etc.). To this end, the data structure of elements, faces, and nodes now includeinformation about neighboring connections in terms of local and global indices.The gradient computation algorithm can now be expressed in terms of the discretization indices shown in Fig.

6.9a asr/C ¼1 /f1 Sf1 þ /f2 Sf2 þ /f3 Sf3 þ /f4 Sf4 þ /f5 Sf5 þ /f6 Sf6VCð6:17Þor in terms of the local numbers of the element faces shown in Fig. 6.9a asr/ð0Þ ¼1 /ð1Þ Sð1Þ þ /ð2Þ Sð2Þ þ /ð3Þ Sð3Þ þ /ð4Þ Sð4Þ þ /ð5Þ Sð5Þ þ /ð6Þ Sð6ÞVð0Þð6:18Þ1486 The Finite Volume Mesh(a)(b)F4F511Sf48Sf5Sf3F62223C15F3Sf6F111F21016S f2Sf1961012ElementConnectivity1 2 3 5 6[10 11 8 6 1 2]local index1 2 3 4 5 6[16 22 23 15 11 10]local indexFacesNodes1 2 3 4 5 6[21 22 21 14 13 12]local indexNeighboursglobal indexglobal indexglobal indexFig. 6.9 Element connectivity and face orientation using a local indices and b global indiceswhere the “()” indicates the local index of the face. The gradient relation can be alsowritten in terms of global indices representing the stored values at the element facesshown in Fig.

6.9b asr/9 ¼1 /16 S16 þ /22 S22 /23 S23 /15 S15 /11 S11 /10 S10V9ð6:19Þwhere the negative signs for terms of faces 23, 15, 11 and 10 are to be noted. Whilethe local surface vector S is always assumed to be in the outward direction, this isnot necessarily true, as only one normal vector is stored at any one face.

A look atFig. 6.9 shows that these specific stored surface vectors are actually pointing inwardof element 9, thus the negative sign. Unlike structured grid systems where thecorrect direction can easily be obtained, in an unstructured grid the direction of thenormal to the surface should somehow be stored. This will be detailed in thefollowing section.

In order to account for the vector direction, a sign function isused and the equation for the gradient is modified as0r/k ¼1 @VknXh f nbðk Þi\kX/n Sn þnh f nbðk Þi [ k1/n Sn Að6:20Þ6.4 Unstructured Grids149For faces, information about the straddling elements is what defines the topology ofthe face.

Характеристики

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6455
Авторов
на СтудИзбе
305
Средний доход
с одного платного файла
Обучение Подробнее