CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Problem with the pressure field using interFoam (https://www.cfd-online.com/Forums/openfoam-solving/59174-problem-pressure-field-using-interfoam.html)

zoune October 10, 2007 05:16

Hello, I'm a beginner in op
 
Hello,
I'm a beginner in openFoam; I try to use it to modelize breaking waves. Unfortunately, after having realized more or less successful experiments, I wanted to grab the pressure along a wall.
After several very surprising trials (very weird pressure fields ) I decided to see what was the pressure field for a 7m still water column in a rectangular tank. The pressure is uniform within the water
( = 0.7 bar, which is the pressure at the bottom of the tank ). Did I do something wrong or is it a side-effect of the interface compression term ?
Thank you for your answers.
Benoit

zoune October 10, 2007 12:32

Ok, pd seems to be the dynamic
 
Ok, pd seems to be the dynamic pressure, according to what I read in the posts :
pd = p - rho*g*h.
However, one should expect the dynamic pressure to be equal to 0 and not 0.7 bar in the fluid. Any comment about the derivation of pd is welcome.
Thanks you very much,
Benoit

zoune October 11, 2007 04:46

One step beyond! It appears
 
One step beyond!
It appears that I had not the right BC for my wall. After reading this post, I replaced zeroGradient by a fixed value of 0 for the pressure. The other BC, gamma and U remain a zeroGradient condition. Now it seems to work well (however the maximal pressure is a bit low).
Can anyone tell me what happened ? I am a bit confused about that ... Thank you

zoune October 11, 2007 11:01

A quick sum up and some pictur
 
A quick sum up and some pictures :
I have a problem with the pressure field for water a rest in a tank. The dynamic pressure field given by interFoam is equal to 68.6 kPa everywhere in the fluid. The BC for pd for all the walls is zeroGradient.
The pd distribution :

http://www.cfd-online.com/OpenFOAM_D...ges/1/5646.jpg

I downloaded the application interFoamPressure to compute the total pressure.

First experiment : BC for p is zeroGradient for all walls. Here the p distribution :

http://www.cfd-online.com/OpenFOAM_D...ges/1/5647.jpg

Second experiment : the BC for left wall has a fixedValue of 0 for p. We get :

http://www.cfd-online.com/OpenFOAM_D...ges/1/5648.jpg

Any explanation is welcome. And if nobody answers ... well ... It will be a small tutorial for beginners ^^

eugene October 11, 2007 11:31

Not sure if it is still the ca
 
Not sure if it is still the case, but VOF in OpenFOAM used to contain an interface "compression" term that was used to keep the interface from spreading out. This compression term caused pressure jump across the interface. I guess it is still the case.

Your fixed value wall negates the influence of the compression term on the bulk volume of fluid. Of course a fixed value wall boundary will not work once the fluid starts flowing, i.e. you wont be able to get high wall pressures due to flow impingement.

To get the correct pressure, you will have to find out how to cancel the effect of the compression on the pressure field. Note the compression pressure does not invalidate the results.

paka October 11, 2007 21:22

Dear OpenFOAM users, The wh
 
Dear OpenFOAM users,

The whole thing is about real pressures, not modified pressures as interFoam produces. Especially, I mean the interFoamPressure tool from Dr. Jasak's OpenFOAM distribution. The tool shortly speaking allows for real pressure calculation.

Using damBreak case, I decided to extend very initial case, from step to step adding/changing/improving some of its properties.
File: domains.png - I only present selected cases (2,4,6) which I did.




In every tested case the domain was the same, around 1.2m long and 0.6m height, with initial dam water level equal to 0.292m. I used the RANS solver (rasInterFoam).

I send you a three video files which you might want to take a look.
They are packed in TestCase.zip. All of them were run using serial code.
2-p-rans.mov - empty domain
2-p-rans.mov - domain with structure above the water
2-p-rans.mov - domain with submerged structure



Forgive me a strange structure placement in last example but it was suppose to be a rough test and while changing the mesh I didn't have access to viewer.

!----------------------------------------------!
The point is, while the case was modified, as in attached movies, very different and strange results were obtained along the run.

For first two cases one would expect exactly the same or very close pressure results, while this is not the case.

If you take a look you will see at some movie frames a huge 'p' pressure jumps. Also some strange pressure bubbles appear in 'p' field, usually showing up in pairs, very huge positive and negative pressures appear. What is worth mentioning, none of these anomalies appear in 'pd' nor 'gamma' field. Actually regarding to flow shape 'pd' is more alike 'gamma', which is fine.
!----------------------------------------------!

For better reference, I also include one larger example with refined mesh next to the walls and structure, this also includes 'pd' and 'gamma' animation:
Refined.zip



I would be very grateful if you could provide some comment and input, so our solutions could be verified.

Many very thanks for your time and hope to hear from you soon.

Regards,
Krystian

paka October 11, 2007 21:25

Dear OpenFOAM users, The wh
 
Dear OpenFOAM users,

The whole thing is about real pressures, not modified pressures as interFoam produces. Especially, I mean the interFoamPressure tool from Dr. Jasak's OpenFOAM distribution. The tool shortly speaking allows for real pressure calculation.

Using damBreak case, I decided to extend very initial case, from step to step adding/changing/improving some of its properties.
File: domains.png - I only present selected cases (2,4,6) which I did.

http://www2.hawaii.edu/~krystian/Files/domains.png

In every tested case the domain was the same, around 1.2m long and 0.6m height, with initial dam water level equal to 0.292m. I used the RANS solver (rasInterFoam).

I send you a three video files which you might want to take a look.
They are packed in TestCase.zip. All of them were run using serial code.
2-p-rans.mov - empty domain
2-p-rans.mov - domain with structure above the water
2-p-rans.mov - domain with submerged structure

http://www2.hawaii.edu/~krystian/Files/TestCase.zip

Forgive me a strange structure placement in last example but it was suppose to be a rough test and while changing the mesh I didn't have access to viewer.

!----------------------------------------------!
The point is, while the case was modified, as in attached movies, very different and strange results were obtained along the run.

For first two cases one would expect exactly the same or very close pressure results, while this is not the case.

If you take a look you will see at some movie frames a huge 'p' pressure jumps. Also some strange pressure bubbles appear in 'p' field, usually showing up in pairs, very huge positive and negative pressures appear. What is worth mentioning, none of these anomalies appear in 'pd' nor 'gamma' field. Actually regarding to flow shape 'pd' is more alike 'gamma', which is fine.
!----------------------------------------------!

For better reference, I also include one larger example with refined mesh next to the walls and structure, this also includes 'pd' and 'gamma' animation:
Refined.zip

http://www2.hawaii.edu/~krystian/Files/Refined.zip

I would be very grateful if you could provide some comment and input, so our solutions could be verified.

Many very thanks for your time and hope to hear from you soon.

Regards,
Krystian

zoune October 12, 2007 09:55

Wow ! A lot of very interestin
 
Wow ! A lot of very interesting information!
Thank you Eugene and Krystian for your answers. I cannot add a "deep" comment now as I has been given a more urgent job (and I can't view video from my work).
I'll try to understand the code of interFoam and interFoamPressure and see what is that famous compression term. ( I'm quite new to the world of cfd ).
Hope we can understand and solve this problem. Thank you for taking the time to answer.
kind regards,
Benoit

ogloth October 16, 2007 08:42

Hello Benoit, I tried to re
 
Hello Benoit,

I tried to reproduce your problem, but for me the correct pressure distribution is computed by the interFoamPressure tool. The boundary condition for pd should be zero gradient. What is the motivation behind zero gradient for U? Try to set the BC for U to something sensible for walls (slip, or fixed value 0). I have used a fixed value condition and pd is constant in the whole domain, apart from the cells adjacent to the free surface. Here, I guess, the interface compression comes into effect.

Cheers,
Oliver

zoune October 16, 2007 18:39

Ooops ! I thought for a couple
 
Ooops ! I thought for a couple of seconds that I began to be crazy. My condition on U is actually fixedValue 0 0 0. I breathe http://www.cfd-online.com/OpenFOAM_D...part/happy.gif. I made a mistake in my post.
Thank you for your answer Olivier. Could you put the case in a post ? I'm a bit puzzled, as my BC ( not really mine in fact ) seem to be the same than yours. I must have made a mistake, but where ... Who knows ?
I will try to work it out as much as my other task allow me.
Basically, I want to use Openfoam to get an estimation of the pressure exerted on a breakwater by a wave, see if this wave may break or not and maybe have an idea of the transmission / reflection of the structure. Any suggestion of works about that are welcome. thanks
Benoit

christopher October 17, 2007 17:55

Hello Benoit, I'm also a begi
 
Hello Benoit,
I'm also a beginner in OpenFoam, and I have been trying to simulate a wave with interFoam. However, I'm having problems creating the wave, I've tried to move a wall with movingWall BC, but it won't move, and I haven't been able to move the mesh in interFoam, which I think is necessary to move a wall. How did you create the wave?
Many thanks in advance,
Christopher

paka October 17, 2007 18:42

Do any one have any tip regard
 
Do any one have any tip regarding my problems?

I look forward to hear from you.

Krystian

zoune October 18, 2007 04:17

Hello everyone! As I said e
 
Hello everyone!
As I said earlier, I've got work up to my eyes for the moment. I will try to have a closer look when I have some spare time ( I take a week off in one week ).
Krystian, could you please post your cases on the forum ? I saw the videos. What's happening is realy weird indeed. I am just a beginner with interFoam, so don't expect a quick answer ! As Eugene said, this compression term may be responsible for this strange behaviour.
Christopher, I will post the BC I use tonight. It is a slightly modified version of Eugene waves BC, posted in another thread ( search for wave tank in the forum, you should able to find them ). This BC produces the wave velocity and the surface variation according to the linear wave theory. I also made a version of setField which set a monochromatic wave as an initial condition. Problems seem to occur when the wave exits the domain as the outlet reflects partially the wave.

paka October 18, 2007 17:50

Here come all the input files
 
Here come all the input files for Refined example. I hope somebody could help me.
http://www2.hawaii.edu/~krystian/Files/Graded.zip

Later I will check out that thing with compression term, however I think this shouldn't make such a big difference.

Krystian

christopher October 18, 2007 22:05

Hello Benoit, ok, thank you v
 
Hello Benoit,
ok, thank you very much, I'll be expecting your BC. I checked the thread you told me, it was very informative, however I'm having problems downloading the BCs showed there, when I click on the link it takes me to a web page with illegible characters...I have to check whats going on with that.
Thank you very much
best regards
Christopher

paka October 22, 2007 21:30

Probably just right click the
 
Probably just right click the link and make "Save as...".

kev4573 October 25, 2007 12:42

Benoit - The partially relfect
 
Benoit - The partially relfected wave is a problem that is seen in many computational studies; however there are ways to eliminate almost all of the reflection. Look at the paper "Coupling of two absorbing boundary conditions for 2d time-domain simulations of free surface gravity waves" (A. Clement) J. Comp Phys 1996.

paka December 4, 2007 04:40

I've sent this message when bo
 
I've sent this message when board was down, so somehow even if I received confirmation of posting by email, the message did not appear. Here I post it again.
-------------
OK. One more try http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Could anyone provide some input about interFoamPressure tool? I try to
use it, however the output real pressure field 'p' contains very odd
results and in no way relate to modified pressure 'pd' results nor any
other output fileds. Always, at one of the time steps strange pressure
jumps appear or some high/low pressure bubbles along the run, also in
areas where there is no water. Theoretically, nothing like this should
happen.

Based on the Henrik Rusche, Ph.D. thesis <a href="powerlab.fsb.hr/ped/kturbo/OpenFOAM/docs/HenrikRuschePhD2002.pdf">Computational Fluid
Dynamics of Dispersed Two-Phase Flows at High Phase Fractions</a>, page
343, Eq. 4.21, the calculation procedure should be pretty "straight
forward". However, looking specifically into the following part of the
interFoamPressure code (more about tool), there are some more
sophisticated terms, like:

fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) -
fvm::laplacian(muf, U) - (fvc::grad(U) & fvc::grad(muf)) ==
interface.sigmaK()*fvc::grad(gamma) + rho*g );

It seems that those pressures should not only be calculated for case
time directories, but rather the code indicates they should be
calculate for each following adjustable time step. Is my understanding
right?

Any input to "make it work"?

I hope, for someone a little bit familiar with a code, I explained
this in a pretty understandable way.

I look forward to hear from you.

Regards, Krystian

PS. Some update. Recent tests showed that whole mesh domain should be
big enough to not loose any outflowing fluid, particulary, when the
fluid hits the end wall it should not splash out of the domain through
atmosphere boundary condition. However, even after extending domain
vertically, some small pressure bubbles still appear.

zoune February 4, 2008 18:38

Hello everybody, and sorry for
 
Hello everybody, and sorry for my not being there for quite a long time. As I told you, my job led me elsewhere and I was quite busy with other task. Actually, I went throught a lot of litterature about waves. I will try ... I say try!, to have a closer look to what's happening with the knowledge I gained on that subject. For this week, unfortunately, I'm still busy with dredging calcs.

zoune February 4, 2008 18:42

By the by, thank you Kevin for
 
By the by, thank you Kevin for your piece of information !


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