|
[Sponsors] |
Example code for 2D linear convection on unstructured triangular grids |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 1, 2022, 20:00 |
Example code for 2D linear convection on unstructured triangular grids
|
#1 |
Senior Member
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8 |
Hello everyone,
I'm looking for a simple code example for only 2D linear convection on unstructured triangular grids. Not convection-diffusion. Only linear convection, and nothing else. I understand how to solve convection diffusion on 2D structured grids with FTBS scheme, but I don't understand how to solve them on unstructured triangular grids. Since every example for unstructured grid shows combined convection-diffusion, it kind of becomes hard to understand the basic concept. |
|
August 2, 2022, 08:38 |
|
#2 |
Senior Member
|
What is your difficulty? Because, in general, it really sums up to simply not using the diffusion part from the convection-diffusion example.
For explicit schemes, of course, there are caveats, and not all the convective schemes are compatible with all the time advancement schemes. But, for a classical, implicit, cell-centered, finite volume discretization on unstructured grids, you really just need to neglect diffusion from a convection-diffusion example. |
|
August 3, 2022, 13:09 |
|
#3 |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34 |
I think you can derive by simply setting diffusion coefficient D=0.
On unstructured grids the face values will be from left if the fluxes are positive and from the right if fluxes are negative. In the end you will get the sources computed as Src_left -= phi_upwind * flux Src_right += phi_upwind * flux In the end you loop through all the cells and add Src += phi * mass_imbalance This is how the source terms are computed in Wildkatze. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
boundedness of TVD in 3D unstructured grids | Lydia | OpenFOAM Programming & Development | 4 | July 9, 2014 16:31 |
unstructured grids, future trend? | Anna Tian | Main CFD Forum | 1 | April 6, 2014 14:54 |
BC implementation on unstructured grids | sunny | Main CFD Forum | 1 | October 10, 2004 07:27 |
Free Boundary Flows on Unstructured Grids | George | Main CFD Forum | 8 | March 5, 2002 12:10 |
unstructured vs. structured grids | Frank Muldoon | Main CFD Forum | 1 | January 5, 1999 10:09 |