|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
Dear CFD community,
I am analyzing a simple rectangular domain and applying 2D Navier Stokes equations (zero pressure gradient) to it. As I apply the diffusion term d2u/dy2 to the node just above the wall on the exit boundary and do backward differencing, I get a term u(i,j-2). Now, since there is no node below (i,j-1), how do I go about it. Urgent help needed, please. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66 ![]() ![]() ![]() |
If you are doing FVM then the diffusion term is actually the divergence of fluxes. The flux is what needs to be discretized, not d2u/dy2. The boundary flux is either a boundary condition or needs to be obtained from the solution.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
please see the picture attached to make the situation clear.
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
I am using finite difference method. Of course in FVM it is in terms of fluxes.
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
Please also make me understand (with reference to the figure I attached above), how to use ghost cells. What would be the values of, say, velocities at the ghost cells.
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66 ![]() ![]() ![]() |
In FD you directly have node values on nodes. What is your boundary condition there?
|
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
Its wall right in the bottom.At the top it is the free stream condition.
|
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
Your sketch is not clear and the formula you wrote is wrong
The derivative in i,j is (f(i,j+1)-2f(i,j)-f(i,j-1))/dy^2, no point in j-2 is involved in the node just above the wall. But what is not clear is that you are at the outflow section, what are you prescribing as BC? |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66 ![]() ![]() ![]() |
The node at i,j is on the boundary. At boundaries, you impose boundary conditions. You simply don't discretize the governing equation there. What is the discretization of the diffusion term for the node at i,j is never a question.
What is the constraint at i,j? Is it f(i,j)= some number of df/dx and df/dy= something. Even if i,j is an interior node adjacent to a boundary node, the same applies for the node at j-1. It has boundary conditions there. The boundary conditions determine what is the value of the virtual cells. |
|
![]() |
![]() |
![]() |
![]() |
#10 | |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#11 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
please see the schematic.
|
|
![]() |
![]() |
![]() |
![]() |
#12 | |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#13 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
I am not discretizing at the wall. i,j is at one node above the wall node. I am applying d2u/dx2 there. Maybe I should start from the free stream top and come down on nodes until I reach the node adjacent to the wall.Correct me please.
|
|
![]() |
![]() |
![]() |
![]() |
#14 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73 ![]() ![]() ![]() |
Quote:
I do not understand what you are doing! You should specify your flow problem, equations, bcs and formulation to integrate the NSE. You are just addressing a term in the x-direction momentum |
||
![]() |
![]() |
![]() |
![]() |
#15 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66 ![]() ![]() ![]() |
||
![]() |
![]() |
![]() |
![]() |
#16 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
I am attaching the whole problem. Please see.
|
|
![]() |
![]() |
![]() |
![]() |
#17 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66 ![]() ![]() ![]() |
This gets more and more confusing with every picture taken by your phone.
Boundary nodes don't have governing equations, there is no discretization there. You don't discretize anything at outlets. Boundaries (outlets) have boundary conditions and that's all. |
|
![]() |
![]() |
![]() |
![]() |
#18 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
Honestly, I am perplexed now. it is a rectangular domain. From left enters air at 10 m/s. There is no pressure gradient ( I have quoted the equation). If I were to find the U and V velocities at the outlet, how should these two eqns (continuity and momentum) apply.
|
|
![]() |
![]() |
![]() |
![]() |
#19 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
Let me elaborate it further :
Now, it is desired that backward differencing be applied to both continuity and momentum equations, how should these two equations look. There has to be a ghost node outside the domain to account for the 2nd order partial term in momentum equations. Can these two equations be consistently discretized in the mentioned scheme at the outlet? I would be grateful if you could please explain. |
|
![]() |
![]() |
![]() |
![]() |
#20 |
Member
Shah
Join Date: Aug 2013
Posts: 61
Rep Power: 13 ![]() |
my bad, forgot to tell, it is flow over a flat plate. if pressure gradient does not exist, what condition should be set at the outlet. obviously one has to investigate laminar boundary layer and velocity gradient therein.
|
|
![]() |
![]() |
![]() |
Tags |
backward differencing, finite difference, rectangular domain |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
On the diffusion term discretization on unstructured grids | sbaffini | Main CFD Forum | 33 | November 10, 2017 03:20 |
Why in Hrvoje Jasak's thesis diffusion term has "rho"? | cavida | OpenFOAM Programming & Development | 6 | February 4, 2016 07:10 |
Discretization of the Diffusion Term | Rui | CFX | 0 | October 24, 2005 12:43 |
Source term for diffusion equation in FLUENT 4.5 | Raja Banerjee | FLUENT | 1 | August 30, 2000 23:00 |
Numerical diffusion error | Z.Zeng | Main CFD Forum | 8 | October 22, 1999 09:06 |