CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Role of divergence (https://www.cfd-online.com/Forums/main/9358-role-divergence.html)

shekharc June 20, 2005 01:55

Role of divergence
 
Hi,

I have finished my CFD calculation and to check it's accuracy, I analized the divergence in each cell. It is in order of 1.0E-4 ~ 1.0E-5 for the "internal" cells (where velocity and pressure fields are determined entirely by N.S. equation). However, it is in order of 1.0E-2 at the worst-grid(near the inlet). Please note that one of the neignbouring cells at this location is the Ghost-cell (at which the velocity field is estimated after satisfying the mass-conservation as mentioned in MAC by Harlow and Welch,...and then the pressure estimation is done using normal component of the N.S. equation).

I don't know how much does this worst grid spoil the solution and how to improve the situation.

Also, can a same criterion on divergence (e.g. Divergence < 1.0E-4 (say)) be used irrespective of grid size to check accouracy of the solution....i.e. if we get same divergence = 9.4E-5 for two cells having different grid sizesn a1 x b1 x c1 and a2 x b2 x c2 respectively, can we say that accuracy is almost same at both the cells. Here, "Divergence*Volume = Mass accumulation" in the cell.

Thanks in anticipation,

chandra.

agg June 21, 2005 14:37

Re: Role of divergence
 
The error will be slightly larger at boundaries because you are enforcing mass flow internally and then updating boundary velocities.

Mass flow conservation and grid resolution effects are two different issues. Whatever the grid size, mass flow should be conserved. Since solution to poisson equation is expensive (every time step), convergence is a trade-off between accuracy and computational time and you may have to do some tests before you can decide the right numbers for your application.

Another check for mass flow rate would be to actually integrate velocity over normal surface area at various cross sections.

e_kang June 22, 2005 12:14

Re: Role of divergence
 
The convergence criteria may be stricter for very fine grids (as small as 1e-07).

shekharc June 23, 2005 14:11

Re: Role of divergence
 
Thanks a lot for the suggestions...however, the variation of convergence criterion based on size of the grid seems to be a little confusing....if we see physical meaning of divergence, it is nothing but 'rate of mass accumulation per unit volume'...and so the selected divergence-criterion should be independent of the grid size...please suggest me if there are other things also which I am not able to point out as far as choosing of this divergence-criterion is concerned..

Also, as I already have mentioned in my previous posting, the inlet-grids having neighbouring-cells a Ghost-cell show very bad performance, could any of you please suggest me about the extent to which this bad cell can spoil the solution. I think answer of it is a matter of experience...and I am very new in it:)

thanks in advance,

chandra

agg June 23, 2005 14:39

Re: Role of divergence
 
chandra,

Satisfying divergence does depend a lot on the order of accuracy of numerical scheme. For example, using a second order finite difference scheme you might be able to get divergence as low as 1E-6. Using spectral methods divergence can be as low as 1E-16.

Also, in your code, you control divergence through solution to Poisson equation (is that right?). Hence you should use trial/error changing convergence criteria for pressure solution to see how if affects divergence.

Regarding higher divergence values at boundaries, i think that should not be a problem, since you do not actually solve Navier-Stokes equations at the boundary. So as long as your solution looks ok, I wouldn't worry too much about it.


shekharc July 5, 2005 00:49

Re: Role of divergence
 
heyy, thanks a lot but the divergence near the boundary is really worrying me...

Divergence in the cell adjacent to the inlet having ghost-cell a neighbour is having divergence in order of 100 times more than internal grids. I dont know how to improve the situation. I think refining the grid in this problematic region may do it but I am not sure. Please suggest me if there is any other way...

Thanks in anticipation...

--Chandra

agg July 5, 2005 11:17

Re: Role of divergence
 
I'm Sorry I do not know how to alleviate problem related to divergence near boundary. There might be papers that discuss this in detail.

Good luck.

shekharc July 5, 2005 12:08

Re: Role of divergence
 
Heyy man, thanks a lot for yr suggestions...I will search if there is any such kind of paper dealing with the issue..

thanks...chandra


All times are GMT -4. The time now is 08:28.