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

Get pressure from velocity

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2014, 03:49
Default
  #61
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
1)
Quote:
the RHS is written by setting dP/dx|i-1/2= (axd-axc)i-1/2=0 at wall.
Why (axd-axc)i-1/2=0 too ? The condition at the wall is just on pressure? Oh but the velocity (u and v ) at the wall in the lid cavity is zero ? that's the reason ?
samycfd is offline   Reply With Quote

Old   August 29, 2014, 04:12
Default
  #62
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
1) Why (axd-axc)i-1/2=0 too ? The condition at the wall is just on pressure? Oh but the velocity (u and v ) at the wall in the lid cavity is zero ? that's the reason ?
if you fix dP/dn|i-1/2=0, the momentum equation says that you must fix also (axd-axc)i-1/2=0...it's a consequence of the equation, nothing to do with the fact that the velocity has zero value at wall
FMDenaro is offline   Reply With Quote

Old   August 29, 2014, 04:24
Default
  #63
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
just to let you see again the previous equation,

dP/dn = n.(ad-ac)

at section i-1/2 (supposed a wall) both RHS and LHS are zero. Note that does not depend on the condition v=0 at wall but is consequence of the fact you set homogeneous Neumann condition for the pressure
FMDenaro is offline   Reply With Quote

Old   August 29, 2014, 05:23
Default
  #64
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
Yes of course. Sorry. Now I got it.

I could also let dP/dn = n.(ad-ac) at walls and that's all. Why setting dp/dn=0 ?
samycfd is offline   Reply With Quote

Old   August 29, 2014, 05:42
Default
  #65
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
Yes of course. Sorry. Now I got it.

I could also let dP/dn = n.(ad-ac) at walls and that's all. Why setting dp/dn=0 ?

It could sound strange, but it is mathematically equivalent....just use the non-homogeneous Neumann condition

dP/dn|i-1/2 = (axd-axc)|i-1/2

substitute it in the equation

[(dP/dx)i+1/2 - (dP/dx)i-1/2]/dx = [(axd-axc)i+1/2 - (axd-axc)i-1/2]/dx

and you will se exactly the same.

The difference appears only at the end when you want, after computing the pressure in the inner nodes, to compute the pressure at walls to have the full pressure field.
FMDenaro is offline   Reply With Quote

Old   August 29, 2014, 06:41
Default
  #66
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
Oh yes it's kind of hidden but obvious now..

So I have to find a way of integrating this condition in the FE method.
samycfd is offline   Reply With Quote

Old   August 29, 2014, 07:02
Default
  #67
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
Oh yes it's kind of hidden but obvious now..

So I have to find a way of integrating this condition in the FE method.

yes, I think you have to work in the correct construction of the source term taking into account for the congruent BC.s
FMDenaro is offline   Reply With Quote

Old   September 1, 2014, 06:06
Default
  #68
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
Hi,

I was wondering, which BCs I have to set when I am computing the derivatives of velocity in the RHS ?
samycfd is offline   Reply With Quote

Old   September 1, 2014, 06:18
Default
  #69
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
Hi,

I was wondering, which BCs I have to set when I am computing the derivatives of velocity in the RHS ?

hello,
the velocities at walls are zero (for not moving wall), you compute the terms (axc-axd) and (ayc -ayd) in section i-1/2,i+1/2 and j-1/2, j+1/2 for the interior nodes.
When a section lies on a wall you procees as I wrote before
FMDenaro is offline   Reply With Quote

Old   September 2, 2014, 04:25
Default
  #70
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
yes I know that but still I get some different derivatives of velocities compare to the ones I exported from Fluent.

So do you agree with :
ac = rho*( V . grad ) V and axc = rho*(uu_x+vu_y) and ayc =rho*(uv_x+vv_y)
AND
ad = mu*(lap(V)) and axd = mu*(u_xx+u_yy) and ayd= mu*(v_xx + v_yy)
samycfd is offline   Reply With Quote

Old   September 2, 2014, 05:03
Default
  #71
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
yes I know that but still I get some different derivatives of velocities compare to the ones I exported from Fluent.

So do you agree with :
ac = rho*( V . grad ) V and axc = rho*(uu_x+vu_y) and ayc =rho*(uv_x+vv_y)
AND
ad = mu*(lap(V)) and axd = mu*(u_xx+u_yy) and ayd= mu*(v_xx + v_yy)

the terms written in quasi-linear form are correct (even if I would work with the conservative form).
Why do you want to compare the value with Fluent??
FMDenaro is offline   Reply With Quote

Old   September 2, 2014, 05:09
Default
  #72
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
Okay ! I would like to know which spatial schemes, they use in Fluent, forward, backward central differences or other because maybe the schemes could cause the solution not to converge!
samycfd is offline   Reply With Quote

Old   September 2, 2014, 05:22
Default
  #73
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
But if I assume rho an mu to be constant what the differences between the conservative and non conservative form ? Isn't it mathematically equivalent ?
samycfd is offline   Reply With Quote

