CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Numerical diffusion, tet, hex, poly mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 29, 2022, 06:25
Default
  #21
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Ford Prefect View Post
Trying to reply to portions of the text since there are many new concepts being introduced to the discussion.





I am not talking about the flux balance. I am talking about the discrete nature of only transmitting information in the normal direction of cell faces. Take chess as an analogy. The bishop can move in a way the rook cannot. FVM is the rook equivalent to information propagation. The problem is that if we have oblique flow in FVM then we will cut the rook in a couple of pieces and send it both in the horizontal and in the vertical directions (still while maintaining conservation since fractured pieces of rook will enter through the opposing sides, but this is not the point).





Yes, FTUS can be seen as a (in context of FVM) discretization of space-time where we use a downwind approximation in time (for explicit treatment, for implicit treatment we use upwind in time). Normally we do not discretize and solve for space-time since that would force us to use an extremely expensive 3D calculation (3D space + time). Solving for space-time in 1D (1D space+time) cases is easy though. All such solvers would not step in time but rather solve as if the case is "steady-state".


It is easy to see that you can create a space-time mesh that satisfies the Courant number constraint given by traditional analysis.






This may be the key point. Would you say that the triangle example above has numerical diffusion?

No, FVM is not like FDM, it is multidimensional not factorized as you wrote. That would be a very rude approximation as you disregards the role of the surface integration of the flux.
FMDenaro is offline   Reply With Quote

Old   November 29, 2022, 06:25
Default
  #22
Senior Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 151
Rep Power: 17
Ford Prefect is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
There are certain advantages to polyhedral and hexahedral meshes over tetrahedral meshes, it is not just some stupid marketing guy that came up with it. But you need to first understand what is numerical diffusion and what is not.

Do a taylor series about the face flux

u(x_{i+1}) = u(x_{i}) + \left.\frac{\partial u}{\partial  x}\right|_{x_i} (\Delta x) + \frac{1}{2} \left. \frac{\partial^2  u}{\partial x^2}\right|_{x_i} (\Delta x)^2 + (\text{Higher order  terms})

Upwinding means we approximate the derivative as such
\left.\frac{\partial u}{\partial   x}\right|_{x_i}\approx \frac{ v(x_{i+1}) - v(x_{i})}{(\Delta x)}

Therefore when you solve using this upwind scheme, you don't solve for the true velocity u, but a modified velocity v which contains numerical diffusion because
v(x_{i+1}) - v(x_{i}) = \left.\frac{\partial u}{\partial   x}\right|_{x_i} (\Delta x) + \frac{1}{2} \left. \frac{\partial^2   u}{\partial x^2}\right|_{x_i} (\Delta x)^2 + (\text{Higher order   terms})

If you want to see numerical dispersion then do the taylor series to the next higher order term (hint: keep the 3rd order derivative).

Here you see different grids that weakly produce different v's even without needing any actual gradient calculation for the same prototype upwind scheme will have differing amounts of numerical diffusion, it just depends how close v is to the actual u. Not shown here is that a tet grid vs a hex grid vs a poly grid, one is more accurate than another. I've shown it for 1 face flux. You need to sum the fluxes over all cells. Here is where the cell type matters because you can have error cancellation depending on the cell type and the scheme.

OK, this is in many text-books. This also explains how we can cancel out opposing faces etc. I do not see how this produces an isotropic diffusivity coefficient though.



This should produce a numerical diffusion for the triangle example, right? On the diagonal side we should have both x-, and y-dependence on the error, but on the orthogonal side of the triangle it is just an x-dependence (right triangle as basis). Although the error is directional, it will cancel out in the next triangle, when the triangle is reversed.



Seems like a variation of my argument only that it is based on FDM theory.
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   November 29, 2022, 06:28
Default
  #23
Senior Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 151
Rep Power: 17
Ford Prefect is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
No, FVM is not like FDM, it is multidimensional not factorized as you wrote. That would be a very rude approximation as you disregards the role of the surface integration of the flux.

