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

Pressure boundaries at walls? Compressible Navier-Stokes 2D, Cavity problem.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2017, 16:04
Default Pressure boundaries at walls? Compressible Navier-Stokes 2D, Cavity problem.
  #1
New Member
 
Antonio
Join Date: Mar 2017
Posts: 8
Rep Power: 9
antoniojr is on a distinguished road
Well, I'll try to be as clear as possible.

I have a cavity problem. The boundary conditions I have are heat fluxes at walls and no-slip condition (in this case, velocity is zero at walls)

So, I'm solving transient navier stokes. I'm using a staggered grid. And the same grid for all properties.

I don't have problem solving the energy equation, but...

Mass conservation lets me get the new density values at the centers of the cells. Everything right? As I am dealing with air, I am using the ideal gas law so with T and density I can get the P values.

But... Remember that I'm just getting density at the center of the nodes, right? (I have no problem getting T at the center of the cells and walls as I told before)

When I deal with the momentum equation, a funny dP/dx (and also dP/dy, as it's a 2D problem) appears. Using central differences at the first node, it requires nowing both P1e and P1w. P1e can be approximated as 0.5*(P1+P2) but P1w... It's the value of the pressure at the wall. I have the temperature at the wall, so if I had the value of density at the wall I could use the ideal gas law to get the pressure... But conservation of mass only gives me values at the center of cells? So... I think I need a boundary condition at the wall (on density or pressure, but I think it should be the latest one). I tried everything I know, but I can't get the solution. I really spen a lot of hours on google, but everyone's talking about incompressible flows and mine is compressible :S

Please, can somebody help me? If it's useful to say, I'm working with matlab and using finite volumes.

Thank you in advance!

Attached Images
File Type: png dPdx.png (7.1 KB, 115 views)
antoniojr is offline   Reply With Quote

Old   March 21, 2017, 16:10
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Years ago I worked on this problem for 2D compressible flows on unstructured grid. My best results were obtained by solving the density equation in a FV built around the node on the wall. Of course, if you have a condition on the normal derivative of the temperature (dT/dn=q), you can use the derivative dp/dn = R (T*drho/dn + rho*q)
FMDenaro is offline   Reply With Quote

Old   March 21, 2017, 16:15
Default
  #3
New Member
 
Antonio
Join Date: Mar 2017
Posts: 8
Rep Power: 9
antoniojr is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Years ago I worked on this problem for 2D compressible flows on unstructured grid. My best results were obtained by solving the density equation in a FV built around the node on the wall. Of course, if you have a condition on the normal derivative of the temperature (dT/dn=q), you can use the derivative dp/dn = R (T*drho/dn + rho*q)
I didn't understand the first option.

The second one requires not only dT/dn, but also requires drho/dn. If I had rho at wall it would be great. But, conservation of mass (it's a transient problem, not steady) gives me the values at the center of the cells.

I'll try to explain. Energy equation gives me the values at the temperatures at the center of the faces. But, with the q and the help of Taylor series I can get T at walls.

But here, I don't have anything to help me so I can get rho at wall or drho/dn at the wall.

Something is missing, but I don't now what...
antoniojr is offline   Reply With Quote

Old   March 21, 2017, 16:19
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
The continuity equation has a FV with some faces on the wall? Why are you using staggering for a compressible solver??
FMDenaro is offline   Reply With Quote

Old   March 21, 2017, 16:26
Default
  #5
New Member
 
Antonio
Join Date: Mar 2017
Posts: 8
Rep Power: 9
antoniojr is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
The continuity equation has a FV with some faces on the wall? Why are you using staggering for a compressible solver??
Yes, the first node. I updated the first post with an image so it can be easier to help me.

Conservation of mass tells me:

(rho_n+1-rho_n)*(dx*dy/dt)=(rho_e*u_e-rho_w*rho_w)*dy + (rho_n*v_n-rho_s*v_s)*dx

At initial time I have all the properties in the whole domain. But, as I tried to tell in the previous post I don't have trouble getting the Temperature wherever I want but the conservation of mass only gives me the value of density at the center of the cells.

The reason I'm going with an staggered grid... Well, It doesn't exist any special reason. I just learned that way, and I'm used to that kind of grids.
antoniojr is offline   Reply With Quote

Old   March 21, 2017, 16:48
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
I can just tell that I worked on colocated unstructured grids. Any grid node had its own FV around it. The FV around a node at the wall was build with the remaining faces.
FMDenaro is offline   Reply With Quote

Old   March 22, 2017, 08:27
Default
  #7
New Member
 
Antonio
Join Date: Mar 2017
Posts: 8
Rep Power: 9
antoniojr is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
I can just tell that I worked on colocated unstructured grids. Any grid node had its own FV around it. The FV around a node at the wall was build with the remaining faces.
Anyway, you need a boundary condition of P or dP/dn at wall... How do you get it?

I've been reading, and it seems like the boundary condition dP/dn at wall can be obtained if I have the boundary conditions of velocity and temperature at walls... But how?

I think the key is this:

Quote:
Originally Posted by Tom View Post
There is no pressure boundary condition for the Navier-Stokes equations on the wall - the no-slip condition is enough.

In numerical methods, if projection methods are used, then the derived pressure equation requires "extra" boundary conditions which are chosen for compatability; e.g. take the momentum equations in vector form and take the dot product with the unit normal vector to the wall. This gives an equation for the normal derivative of the pressure on the wall.

For example on a flat surface (y=0), ignoring bouyancy forces etc, the boundary condition becomes,

dP/dy = nu.d^2u/dy^2.

Note this is not generally zero.
SOURCE:
antoniojr is offline   Reply With Quote

Old   March 22, 2017, 09:11
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by antoniojr View Post
Anyway, you need a boundary condition of P or dP/dn at wall... How do you get it?

I've been reading, and it seems like the boundary condition dP/dn at wall can be obtained if I have the boundary conditions of velocity and temperature at walls... But how?

I think the key is this:

No, after computed the density I just need a BC for the temperature.
FMDenaro is offline   Reply With Quote

Old   March 22, 2017, 11:40
Default
  #9
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,286
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by antoniojr View Post
Anyway, you need a boundary condition of P or dP/dn at wall... How do you get it?

I've been reading, and it seems like the boundary condition dP/dn at wall can be obtained if I have the boundary conditions of velocity and temperature at walls... But how?

I think the key is this:



SOURCE:
Out of three variables rho, pressure and temperature, you can only fix two because these three are related by ideal gas law.

Traditionally T and P are computed and density is computed from them.

T is computed at boundary because user either specifies it or specifies its gradient.

For P, pressure is extrapolated from interior by using 0 gradient or from one sided gradient.

For walls typically we use dPdn condition and most popular is where dPdn = 0. (that would gets into matrix as Neumann condition).

Many people have bettered this estimate by assuming control volume around the boundary node (as is already mentioned).

PS: dPdn can be estimated from cell centers including the neighbours.
arjun is offline   Reply With Quote

Old   March 22, 2017, 11:50
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by antoniojr View Post

I think the key is this:



SOURCE:



But you are solving compressible flows, not incompressible...
FMDenaro is offline   Reply With Quote

Old   March 22, 2017, 17:14
Default
  #11
New Member
 
Antonio
Join Date: Mar 2017
Posts: 8
Rep Power: 9
antoniojr is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
But you are solving compressible flows, not incompressible...
Take a look. The idea is to project the momentum equation at the perpendicular direction of the wall, and I evaluate it at the wall. So, I get a neumann condition for the pressure which I can use.

Attached Images
File Type: jpg pressureboundarycondition.jpg (81.3 KB, 103 views)
antoniojr is offline   Reply With Quote

Old   March 22, 2017, 17:22
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
If you use the momentum equation projected along the normal direction to the wall, you still have the problem of the density that theoretically is not constant.
I never used such procedure and I think it would introduce too much problems in the discretization.
FMDenaro is offline   Reply With Quote

Old   March 22, 2017, 17:32
Default
  #13
New Member
 
Antonio
Join Date: Mar 2017
Posts: 8
Rep Power: 9
antoniojr is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
If you use the momentum equation projected along the normal direction to the wall, you still have the problem of the density that theoretically is not constant.
I never used such procedure and I think it would introduce too much problems in the discretization.
But why is that a problem? I didn't made such assumption.

I went to talk with three different teachers, two from the fluid mechanics area and the third one from computation area. I didn't told anything to any of them, and the three of them told me to do that.

So to sum up.

  • Energy equation gives me the temperature at the center of the cells.
  • Knowing heat fluxes let me get the temperature at the walls.
  • Conservation of mass gives me the density at the center of the cells.
  • Momentum equation gives me the velocity component at the center of nodes. At cells close to the walls I need a bc of pressure at walls to get the velocities at that nodes, but the same conservation equation applied to walls can be used to get a neumann condition of pressure depending on the velocity at the cells. So, when solving, I get both all the velocities and the pressure at walls.
  • Using the ideal gas law, with the density at cell centers I can get pressure at cell centers, and with the pressure at walls I can get density at walls (if it's useful to get it).
So I think everything is closed. I have to work on it and see if I get a working code, but I hope so.

antoniojr is offline   Reply With Quote

Old   March 22, 2017, 17:37
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Have a look at this fundamental paper,

https://www.researchgate.net/publica..._viscous_flows

it treats the case of isothermal and adiabatic walls. It clearly states that you have only 4 conditions to be te problem well posed, the 3 velocity components and the condition on the temperature. It also states that the density at the wall is computed from its balance equation.

Now if you are able to theoretically argue this paper you are wellcome to do a submit your paper to a journal for a review.
FMDenaro is offline   Reply With Quote

Old   March 22, 2017, 17:55
Default
  #15
New Member
 
Antonio
Join Date: Mar 2017
Posts: 8
Rep Power: 9
antoniojr is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Have a look at this fundamental paper,

https://www.researchgate.net/publica..._viscous_flows

it treats the case of isothermal and adiabatic walls. It clearly states that you have only 4 conditions to be te problem well posed, the 3 velocity components and the condition on the temperature. It also states that the density at the wall is computed from its balance equation.

Now if you are able to theoretically argue this paper you are wellcome to do a submit your paper to a journal for a review.
Maybe I'm not using appropiate terms when I'm talking, but in pressure I didn't add any "external information". I agree when you say that the problem is well posed with the velocity components at walls and the condition of temperature. That was what drove me crazy. I give the values of the velocities at walls (no-slip condition), I give the heat flux at the wall but the gradient of P at the wall only depends on what happens at nodes so I'm not adding any kind of constraint.

It will take me some time to find what you told me at bold (I'll read it carefully). But I'll apreciate that you tell me what you disagree about what I exposed.

This is for the final degree work, I'm studying industrial engineering in Málaga. So I have to learn a lot more before doing any kind of paper (if I ever do).
antoniojr is offline   Reply With Quote

Old   March 22, 2017, 18:01
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by antoniojr View Post
Maybe I'm not using appropiate terms when I'm talking, but in pressure I didn't add any "external information". I agree when you say that the problem is well posed with the velocity components at walls and the condition of temperature. That was what drove me crazy. I give the values of the velocities at walls (no-slip condition), I give the heat flux at the wall but the gradient of P at the wall only depends on what happens at nodes so I'm not adding any kind of constraint.

It will take me some time to find what you told me at bold (I'll read it carefully). But I'll apreciate that you tell me what you disagree about what I exposed.

This is for the final degree work, I'm studying industrial engineering in Málaga. So I have to learn a lot more before doing any kind of paper (if I ever do).

Have a carefull reading of the paper. For NS equations, momentum and energy are parabolic but continuity is still hyperbolic. That implies a constraint on the set of BC.s.
Give a look to sec. 3.6 where it explicitly states that the density value at the wall is computed from the continuity equation. Then, the pressure at a wall is not a BC but is derived from density and temperature.
FMDenaro 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
question regarding LES of pipe flow - pimpleFoam Dan1788 OpenFOAM Running, Solving & CFD 37 December 26, 2017 15:42
interFoam (HELYX-OS) pressure boundary conditions SFr OpenFOAM Running, Solving & CFD 8 June 23, 2016 17:36
Low pressure de Laval simulation convergence problem heksel8i FLUENT 3 July 22, 2013 11:28
help: I am trying to solve Navier Stokes compressible and viscid flow Jose Choy Main CFD Forum 2 May 18, 2000 06:45
Hydrostatic pressure in 2-phase flow modeling (long) DS & HB Main CFD Forum 0 January 8, 2000 16:00


All times are GMT -4. The time now is 10:44.