Old   September 2, 2014, 05:49
Default
  #74
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
But if I assume rho an mu to be constant what the differences between the conservative and non conservative form ? Isn't it mathematically equivalent ?
Actually the mathematical equivalence exists also if rho is not constant (take the equation d rho/dt + Div (rho v) =0 and substitute into the momentum equation), but the numerical equivalence between the two formulations does not ..
FMDenaro is offline   Reply With Quote

Old   September 2, 2014, 06:04
Default
  #75
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
I don't understand how it could change something numerically ..
samycfd is offline   Reply With Quote

Old   September 2, 2014, 07:05
Default
  #76
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
I don't understand how it could change something numerically ..
let me give you a simple example for a term as uux and as (uu)x both discretized at second order centred FD:

u(i)*(u(i+1)-u(i-1))/2/dx

and

(u(i+1)^2-u(i-1)^2)/2/dx

you will easily see that they produce different local truncation errors.
Furthermore, in a FV formulation you cannot work with the quasi-linear form but you must use the conservative (divergent) form.
FMDenaro is offline   Reply With Quote

Old   September 2, 2014, 10:26
Default
  #77
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
Okay yes I got it. I have tried to fully implement the idea in 2D. And with the 2nd dimension I faced a new problem :

Quote:
[(dP/dx)i+1/2 - (dP/dx)i-1/2]/dx = [(axd-axc)i+1/2 - (axd-axc)i-1/2]/dx
So in 2D we get :

[(dP/dx)i+1/2j - (dP/dx)i-1/2j]/dx + [(dP/dy)ij+1/2 - (dP/dy)ij-1/2]/dy= [(axd-axc)i+1/2j - (axd-axc)i-1/2j]/dx + [(axd-axc)ij+1/2 - (axd-axc)ij-1/2]/dy

My question is did we get :
dP/dx|i-1/2= (axd-axc)i-1/2=0 ( Like i 1D ) OK
dP/dy|i-1/2= (ayd-ayc)i-1/2=0 ( NEW condition because 2D case ) ?

from the BC : dP/dn = n.(ad-ac)
samycfd is offline   Reply With Quote

Old   September 2, 2014, 10:33
Default
  #78
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
Okay yes I got it. I have tried to fully implement the idea in 2D. And with the 2nd dimension I faced a new problem :



So in 2D we get :

[(dP/dx)i+1/2j - (dP/dx)i-1/2j]/dx + [(dP/dy)ij+1/2 - (dP/dy)ij-1/2]/dy= [(axd-axc)i+1/2j - (axd-axc)i-1/2j]/dx + [(axd-axc)ij+1/2 - (axd-axc)ij-1/2]/dy

My question is did we get :
dP/dx|i-1/2= (axd-axc)i-1/2=0 ( Like i 1D ) OK
dP/dy|i-1/2= (ayd-ayc)i-1/2=0 ( NEW condition because 2D case ) ?

from the BC : dP/dn = n.(ad-ac)


The expression dP/dy= (ayd-ayc) only where you are on a wall where n.Grad P = dP/dy (normal projetion to the wall that allows you to apply Neumann condition), that does not happen on a section i-1/2 where dP/dy is a tangential projection...
FMDenaro is offline   Reply With Quote

Old   September 2, 2014, 10:36
Default
  #79
Member
 
Join Date: Aug 2014
Posts: 58
Rep Power: 12
samycfd is on a distinguished road
i make a mistake :

[(dP/dx)i+1/2j - (dP/dx)i-1/2j]/dx + [(dP/dy)ij+1/2 - (dP/dy)ij-1/2]/dy= [(axd-axc)i+1/2j - (axd-axc)i-1/2j]/dx + [(ayd-ayc)ij+1/2 - (ayd-ayc)ij-1/2]/dy

I was thinking that too so boundary conditions are missing: If i-1/2 lying on a wall, then how I can deal with the term (ayd-ayc)ij-1/2
samycfd is offline   Reply With Quote

Old   September 2, 2014, 10:43
Default
  #80
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samycfd View Post
i make a mistake :

[(dP/dx)i+1/2j - (dP/dx)i-1/2j]/dx + [(dP/dy)ij+1/2 - (dP/dy)ij-1/2]/dy= [(axd-axc)i+1/2j - (axd-axc)i-1/2j]/dx + [(ayd-ayc)ij+1/2 - (ayd-ayc)ij-1/2]/dy

I was thinking that too so boundary conditions are missing: If i-1/2 lying on a wall, then how I can deal with the term (ayd-ayc)ij-1/2

the Neumann condition must be applied on any section having j-1/2 (this section is parallel to the x-direction), therefore

(dP/dy)ij-1/2=(ayd-ayc)ij-1/2
FMDenaro is offline   Reply With Quote

Reply

Tags
pressure velocity


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
static vs. total pressure auf dem feld FLUENT 17 February 26, 2016 14:04
Timestep and Pressure Correction Relationship in SIMPLE rks171 Main CFD Forum 23 May 4, 2012 02:04
Initial pressure and transverse velocity fields to initialize turbulence model nickvinn Main CFD Forum 0 February 29, 2012 11:11
How to set pressure BC with mass Velocity Magnitud arwang FLUENT 2 March 12, 2007 21:04
how to print the results from CFX-4.2 cfd_99 Main CFD Forum 5 June 21, 1999 10:23


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