Why would I disregard the surface integration? Not sure what I wrote that made you draw that conclusion.
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   November 29, 2022, 06:45
Default
  #24
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Ford Prefect View Post
Why would I disregard the surface integration? Not sure what I wrote that made you draw that conclusion.
If you introduce a multidimensional surface integration you will see that there are no privileged directions. Use the concept of multidimensional shape functions, FVM is just a specific FEM.
Thus, the computational molecule appears more isotropic for any direction of the flow. Use the QUICK as an example.
FMDenaro is offline   Reply With Quote

Old   November 29, 2022, 08:30
Default
  #25
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,675
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Replace x with the displacement vector r and interpret u not as the x-velocity but as the full velocity vector and it is an isotropic diffusion term. Literally just make them 2D or 3D vectors or do it using components and do the FVM summation and it turns into 2D/3D Laplacian. In other words, work out the taylor series for the multidimensional face flux.

We are talking about error cancellation on faces of the same triangle, not error cancellation when going from one triangle to the next, that itself is a type of error.

\nabla\cdot\nabla\vec{u} is not a rook or bishop problem and no privileged direction. The flow aligning with the face normals is a different issue on top of numerical diffusion.
LuckyTran is offline   Reply With Quote

Old   November 29, 2022, 10:32
Default
  #26
Senior Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 151
Rep Power: 17
Ford Prefect is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
We are talking about error cancellation on faces of the same triangle, not error cancellation when going from one triangle to the next, that itself is a type of error.

OK, so according to your definition, will we have numerical diffusion for the triangle example?





Quote:
Originally Posted by LuckyTran View Post
The flow aligning with the face normals is a different issue on top of numerical diffusion.

OK, then I understand the confusion in this thread. I must have misunderstood the concept of numerical diffusion. To my defense, almost all examples show an oblique flow and smearing of an interface, such as figure 1 or the classical 45 degree flow across a quad-structured domain.



So when we talk about "preferred directions" in the context of numerical diffusion, what does the authors mean in this case if it is not about face normals?



And finally, what should I call the diffusion-like effect that appears when the flow is not aligned with the face normals? Is it dispersion?
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   November 29, 2022, 10:54
Default
  #27
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by Ford Prefect View Post
This may be the key point. Would you say that the triangle example above has numerical diffusion?
I don't remember all the details but, neglecting shocks and other cases where Taylor series don't make sense, a FV method, for a fixed integration method, has errors related to the reminder between the "full" Taylor expansion in the integration points and the actual approximations used for them, projected along the outward normal to the face in certain cases.

Let's stay with the steady, linear scalar convection equation, then we simply have to solve:

\sum_{f=1}^{N_f} \phi_f A_f \left(\mathbf{u}_f \cdot \mathbf{n}_f \right) = 0

where the f subscript indicates faces and \phi_f is meant to be the exact face average, so that the integration and, in fact, the whole equation is still exact (assuming a constant velocity field and planar volume faces).

Now, accoring to the mean value theorem, there is a point on each face where one can evaluate \phi and get the exact face average value \phi_f. So, without further approximation let us assume that we know such point for each face and decide to evaluate our function just there.

I hope that it is clear how, up to now, no matter what cell shapes we have, there is no error at all in our equations.

Unfortunately, we now have to introduce some. First, let us assume that we are using a cell centered FV approach (which is what most people are familiar with, but makes little difference in this example). What this practically means is that we know \phi in cell centers but we need it in face centers (superseding on the fact that what we know in cell centers is probably different from what we need in face centers, as this becomes supercumbersome without a time derivative). We are going to use interpolation for it, and this is the only error we have in our approach up to this point. Again, this is independent from the cell shape. There is interpolation and, because of that, there is error.

Now, and this is the first point to highlight with respect to the discussion so far, we can't say more about the nature of the error until we decide what sort of interpolation we are going to use. That is, which convective scheme.

