gravity and boundary condition
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*(z0y)/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! 
Re: gravity and boundary condition
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 freesurface type bc).

Re: gravity and boundary condition
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 noslip BC and just give the hydrostatic pressure difference for the boundary cells. Looking forward to your suggestions! 
Re: gravity and boundary condition
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) Noslip on solid boundaries, (2) constant pressure (or continuity of pressure for two immiscible fluids) on the freesurface, (3) the kinematic condtion that there is no flow through the freesurface; i.e. it's a material surface  for a twofluid flow this is replaced by continuity of velocity at the interface, (4) fixed tangential stress at the freesurface (or continuity of tangential stress for two fluids). 
Re: gravity and boundary condition
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? 
Re: gravity and boundary condition
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. 
Re: gravity and boundary condition
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! 
Re: gravity and boundary condition
I think you should try solving the equations in terms of the "modified pressure" ( P = p + rho.g.z ) and changing the freesurface bc to account for this. In this way gravity does not appear explicitly in the NS equations and enters your model through the freesurface dynamic boundary condition,
Tom. 
Re: gravity and boundary condition
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 nonslip 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 nonslip boundary that you make some error with the pressure gradient prediction at the boundary. Good luck, you are on the right track. 
Re: gravity and boundary condition
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 umomentum 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!:) 
Re: gravity and boundary condition
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!

2D incompressible flow with gravity...
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 
Re: gravity and boundary condition
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. 
invisid no slip body condition
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 noslip condition for invisid incompressible solid boundary condition? Wish you a good weekend! 
Re: invisid no slip body condition
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 subcritical transition to turbulence? Patrick 
Re: invisid no slip body condition
You cannot apply the noslip condition in an inviscid flow  the noslip condition requires viscosity.

Re: invisid no slip body condition
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! 
Re: invisid no slip body condition
Thank you Tom!
No matter whether we should use noslip 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! 
Re: invisid no slip body condition
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. 
Re: invisid no slip body condition
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.

All times are GMT 4. The time now is 03:47. 