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

gravity and boundary condition

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2002, 05:11
Default gravity and boundary condition
  #1
Angela
Guest
 
Posts: n/a
hi everybody I am writing a code(based on FVM and Roe scheme) for steady 2d incompressible flow through a plate.But I have to add the gravity force in to the original equation.That means that the pressure is the total pressure,including dynamic pressure and hydrostatic pressure.

Now for the boudary condition of plate,i give it no slip condition.For gravity force I give nondimensional hydrodtatic force as -rou/fn/fn*volume,and the initial pressure is also the hydrostatic pressure that is rou*(z0-y)/fn/fn.The first calcaultion seems that the residual for the interior points are right.But for the points around plates,I have used ghost points to calculate the velosity,as uc=1.0,ug=-1.0.vc=0,vg=0.and pressure difference is just hydrostatic pressure difference.

There are some residuals for u direction which is not compatible with physical truth.

I am lost.Anybody please give me an answer?Or any reference aboout adding grvity force?

Thank you!
  Reply With Quote

Old   November 21, 2002, 07:20
Default Re: gravity and boundary condition
  #2
Tom
Guest
 
Posts: n/a
Since the flow is incompressible and you make no mention of temperature (i.e. your not using the Boussinesq approximation) then the gravity term can be absorbed into your pressure (P = p +gz) wlog; i.e. the gravity term should play no explicit role in the solution (unless of course if you have a free-surface type bc).
  Reply With Quote

Old   November 21, 2002, 11:19
Default Re: gravity and boundary condition
  #3
Angela
Guest
 
Posts: n/a
Thank you for your response! Just as you have guessed,there exists free surface now.I am trying to use level set method to capture it.So i have to consider the gravity force in NS equation. The strange thing is that only around boundary of the plate I will get some flux although in u direction there should be nothing for inviscid flow.

I am using no-slip BC and just give the hydrostatic pressure difference for the boundary cells. Looking forward to your suggestions!
  Reply With Quote

Old   November 21, 2002, 12:50
Default Re: gravity and boundary condition
  #4
Tom
Guest
 
Posts: n/a
Have you got all the bc's correct? I'm not too sure what your phycical problem is but for viscous flow with a free surface you should have the following conditions

(1) No-slip on solid boundaries,

(2) constant pressure (or continuity of pressure for two immiscible fluids) on the free-surface,

(3) the kinematic condtion that there is no flow through the free-surface; i.e. it's a material surface - for a two-fluid flow this is replaced by continuity of velocity at the interface,

(4) fixed tangential stress at the free-surface (or continuity of tangential stress for two fluids).

  Reply With Quote

Old   November 21, 2002, 15:18
Default Re: gravity and boundary condition
  #5
Angela
Guest
 
Posts: n/a
Thank you for your detailed response.

But now I just use one fluid like water or air to calculate the residual but there is flux in the u direction.

One reason is maybe the model .because in the model i use level set in the roe scheme.

but for all the interior points there is no flux for u direction except that on the boundary .

if no hydrostatic pressure of couse there r no such problems.But why after adding pressure there are problems around no slip bc?
  Reply With Quote

Old   November 22, 2002, 00:06
Default Re: gravity and boundary condition
  #6
versi
Guest
 
Posts: n/a
|fluid cell 1| -wall- |ghost cell g|

impose: U_g=-U_1 such that mass flux through wall=0.0 and p_g=p_1, where p_g is only the static part.
  Reply With Quote

Old   November 22, 2002, 04:45
Default Re: gravity and boundary condition
  #7
Angela
Guest
 
Posts: n/a
Thanks versi and Tom!

Yes as just you have suggested,I have used the pressure and velosity like that so that the wall condition is no slip condition.

But it seems there is no influnce.I think i should describe my problem in detailed so that you can see whether it is the model problem. Maybe a long chapter)

In fact the problem I want to solve is about free surface with level set by finite volume method and flux differencing to calculate the convective items and just use some common ways to calculate the diffusive items.

In order to couple the ns and level set together,I have to get a jacobi matrix in which every eq is in conservative form.Like d(rou*u*u+p)/dx+d(rou*u*v)/dy=rhs. For level set eq i use d(rou*fi*u)/dx+d(rou*fi*v)/dy=0. For y direction the rhs is gravity force given -rou*g. In which fi is level set function,and I have given it as the distance between the cell center and the free surface as initial guess.And though density rou for interface should be the function of fi,at beginning i just give drou/dfi=0.