The second thing to notice is how, no matter what error we do, faces parallel to the velocity vector do not conribute any error. That is, they do not contribute any OF THE SAME ERROR that non aligned faces instead contribute to. Error contribution becomes potentially maximal for fully perpendicular faces (e.g., in 1D).

Potentially because it depends from the scheme and the actual derivatives in the solution. Let's clarify this by considering a general first order scheme (not necessarily upwind):

\hat{\phi_f} = a \phi_i + b \phi_j = a \left(\phi_f + \nabla \phi |_f \cdot \mathbf{r}_{if} + H.O.T. \right) + b \left(\phi_f + \nabla \phi |_f \cdot \mathbf{r}_{jf} + H.O.T.\right)

where \hat{\phi_f} is our approximation for \phi_f and \mathbf{r}_{if} and \mathbf{r}_{jf} are the vectors connecting the face point f with the neighbor cell centers i and j. a and b are unspecified coefficients which must obey a+b=1.

This tells us that, in our case, independently from the nature of the scheme, a first order scheme will have a first order error on a face only if the face is not parallel to the velocity AND the solution in the face point has a gradient along the two directions \mathbf{r}_{if} and \mathbf{r}_{jf} (depending from which one is actually used in the scheme). This should be obvious, as we make no error if the function is constant as long as (a+b)=1. I hope that it is clear that the latter error has nothing to do with flow alignment per se.

Going forward, we speak about a first order diffusion error when the first order approximation above is used (note how the gradient term error is indeed in the form of a diffusion term) AND the combined effect of the coefficients a and b and the grid (trough the r vectors) is such that it leads to a positive diffusion coefficient. For a uniform regular grid, you can expect this to be the case whenever the upwind cell gets a higher coefficents than the downwind one, but this is only a special case. For general cases you can only be sure if the upwind cell gets the full weight.

Note how first order diffusion can be completely eliminated if, for a given face, we can pick up and b such that a\mathbf{r}_{if}+b\mathbf{r}_{jf}=0. Again, this has nothing to do with the face alignment with respect to the solution.

Finally, arguments similar to the latter can be invoked in order to show that error terms on opposite faces of a cell will cancel each other under the proper conditions of regularity and scheme selection.

Hopefully all of this clarifies the matter. Obviously, when you add non exact surface integration the matter becomes more contrived, but the reasoning remains valid.

Last edited by sbaffini; November 29, 2022 at 11:18. Reason: Edited for clarity
sbaffini is offline   Reply With Quote

Old   November 29, 2022, 10:55
Default
  #28
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Ford Prefect View Post
OK, so according to your definition, will we have numerical diffusion for the triangle example?








OK, then I understand the confusion in this thread. I must have misunderstood the concept of numerical diffusion. To my defense, almost all examples show an oblique flow and smearing of an interface, such as figure 1 or the classical 45 degree flow across a quad-structured domain.



So when we talk about "preferred directions" in the context of numerical diffusion, what does the authors mean in this case if it is not about face normals?



And finally, what should I call the diffusion-like effect that appears when the flow is not aligned with the face normals? Is it dispersion?



You can understand the topic by starting from the FTUS in 2D with u=v= constant>0 on a structured cartesian grid. From such scheme, evaluate then the modified equation and have a look to the first order terms that appear. You should discover three terms acting as additional physical-like effects.



Try to repeat the same for a different scheme, for example the FTCS (that you know is unconditionally unstable) or the Lax-Wendroff (that is conditionally stable).


Each scheme will give you different answers to the topic of the numerical diffusion.
FMDenaro is offline   Reply With Quote

Old   November 29, 2022, 11:02
Default
  #29
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
I don't remember all the details but, neglecting shocks and other cases where Taylor series don't make sense, a FV method, for a fixed integration method, has errors related to the reminder between the "full" Taylor expansion in the integration points and the actual approximations used for them, projected along the outward normal to the face in certain cases.

