|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Panagiotis Iatrou
Join Date: Oct 2024
Posts: 11
Rep Power: 2 ![]() |
Hello,
During the discretization of the 2d Diffusion equation for the x-component of velocity ![]() ![]() ![]() First of all, I know I can approach the discretization using the Gauss theorem. However I am interested in the alternative approach, where we evaluate each integral sequentially. We start by integrating over an arbitrary cell ![]() ![]() ![]() Then it is time to evaluate the second integral. Everyone seems to be assuming that the fluxes are constant throughout the cell faces and thus reaching the following: ![]() (reaching the same equation as we would using the Gauss theorem) (also can be seen here) Is this the correct justification for the last step? |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,944
Rep Power: 73 ![]() ![]() ![]() |
Quote:
That depends on the accuracy order you want. At second order the mean formula can be used. At higher order the formula must be different. |
||
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,783
Rep Power: 66 ![]() ![]() ![]() |
Consider that you can partition the east and west faces into sub-partitions each with constant fluxes to approximate a non-constant flux (e.g. e = e1+e2+e3+e3...ej and w=w1+w2+w3+...wk). When you recognize this as a Riemann sum (midpoint rule, mean rule, trapezoidal rule, etc.), then it is more clear that higher order approximations exist for the Riemann integral but at the same time, there isn't a fundamental issue that breaks the whole theory.
|
|
![]() |
![]() |
![]() |
![]() |
#4 | |
New Member
Panagiotis Iatrou
Join Date: Oct 2024
Posts: 11
Rep Power: 2 ![]() |
Quote:
So, I suppose that what I wrote in my post is considered first-order? How would I search for this type of approximation? Do you have any resources? |
||
![]() |
![]() |
![]() |
![]() |
#5 | |
New Member
Panagiotis Iatrou
Join Date: Oct 2024
Posts: 11
Rep Power: 2 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#6 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,944
Rep Power: 73 ![]() ![]() ![]() |
Quote:
Not a first order ... As you can see, your approach to discretize in a FV manner leads to the same algebric form of the second order accurate FD scheme. That happens only for linear equations at second order when using the mean formula on stuctured grid. If you really want to see the difference between FV and FD methods, just think about what happens by using the trapezoidal rule for the integrals. |
||
![]() |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,783
Rep Power: 66 ![]() ![]() ![]() |
Quote:
In your case, you have to now define how to calculate the fluxes on the east and west faces! ![]() You will very quickly discover that obviously u cannot (in general) be constant over the cell because then the east and west fluxes would be equal and the integral becomes the trivial 0=0, which is not useful! |
||
![]() |
![]() |
![]() |
![]() |
#8 | ||
New Member
Panagiotis Iatrou
Join Date: Oct 2024
Posts: 11
Rep Power: 2 ![]() |
Quote:
How is the last step on the discretization process I have in my post (solving the second integral) justified? Quote:
Isn't this the next step in the discretization process which includes choosing a scheme? To my understanding (at least in a colocated cartesian grid), we have the unknown velocities at the center of the cell (representative values for the entirety of the cell) and then in order to calculate the fluxes on the cell faces, one must either interpolate (like central differencing) or think of another scheme. |
|||
![]() |
![]() |
![]() |
![]() |
#9 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,783
Rep Power: 66 ![]() ![]() ![]() |
If it makes you feel better, you can add
![]() ![]() ![]() Quote:
Don't miss the forest for the trees. ![]() First of all, I know I can approach the discretization using the Gauss theorem. However I am interested in the alternative approach, where we evaluate each integral sequentially. We start by integrating over an arbitrary cell ![]() f(x') is single valued but that is not an assumption that f is constant over the interval a to b. That was my point and I'm sorry that wasn't articulated well Last edited by LuckyTran; January 28, 2025 at 14:13. |
||
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
Panagiotis Iatrou
Join Date: Oct 2024
Posts: 11
Rep Power: 2 ![]() |
Thank you, this makes things a lot clearer!
|
|
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
Marek Chodorski
Join Date: Aug 2013
Location: Poland
Posts: 16
Rep Power: 13 ![]() |
Hi,
there is a detailed description how to create linear equations to resolve diffusion equation in 3D dynamic with convection: https://marek-ac.meri.pl/ Marek Last edited by marek_ac; February 17, 2025 at 10:42. Reason: typo |
|
![]() |
![]() |
![]() |
Tags |
diffusion equation, discretization, mathematics |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with Velocity Poisson Equation and Vector Potential Poisson Equation | mykkujinu2201 | Main CFD Forum | 1 | August 12, 2017 14:15 |
Discretization of mass conservation equation in a 2D staggered grid | kiwiguigou | Main CFD Forum | 4 | April 16, 2016 16:57 |
Diffusion Advection equation discretization scheme | Farouk | Main CFD Forum | 0 | July 2, 2013 17:10 |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |
Poisson equation fourier transform before discretization | yohey44 | Main CFD Forum | 0 | November 9, 2010 13:00 |