CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   interFoam-losing fluid in free surface simulating (https://www.cfd-online.com/Forums/openfoam/110440-interfoam-losing-fluid-free-surface-simulating.html)

amin66 December 18, 2012 09:30

Hi Santiago, i tried will bigger domain at inlet (30d), but there is losing fluid yet.

Quote:

Originally Posted by santiagomarquezd (Post 397760)
HI, two inlets is correct, but two outlets with fixed position for the free surface is not since you don't know the exact free surface position. The outlet can be only one boundary with zeroGradient for alpha1.

Regards.

i always have used zeroGradient for alpha1 at outlet, but because of that the wave which forming on free surface, don't reach the outlet, maybe we can use two outlet and then fix the level of fluid! i will try and inform the result.

amin66 December 18, 2012 09:36

Quote:

Originally Posted by ngj (Post 397811)
Hi Amin,

Something just occurred to me. You are specifying a flow rate over the water column and you are specifying the water level at the inlet.

In order to maintain this flow condition, you need some kind of driving force, which in your case can only be a horizontal component of the gravitational vector OR a slope of the free surface. Have you checked whether the slope of the free surface and hence your loss of water is not a physical sane response; especially because with the presence of the cylinder, the flow resistance is much larger than without the cylinder.

Kind regards,

Niels

Hi Niels
I use gravity in y direction(-9.81), why should i use gravity(g) in two component(x and y)? isn't that against of the reality?
However i'm trying the two component for g. and inform the result.

ngj December 18, 2012 10:21

Hi Anim,

A gravity vector pointing in the non-vertical direction is merely the same system represented in a different coordinate system, so it should work.

Kind regards,

Niels

amin66 December 22, 2012 07:45

Hi Friends, sorry for my late reply

Dear Santiago, you are right, i used two outlet for liquid and gas, but that couldn't solve.

Dear Niels, i applied gravity in X direction(horizontal), for positive values the liquid loses rapidly, and for negative values liquid increases rapidly. do you think the very small negative values could help?!

santiagomarquezd December 22, 2012 09:27

Well, I think you should retain the enlargement of the domain and the zero gradient BC at the outlet, now, with this base try to refine the mesh towards the original interface position, both over and down the interface and try again. interFoam is a robust solver, it's only a matter of setting the proper BC's, initial conditions and mesh.

Regards.

amin66 December 22, 2012 12:22

thanks, santiago i used the fine mesh both sides of interface and also near the cylinder before, but the problem existed.

what's your idea about BC in page 1? actually i just used there and i don't know what are they exactly or how exactly work! "buoyant pressure, pressureinletoutletvelocity, calculated, ..."

i read the user guide and this site posts but couldn't get something, how can i obtain good help about this BCs? because i can't understand source codes.

ngj December 22, 2012 15:52

Hi Amin,

Let us try something different.

Close all of the boundaries but keep the present boundary condition for the cylinder. What I mean is that you apply wall boundary conditions on all the outer boundaries (equivalent to a box). Whether you use slip or noslip boundary condition should not matter. Now answer this:

1. Is the amount of water in the domain constant?
a. If yes: The model is mass conserving with the present boundary conditions on the cylinder.
b. If no: The boundary condition on the cylinder is wrong.

If you go to "a", then the model is not loosing water per say, but what you are experiencing is rather an adjustment of the model toward a physical equilibrium. So you "loosing" water is only the model, which tries to adjust to the boundary conditions you enforce. As you do not have any driving force in the system to balance the flow resistance in the horizontal direction, the model tries to create the necessary pressure gradient; in this case a slope of the water surface. This is then what you subsequently interpret as a loss of water.

By the way, what are the physical dimensions of the model? Diameter, water depth, etc. Important relative to the 1 m/s velocity at the inlet.

Kind regards,

Niels

ngj December 22, 2012 15:54

Sorry, studied your drawing again, so you already gave the dimensions.

Merry Christmas,

Niels

amin66 December 29, 2012 06:39

Hi Niels
I put gravity in horizontal(gx=.0001) and result became better, just a few losing fluid. then i put gx=.0005 and now a little increasing in fluid. you can see the pictures.
so i think we have to use Trial and Error method to obtain correct "gx" for each case. it need much time. is there any better way to solve losing problem? like write own BC for each boundary?

Regards

amin66 December 29, 2012 06:46

1 Attachment(s)
Quote:

Originally Posted by ngj (Post 398700)
Let us try something different.

Close all of the boundaries but keep the present boundary condition for the cylinder.
......

i did that and put all boundaries wall except up boundary.
no-slip for velocity, buoyant pressure for "P" , and zero gradient for alpha1. and for up boundary, i put previous conditions. you can see the result that shown we don't have horizontal free surface.:confused:

amin66 December 29, 2012 06:56

3 Attachment(s)
sorry, i uploaded pictures for post #29

amin66 January 2, 2013 11:52

happy new year!
dears, no answer for this problem yet? specially about BCs?

ngj January 2, 2013 11:59

With respect to post #30 would you have forgotten to put the initial velocities to (0 0 0) in the simulation?

With respect to the figures concerning the tilting of the gravity vector it looks good. The tilting of the gravity vector depends on the flow speed you want and the force on the cylinder.

Kind regards,

Niels

kwardle January 2, 2013 12:11

I don't think you should try to make the bottom boundary open, just make it a wall with zeroGradient and freeSlip for velocity. It seems like it is far enough from the cylinder to have any effect on the liquid rise in that region anyway--am I missing something? I don't think tweaking gravity to give the correct behavior is the right approach. I have been following along since this seems interesting--I wish I had time to try out the case on my own so I could better appreciate the issues you are having and better offer suggestions--on the surface (pardon the pun :-) ) it does seem like a pretty straightforward problem and I am confused by the issues.