And in order to get eigenvalues and engenvectors,I use(u,v,p,fi)as variants.And it seems the calculated engenvetors(left and right) are right because there are no flux left in the interior points.

Now I just use cartesian grids and the wall is for a plate.The velocity is Uc=-Ug but pressure is also the hydrostatic pressure for its real location.But because what we really need is onlt the difference between the cell center and ghost point,it doen not matter.And I have use what you have suggested to replace the pressure difference is 0.But there are still that problem.

But if I change the pressure difference on the other surface of the cell near the boundary,the flux for the boundary cell is 0!!

I do not know why!!

Now I am planning to use this for 1d unsteady two phase.But as we know the Q should be(rou*u,rou,rou*fi),but I am using q=(u,p,fi).I am not sure whether it will work or where is my problem souce!

Looking forward to your new ideas!
  Reply With Quote

Old   November 22, 2002, 05:51
Default Re: gravity and boundary condition
  #8
Tom
Guest
 
Posts: n/a
I think you should try solving the equations in terms of the "modified pressure" ( P = p + rho.g.z ) and changing the free-surface bc to account for this. In this way gravity does not appear explicitly in the NS equations and enters your model through the free-surface dynamic boundary condition,

Tom.
  Reply With Quote

Old   November 22, 2002, 05:56
Default Re: gravity and boundary condition
  #9
onno
Guest
 
Posts: n/a
Angela,

To address some of your concerns. It's not because of the level set method used with the Roe scheme. It's due to a pressure "extrapolation" problem at the non-slip boundary. Depending on your coding and choices of ghost cells versus boundary patches or not it is quite difficult to tell you how to correct your problem. DEBUGGING is the answer. It's a common error. You will realise when performing hand calculations on the non-slip boundary that you make some error with the pressure gradient prediction at the boundary. Good luck, you are on the right track.
scleakey likes this.
  Reply With Quote

Old   November 22, 2002, 11:41
Default Re: gravity and boundary condition
  #10
Angela
Guest
 
Posts: n/a
Thank you onno.

Just as you have suggested,I am using mathematica to calculate the 2d one fluid plate flow.And also there is u momentum equation residual left although I have give the Uc=-Ug,Vc=Vg=0.The presuure difference is just the difference of hydrostatic pressure.If no v direction velocity,there should be no u-momentum flux left.It is suitable for interior points but not suitable for the boundary cells.

If as you have said I am on the right way.Maybe there is some problem for the eigenvector caculation.I am using mathematica to calculate jacobi matrix eigenvalues and eigenvectors.But I have transpose it to get left and right eigenvectors.

I will come back to see my calculation of eigenvectors to see whether there are some problems for that!

Thank you very much!

Wish Tom,versi and onno a good weekend!
  Reply With Quote

Old   November 22, 2002, 11:44
Default Re: gravity and boundary condition
  #11
Angela
Guest
 
Posts: n/a
Thank you Tom! But in my problem now there is no interface boundary problem.Although I have to consider the problem which might exist around the interface because the discontinuity of density. I will recalculate the eigenvectors and eigenvalues to check whether there are some problems for it.If they are right I am totally lost! Anyway wish you a happy weekend!
  Reply With Quote

Old   November 22, 2002, 13:04
Default 2D incompressible flow with gravity...
  #12
Patrick Godon
Guest
 
Posts: n/a
I am not sure I understood your problem completely, but it seems that it is a flow on a (horizontal) plate with gravity in the (minus -) vertical direction? The flow is incompressible. You could use the shallow water equations to solve the problem, but I understand that this is not what you are doing. It might be easier to solve the problem using the shallow water approximation rather than the full NS eqs.

Cheers, Patrick
  Reply With Quote

Old   November 23, 2002, 02:04
Default Re: gravity and boundary condition
  #13
mukhopadhyay
Guest
 
Posts: n/a
i am not sure if i have understood the problem definition correctly. what i understand is that you have a developed flow (incompressible) over a flat plate. the flow has a free surface at top.

is it not possible to get a force balance (free body diag)for the top layer cv like the way hydrostatic press is derived. and then incorporate this force in the body force term in the eqn of motion.
  Reply With Quote

Old   November 23, 2002, 08:15
Default invisid no slip body condition
  #14
Angela
Guest
 