Let's stay with the steady, linear scalar convection equation, then we simply have to solve:

\sum_{f=1}^{N_f} \phi_f A_f \left(\mathbf{u}_f \cdot \mathbf{n}_f \right) = 0

where the f subscript indicates faces and \phi_f is meant to be the exact face average, so that the integration and, in fact, the whole equation is still exact (assuming a constant velocity field and planar volume faces).

Now, accoring to the mean value theorem, there is a point on each face where one can evaluate \phi and get the exact face average value \phi_f. So, without further approximation let us assume that we know such point for each face and decide to evaluate our function just there.

I hope that it is clear how, up to now, no matter what cell shapes we have, there is no error at all in our equations.

Unfortunately, we now have to introduce some. First, let us assume that we are using a cell centered FV approach (which is what most people are familiar with, but makes little difference in this example). What this practically means is that we know \phi in cell centers but we need it in face centers (superseding on the fact that what we know in cell centers is probably different from what we need in face centers, as this becomes supercumbersome without a time derivative). We are going to use interpolation for it, and this is the only error we have in our approach up to this point. Again, this is independent from the cell shape. There is interpolation and, because of that, there is error.

Now, and this is the first point to highlight with respect to the discussion so far, we can't say more about the nature of the error until we decide what sort of interpolation we are going to use. That is, which convective scheme. Let's say we use a first order upwind (where the velocity dot product is non negative we get the current cell value, otherwise the neighbor cell one trough the face). So the error we do is exactly the remainder of our Taylor series in the face point truncated at the cell center value.

The second thing to notice is how, no matter what error we do, faces parallel to the velocity vector do not conribute any error. That is, they do not contribute any OF THE SAME ERROR that non aligned faces instead contribute to. Error contribution becomes potentially maximal for fully perpendicular faces (e.g., in 1D).

Potentially because it depends from the scheme and the actual derivatives in the solution. Let's clarify this by taking a step back and stay with more general first order interpolations (not necessarily upwind):

\hat{\phi_f} = a \phi_i + b \phi_j = a \left(\phi_f + \nabla \phi |_f \cdot \mathbf{r}_{if} + H.O.T. \right) + b \left(\phi_f + \nabla \phi |_f \cdot \mathbf{r}_{jf} + H.O.T.\right)

where \hat{\phi_f} is our approximation for \phi_f and \mathbf{r}_{if} and \mathbf{r}_{jf} are the vectors connecting the face point f with the neighbor cell centers i and j. a and b are unspecified coefficients which must obey a+b=1.

This tells us that, in our case, independently from the nature of the scheme, a first order scheme will have a first order error on a face only if the face is not parallel to the velocity AND the solution in the face point has a gradient along the two directions \mathbf{r}_{if} and \mathbf{r}_{jf} (depending from which one is actually used in the scheme). This should be obvious, as we make no error if the function is constant as long as (a+b)=1. I hope that it is clear that the latter error has nothing to do with flow alignment per se.

Going forward, we speak about a first order diffusion error when the first order approximation above is used (note how the gradient term error is indeed in the form of a diffusion term) AND the combined effect of the coefficients a and b and the grid (trough the r vectors) is such that it leads to a positive diffusion coefficient. For a uniform regular grid, you can expect this to be the case whenever the upwind cell gets a higher coefficents than the downwind one, but this is only a special case. For general cases you can only be sure if the upwind cell gets the full weight.

Note how first order diffusion can be completely eliminated if, for a given face, we can pick up and b such that a\mathbf{r}_{if}+b\mathbf{r}_{jf}=0. Again, this has nothing to do with the face alignment with respect to the solution.

Finally, arguments similar to the latter can be invoked in order to show that error terms on opposite faces of a cell will cancel each other under the proper conditions of regularity and scheme selection.

