|
[Sponsors] |
On the diffusion term discretization on unstructured grids |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 11, 2017, 13:01 |
|
#21 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
The key is to think always in terms of a totally unstructured grid. You need to extend the topology of the grid, that is each centroid of the faces must be associated to a proper simplex (tetrahedron) containing it. Using the four linear shape function you have all you need.
|
|
October 11, 2017, 20:39 |
|
#22 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34 |
Quote:
If this is what you meant then I would point out that the quotes from Sanjay Mathur et al. are not saying this. This is how it shall work: 1. Compute gradients by GG or least square means. Call them unlimited gradients. 2. Limit these gradients - call them reconstruction gradients. 3. Use these gradients and reconstruct face values and compute another gradients by GG. These are the gradients used in diffusion terms. (they are unlimited). Here are these quote again: Quote:
For your concern about what happens in shock or discontinuity, I would say that once you have gradients of effective viscosity you are no longer bound to using average, you could apply other schemes like upwinding or some other scheme that is used in shock for velocity (what is good enough for goose good enough for gander). The exact same thing is done for density which is normally just used as average or first order upwind. This all need efforts and cost so people usually avoid it. Seeing all this discussion i would implement this and give user option in wildkatze to switch to different schemes. Who knows to someone it might be useful. |
||
October 12, 2017, 05:00 |
|
#23 |
Senior Member
|
@Filippo: Thanks, that's the idea. But, in general, I only have access to the two values across a face, L and R.
Besides linear/harmonic interpolation along the face normal coordinate, or taking a simple/harmonic average, I can at most interpolate, still along the connecting line, in the point nearest to the face center, so that I can minimize the error. But not much more. @arjun: yes, I probably expressed more obscurely than I tought, but that's what I meant. So you also confirm that there is a third gradient, built via GG and using as face values those reconstructed via limited gradients. This third gradient is NOT itself limited again, but only used in the secondary diffusion term. @michael: at moment I'm just SDed. Do I still qualify? |
|
October 12, 2017, 05:21 |
|
#24 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34 |
Quote:
Yes. Not only there but all the other things that need gradient use this gradient. (ie turbulence production etc etc) I will note down one more thing that many commercial codes when using least square gradients just make a copy of the unlimited gradient and use this (they avoid one more GG application). Then the same gradients are limited and used for reconstruction. In theory it makes sense but in practice it could be problems in prism type cells so I in wildkatze use extra step of GG and use that as mentioned. |
||
October 12, 2017, 05:29 |
|
#25 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Quote:
|
||
October 12, 2017, 05:30 |
|
#26 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
And note that the same procedure can be used for computing easily the derivative df/dn ...
|
|
October 12, 2017, 05:32 |
|
#27 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34 |
Quote:
I believe CFX does what you are mentioning. They work with shape functions. |
||
October 12, 2017, 05:34 |
|
#28 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
||
October 12, 2017, 05:38 |
|
#29 | |
Senior Member
|
Quote:
|
||
October 12, 2017, 05:44 |
|
#30 |
Senior Member
|
Yeah, actually I could build such shape functions. What I meant is that I would like to stick just to information available in cells L and R. Otherwise, storing 4 more scalars per face would blow up my memory. There is a tradeoff with respect to gradients but, honestly, I also don't want to compute them for properties.
|
|
October 12, 2017, 05:48 |
|
#31 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73 |
Quote:
|
||
November 10, 2017, 03:39 |
|
#32 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34 |
I made some studies about this diffusion term (Poisson Problem) . I got some improvements over the second order method without increasing the cost too much.
For the test problem 1x1x1 m^3 problem with function sin(PI x) . sin( PI y) . sin(PI z) the following are the results on tetrahydral meshes. Quote:
The results are compared against starccm, the table shows L2 error norm against exact value for computed solution. The good thing about it is that on uniform meshes the solution shall be much more accurate than 2nd order method, on skewed meshes the worst case is same as second order method. It is just primary calculation so take it with a grain of salt. So far this is what i got. |
||
November 10, 2017, 04:20 |
|
#34 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34 |
Quote:
No. Basically the idea is to adapt 4rth order finite difference method to unstructured grid. This is why on uniform meshes the results shall be exactly as the 4rth order method will produce. The locally refined Cartesian mesh type solvers will benefit the most because majority of those meshes are "boxes" where it shal be close to 4rth order. I will make more tests when i get time and will outline what exactly is done. Nothing complicated is done and your second order descretization is used as it is. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Discretization of the convective term of the N-S equation | Donton | Main CFD Forum | 1 | September 1, 2017 13:01 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
FVM discretization of diffusion term on crvlnr gr | Michail | Main CFD Forum | 3 | March 14, 2008 07:52 |
TVD/NVD in unstructured grids | m.s. darwish | Main CFD Forum | 0 | August 24, 1999 14:44 |