CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem with the pressure field using interFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 10, 2007, 05:16
Default Hello, I'm a beginner in op
  #1
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
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 is offline   Reply With Quote

Old   October 10, 2007, 12:32
Default Ok, pd seems to be the dynamic
  #2
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
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 is offline   Reply With Quote

Old   October 11, 2007, 04:46
Default One step beyond! It appears
  #3
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
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 is offline   Reply With Quote

Old   October 11, 2007, 11:01
Default A quick sum up and some pictur
  #4
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
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 :



I downloaded the application interFoamPressure to compute the total pressure.

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



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



Any explanation is welcome. And if nobody answers ... well ... It will be a small tutorial for beginners ^^
zoune is offline   Reply With Quote

Old   October 11, 2007, 11:31
Default Not sure if it is still the ca
  #5
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
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.
eugene is offline   Reply With Quote

Old   October 11, 2007, 21:22
Default Dear OpenFOAM users, The wh
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
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 is offline   Reply With Quote

Old   October 11, 2007, 21:25
Default Dear OpenFOAM users, The wh
  #7
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
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
paka is offline   Reply With Quote

Old   October 12, 2007, 09:55
Default Wow ! A lot of very interestin
  #8
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
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
zoune is offline   Reply With Quote

Old   October 16, 2007, 08:42
Default Hello Benoit, I tried to re
  #9
Senior Member
 
Oliver Gloth
Join Date: Mar 2009
Location: Todtnau, Germany
Posts: 121
Rep Power: 17
ogloth is on a distinguished road
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
ogloth is offline   Reply With Quote

Old   October 16, 2007, 18:39
Default Ooops ! I thought for a couple
  #10
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
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 . 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
zoune is offline   Reply With Quote

Old   October 17, 2007, 17:55
Default Hello Benoit, I'm also a begi
  #11
New Member
 
Christopher Cooper
Join Date: Mar 2009
Posts: 5
Rep Power: 17
christopher is on a distinguished road
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
christopher is offline   Reply With Quote

Old   October 17, 2007, 18:42
Default Do any one have any tip regard
  #12
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
Do any one have any tip regarding my problems?

I look forward to hear from you.

Krystian
paka is offline   Reply With Quote

Old   October 18, 2007, 04:17
Default Hello everyone! As I said e
  #13
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
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.
zoune is offline   Reply With Quote

Old   October 18, 2007, 17:50
Default Here come all the input files
  #14
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
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
paka is offline   Reply With Quote

Old   October 18, 2007, 22:05
Default Hello Benoit, ok, thank you v
  #15
New Member
 
Christopher Cooper
Join Date: Mar 2009
Posts: 5
Rep Power: 17
christopher is on a distinguished road
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
christopher is offline   Reply With Quote

Old   October 22, 2007, 21:30
Default Probably just right click the
  #16
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
Probably just right click the link and make "Save as...".
paka is offline   Reply With Quote

Old   October 25, 2007, 12:42
Default Benoit - The partially relfect
  #17
Senior Member
 
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17
kev4573 is on a distinguished road
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.
kev4573 is offline   Reply With Quote

Old   December 4, 2007, 04:40
Default I've sent this message when bo
  #18
Senior Member
 
Join Date: Mar 2009
Posts: 225
Rep Power: 18
paka is on a distinguished road
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

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.
paka is offline   Reply With Quote

Old   February 4, 2008, 18:38
Default Hello everybody, and sorry for
  #19
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
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 is offline   Reply With Quote

Old   February 4, 2008, 18:42
Default By the by, thank you Kevin for
  #20
New Member
 
Benoit Legrand
Join Date: Mar 2009
Location: Dorking, Surrey, UK
Posts: 12
Rep Power: 17
zoune is on a distinguished road
By the by, thank you Kevin for your piece of information !
zoune is offline   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
Getting a concentration field around a bubble in InterFoam azman OpenFOAM Running, Solving & CFD 3 June 7, 2022 04:21
How to modify interFoam to keep a constant velocity field thibault_pringuey OpenFOAM 0 January 9, 2009 05:59
Problems calculating field gh with interFoam cricke OpenFOAM Running, Solving & CFD 0 December 10, 2007 07:17
How to get Pressure field from velocity field qunwuhe@hotmail.com Main CFD Forum 4 October 14, 2007 07:38
pressure field problem. michal FLUENT 1 March 18, 2004 14:45


All times are GMT -4. The time now is 11:21.