Hopefully all of this clarifies the matter. Obviously, when you add non exact surface integration the matter becomes more contrived, but the reasoning remains valid.



Paolo,
just an observation, if you want to use the first order upwind the value at a face is not linearly interpolated but it is piecewise constant from left or right (depending on the sign). Using a linear interpolation makes the scheme second order (the accuracy order in a FVM is dictated by the truncation error of the flux reconstruction, not by the derivatives as happens in FDM).


But your arguments are clear. I would be glad to know if some published paper has never formalized the topic for general grids.
FMDenaro is offline   Reply With Quote

Old   November 29, 2022, 11:08
Default
  #30
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by FMDenaro View Post
Paolo,
just an observation, if you want to use the first order upwind the value at a face is not linearly interpolated but it is piecewise constant from left or right (depending on the sign). Using a linear interpolation makes the scheme second order (the accuracy order in a FVM is dictated by the truncation error of the flux reconstruction, not by the derivatives as happens in FDM).


But your arguments are clear. I would be glad to know if some published paper has never formalized the topic for general grids.
Yes but, as I mentioned, for a general grid and coefficients a and b, second order is indeed reached only as a special case for a\mathbf{r}_{if}+b\mathbf{r}_{jf}=0.

As far as I can remember, there are several papers or theses that treat this, also in relation to polys and other shapes. Still, I can't remember any of them now.

EDIT: I have now removed from the post above the part where I first mentioned the upwind, which was indeed unnecessary and promoted confusion.

Last edited by sbaffini; November 29, 2022 at 11:16. Reason: Added a comment
sbaffini is offline   Reply With Quote

Old   November 29, 2022, 11:21
Default
  #31
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
Yes but, as I mentioned, for a general grid and coefficients a and b, second order is indeed reached only as a special case for a\mathbf{r}_{if}+b\mathbf{r}_{jf}=0.

As far as I can remember, there are several papers or theses that treat this, also in relation to polys and other shapes. Still, I can't remember any of them now.

EDIT: I have now removed from the post above the part where I first mentioned the upwind, which was indeed unnecessary and promoted confusion.





I don't remember any specific paper when an expression of the modified equation is detailed for a FVM on triangular grids...I mean an expression where the local truncation error is expressed in terms of surface integral of higher order fluxes.
FMDenaro is offline   Reply With Quote