ngj January 2, 2013 12:34

Hi Kent,

I agree that tweaking the gravity vector is not feasible in production runs if a particular mean velocity is needed, however, it is a very good way to understand what is happening in the system.
I am convinced that the "loosing" of the fluid is founded in the physical adjustment of the system toward an equilibrium, though it does not seem that Amin has responded to that. This basically explains the results with the different magnitudes of the gravity tweak.
One can understand the gravity tweak as a rotation of the coordinate system from a sloping channel with vertical gravity vector to a horizontal channel with a sloping gravity vector. In this way the water surface in the pure channel flow (without the cylinder) will remain horizontal, which interFoam would like very much.

Kind regards

Niels

amin66 January 3, 2013 09:58

Hi Niels
Niels, u were right, i had forgotten to set velocity to zero, so i solved again with zero velocity and there was no increasing or decreasing in liquid.
u mentioned that direction in gravity depends on the inlet velocity and i think maybe height of liquid phase too. so is there any relation between them?
i think the problem is because of pressure condition, specially at outlet:there is no coordination between pressure at inlet and outlet, so, outlet loses liquid to equilibrium.
i read the source code of interFoam (OF 1.6): there is no modified pressure, means that the pressure used in source code is (p) not (pd=p-rho*g*h). however i read before in interFoam the pressure is (pd=p-rho*g*h). :confused:

by the way so thanks to ur replies and attentions. if there is any help to solve this issue, i will be glad to hear.

Regards
Amin

amin66 January 3, 2013 10:02

Hi Kent
thanks for ur comment. now, i use slip condition at down. maybe using angled gravity not bee a good approach but as Niels mentioned, it works. however if there is the exact solution or better approach, can share with us.

Regards
Amin

kwardle January 3, 2013 10:40

Amin,
I also wanted to comment on your use of 1.6--for this very reason--the treatment of pressure was changed between 1.6, 1.7, and 2.x in interFoam. Probably you are referring to an earlier version (1.5?) where it was pd. In 1.6 it is p, 1.7 it is p_rgh, and 2.x it is back to p. A little schizo, yes. Should not make a difference--except for maybe in your selection of BCs. Note that 2.1.x has a BC type called phaseHydrostaticPressure which might be useful to you on your outlet. This is because the actual pressure on a vertically oriented surface is not a constant--it varies with height (depth)--this BC accounts for that.
Good luck.

amin66 January 3, 2013 13:28

I don't access to OF 1.5 an 1.7, Kent. (p_rgh) used in 1.7 is (p - rho*g*h)?? I use buoyantPressure Bc at inlet and walls. i think it's same as phaseHydrostaticPressure that mentioned, i think.

Regards

venkcy September 23, 2019 02:53

1 Attachment(s)
Hello Amin,


Did you able to validate the results? I am trying to simulate the exact problem. I did not have the problem of the domain being drained but the flow field is completely unphysical. I have tried refining the mesh and reducing the time step. Nothing works. I am attaching the image of vorticity.



Your suggestion will highly helpful.


Thanks.


All times are GMT -4. The time now is 01:56.