Posts: n/a
Thank you Patric Godon. In fact what I am going to do is not about shallow water problem.I just use such a case to testify my model and code.What I am going to do is about free surface of near water submersible.And now I am trying to solve a simple problem :a shallow tank,with a bump at the bottom,water flow in u direction and considering the gravity force and hydrostatic pressure.Using level set method and FVM coupled together to get eigenvalues and eigenvectors of flux jacobi matrix to use flux differencing method.And with the q=(u,v,p,fi)to get all the variants at the same time.In which p is the total pressure.

And is it right if I give no-slip condition for invisid incompressible solid boundary condition?

Wish you a good weekend!
  Reply With Quote

Old   November 25, 2002, 13:33
Default Re: invisid no slip body condition
  #15
Patrick Godon
Guest
 
Posts: n/a
I haven't read all your postings/answers so I might be missing something, but near a wall/bottom you must have no slip BC. Now if you want to assume a slip BC, it means that you do not want to cope with the boundary layer at the bottom of your tank, but just with the pressure change in the vertical direction. Now if you do have a 'bump' in the bottom of your tank and the flow passes over it, you will eventually develop (I guess) some turbulence (with streamwise vortices) downstream, depending on the velocity of the flow and size of the 'obstacle' (bump). You must have some 'artificial' viscosity in your code, again, I guess.

Is that what you are trying to model? streamwise vortices and sub-critical transition to turbulence?

Patrick
  Reply With Quote

Old   November 26, 2002, 05:35
Default Re: invisid no slip body condition
  #16
Tom
Guest
 
Posts: n/a
You cannot apply the no-slip condition in an inviscid flow - the no-slip condition requires viscosity.
  Reply With Quote

Old   November 26, 2002, 06:05
Default Re: invisid no slip body condition
  #17
Angela
Guest
 
Posts: n/a
Thank you Patrik!

I really have not imagined my problem that complicated although it seems to be !

Yes I just want to use the bottom bump to testify my models and codes.But at the beginning after i have calculated the eigenvector and eigenvalues for flux matrix,and also I am using flux differencing splitting with upwind scheme,i find on the boundary cell there is u momentum flux left(now i only give u directio speed).So i am suspicious of the boundary consition.

But now i find if i have not given initial uniform velocity field but nonuniform,i.e, there is velocity jump for every cell ,this problem also exists.I think it is a riemann problem(Am i right).Now i have not considered the diffusion items to make my calculation by mathematica easy.

But for my problem now i only consider a plate!And also the source of problem is not from level set coupling with ns,but introduction of hydrostatic pressure and gravity force.I think maybe in roe average there should be some connection with something that i do not know now.

Looking forward to your recommendation!
  Reply With Quote

Old   November 26, 2002, 06:08
Default Re: invisid no slip body condition
  #18
Angela
Guest
 
Posts: n/a
Thank you Tom!

No matter whether we should use no-slip or slip condition,wherever there is velocity jump in the flow field,there will be momentum flux left!it is because of having introduced hydrostatic and gravity force,I think!

I am trying to find other schemes and methods to slove it now!

Looking forward to your recommendation!
  Reply With Quote

Old   November 26, 2002, 07:38
Default Re: invisid no slip body condition
  #19
Tom
Guest
 
Posts: n/a
I think I would need to see the equations and boundary conditions (in contiuous form; i.e. the pdes) that you think you are solving to comment any further. I suspect from what you've written previously that your boundary conditions are not consistent with the equations,

Tom.
  Reply With Quote

Old   November 26, 2002, 08:09
Default Re: invisid no slip body condition
  #20
Angela
Guest
 
Posts: n/a
Thank you tom! The pdes are just conservative form ns equations.Such as d(rou*u)/dx+d(rou*v)/dy=0 d(rou*u*u+P)/dx+d(rou*u*v)/dy=0 d(rou*u*v)/dx+d(rou*v*v+P)/dy=-rou*g d(rou*fi*u)/dx+d(rou*fi*v)/dy=0 for boundary now we only give Uc=-Ug in order that the U on the boudary is zero.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Domain Imbalance HMR CFX 5 October 10, 2016 06:57
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
Boundary Condition in CFX ssbear CFX 5 February 7, 2011 02:10
Boundary Condition in CFX ssbear ANSYS 1 February 1, 2011 21:43
Outlet boundary condition for pd in InterFoam gopala OpenFOAM Running, Solving & CFD 0 March 19, 2008 10:26


All times are GMT -4. The time now is 06:13.