Old   November 29, 2022, 11:32
Default
  #32
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by FMDenaro View Post
I don't remember any specific paper when an expression of the modified equation is detailed for a FVM on triangular grids...I mean an expression where the local truncation error is expressed in terms of surface integral of higher order fluxes.
I remember two lines of work, yet nothing I have delved directly into, only superficially scraped. One originates with the thesis of Hrvoe Jasak, followed by some paper (but I can't remember the author or names) using basically the same approach. These work go, as far as I can remember, into some details concerning the errors related to the cell geometry. No modified equation tough.

The other line is the one by Hiro Nishikawa. Altough he never gets into the details of specific cell geometries, I remember that some of his recent works deal exactly with the modified differential equation for FV equations on unstructured grids.
sbaffini is offline   Reply With Quote

Old   November 29, 2022, 11:44
Default
  #33
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by sbaffini View Post
I remember two lines of work, yet nothing I have delved directly into, only superficially scraped. One originates with the thesis of Hrvoe Jasak, followed by some paper (but I can't remember the author or names) using basically the same approach. These work go, as far as I can remember, into some details concerning the errors related to the cell geometry. No modified equation tough.

The other line is the one by Hiro Nishikawa. Altough he never gets into the details of specific cell geometries, I remember that some of his recent works deal exactly with the modified differential equation for FV equations on unstructured grids.

At the best of my knowledge, both addressed simple cases, Nishikawa illustratated some work on the modified equation (the local truncation error is in differential form) but that is somehow different from what I mean. A relevant part comes from the time integration of the cell-averaged values.
FMDenaro is offline   Reply With Quote

Old   November 29, 2022, 13:58
Default
  #34
Senior Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 151
Rep Power: 17
Ford Prefect is on a distinguished road
Thank you for a very nice explanation Sbaffini! Could you also just give your opinion if your explanation also explains the triangle example I provided?

Quote:
Originally Posted by sbaffini View Post
I don't remember all the details but, neglecting shocks and other cases where Taylor series don't make sense, a FV method, for a fixed integration method, has errors related to the reminder between the "full" Taylor expansion in the integration points and the actual approximations used for them, projected along the outward normal to the face in certain cases.

Let's stay with the steady, linear scalar convection equation, then we simply have to solve:

\sum_{f=1}^{N_f} \phi_f A_f \left(\mathbf{u}_f \cdot \mathbf{n}_f \right) = 0

where the f subscript indicates faces and \phi_f is meant to be the exact face average, so that the integration and, in fact, the whole equation is still exact (assuming a constant velocity field and planar volume faces).

Now, accoring to the mean value theorem, there is a point on each face where one can evaluate \phi and get the exact face average value \phi_f. So, without further approximation let us assume that we know such point for each face and decide to evaluate our function just there.

I hope that it is clear how, up to now, no matter what cell shapes we have, there is no error at all in our equations.
Sure!

Quote:
Originally Posted by sbaffini View Post
Unfortunately, we now have to introduce some. First, let us assume that we are using a cell centered FV approach (which is what most people are familiar with, but makes little difference in this example). What this practically means is that we know \phi in cell centers but we need it in face centers (superseding on the fact that what we know in cell centers is probably different from what we need in face centers, as this becomes supercumbersome without a time derivative). We are going to use interpolation for it, and this is the only error we have in our approach up to this point. Again, this is independent from the cell shape. There is interpolation and, because of that, there is error.

Now, and this is the first point to highlight with respect to the discussion so far, we can't say more about the nature of the error until we decide what sort of interpolation we are going to use. That is, which convective scheme.
Agreed.

Quote:
Originally Posted by sbaffini View Post
The second thing to notice is how, no matter what error we do, faces parallel to the velocity vector do not conribute any error. That is, they do not contribute any OF THE SAME ERROR that non aligned faces instead contribute to. Error contribution becomes potentially maximal for fully perpendicular faces (e.g., in 1D).
Agreed and to quote myself:

Quote:
Originally Posted by Ford Prefect View Post
I do not think the flow needs to be aligned with a coordinate direction, rather that the flow is orthogonal to the cell face normals where we do not wish to have information propagation (and that the cells are ordered in a structured manner so that as many cells as possible have the before mentioned "property"). It is evident from my example that even triangles can be aligned with the flow to have zero numerical diffusion, so perhaps the definition of "aligned with the flow" is a bit muddy.
Quote:
Originally Posted by Ford Prefect View Post
I would argue that numerical diffusion is the erroneous propagation of (advection) information on a fixed eulerian mesh.

Basically, if we have no means of moving information in directions other than the face normal direction (of any face) then we will always cause some numerical diffusion unless the advection velocity is either parallel or orthogonal to each of the faces of the cell.
I read your text and to me it seems you try to explain what I just wrote, using a different approach of explanation. The only difference is that you add arguments for the order of the approximation as a means to quantify the error.

Quote:
Originally Posted by sbaffini View Post
Finally, arguments similar to the latter can be invoked in order to show that error terms on opposite faces of a cell will cancel each other under the proper conditions of regularity and scheme selection.
OK.

So with proper regularity and scheme selection, it is correct to talk about "preferred directions" in the context of numerical diffusion when we compare tet vs hex vs poly?
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   November 29, 2022, 14:13
Default
  #35
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Originally Posted by Ford Prefect
I do not think the flow needs to be aligned with a coordinate direction, rather that the flow is orthogonal to the cell face normals where we do not wish to have information propagation

what do you mean? Clearly in this case the convective flux is exactly zero ... you have to consider cases wherein the flow is not orthogonal to the normal unit vector to the face.
FMDenaro is offline   Reply With Quote

Old   November 29, 2022, 14:29
Default
  #36
Senior Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 151
Rep Power: 17
Ford Prefect is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Originally Posted by Ford Prefect
I do not think the flow needs to be aligned with a coordinate direction, rather that the flow is orthogonal to the cell face normals where we do not wish to have information propagation

what do you mean? Clearly in this case the convective flux is exactly zero ... you have to consider cases wherein the flow is not orthogonal to the normal unit vector to the face.
No I mean that the cells can be aligned so that some of the face normals are orthogonal to the flow. Across those faces there will be no flux and as such no numerical diffusion in that direction (this argument is also made by sbaffini in his previous post).
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   November 29, 2022, 15:43
Default
  #37
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by Ford Prefect View Post
Thank you for a very nice explanation Sbaffini! Could you also just give your opinion if your explanation also explains the triangle example I provided?



Sure!



Agreed.



Agreed and to quote myself:





I read your text and to me it seems you try to explain what I just wrote, using a different approach of explanation. The only difference is that you add arguments for the order of the approximation as a means to quantify the error.



OK.

So with proper regularity and scheme selection, it is correct to talk about "preferred directions" in the context of numerical diffusion when we compare tet vs hex vs poly?
I'm from the cell phone, so I have difficulties in scrolling back and forth the whole discussion now. But what I can say about the pictures you posted is that:

1) While this is a classical example and most conclusions are independent of this, let's always bear in mind that the original discontinuity in the scalar that we see in the pictures is such that most of the arguments I used are not valid. Yet, let just pretend it is a very high gradient, which might be a reasonable assumption for a fixed grid case

2) The original couple of images from ansys shows that there is no error for the hexa as the faces where the gradient is are all parallel to the flow and the grid is uniform in the scalar gradient direction. The tetra grid, instead, has most faces in the gradient zone that are not aligned with the flow. That's the main source of the difference and error for the tetra grid. This error is apparently diffusive in nature but, again, this is not related to flow alignment.

3) Your third picture is different from the ansys tetra one, because your high gradient part is in a zone where, despite the triangles, is completely aligned with the flow (it is indeed a splitted quad grid, with the splits happening in totally uniform zones). This, if it was ever needed, just confirms that cell shapes are not, per se, indications of anything

4) A polyhedral cell would behave exactly the same here if it could have the gradient part covered by flow aligned faces. But it can't at 100%. Which means that the poly grid would have more error than a properly tailored tri grid, contradicting any universal statement on poly vs tri

My opinion is that any general statements on grids are bullshit because, as others have shown well before me, the grid purpose is to serve the numerical solution of a given problem with a given method and its quality is not independent from the solution and the method (except for some geometrical quantities that arise independently from them)
Ford Prefect likes this.
sbaffini is offline   Reply With Quote

Old   November 29, 2022, 15:55
Default
  #38
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Another counter example would be a linear scalar distribution (in a plane normal to the constant velocity field, for simplicity) and a second order upwind scheme using, say, a lsq gradient. I would expect no error here for whatever grid and alignment.
sbaffini is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANSYS Meshing] Unexpected Transformation of Hex to Tet mesh. Rajkool ANSYS Meshing & Geometry 0 February 17, 2020 10:13
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[blockMesh] apparently the mesh doesn't want to be created in one direction Maxime Thomas OpenFOAM Meshing & Mesh Conversion 1 August 18, 2012 06:05
[blockMesh] BlockMesh number internal faces and boundary ynos OpenFOAM Meshing & Mesh Conversion 6 December 13, 2011 05:36
hex mesh vs. tet mesh (for FEM solvers) Sam Main CFD Forum 0 July 1, 2005 15:11


All times are GMT -4. The time now is 14:24.