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

Water-Air simulations

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 23, 2021, 10:46
Default Water-Air simulations
  #1
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Correct me if I'm wrong: in Flow 3d, for open channel simulations, generally simulations consider only one fluid, water. I've rarely seen simulations with two fluids.
Is there a solver in openFoam able to do the same thing, or the only solution, for open channel simulations, is to use interFoam and therefore simulations with two fluids?
Miguel Hernandez is offline   Reply With Quote

Old   August 25, 2021, 12:13
Default
  #2
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
In other words, for open channel simulations, which openFoam solvers can be used? Is there only interFoam?
Miguel Hernandez is offline   Reply With Quote

Old   August 30, 2021, 09:21
Default
  #3
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 366
Rep Power: 8
geth03 is on a distinguished road
interFoam is a solver for a two-fluid system with interface resolution.
so you need fluid properties (densities, kinematic viscosities, and interfacial tension) for both fluids.
geth03 is offline   Reply With Quote

Old   August 31, 2021, 11:01
Default
  #4
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by geth03 View Post
interFoam is a solver for a two-fluid system with interface resolution.
so you need fluid properties (densities, kinematic viscosities, and interfacial tension) for both fluids.
Thank you for your reply. I know that interFoam, being a multiphase solver, needs the characteristics of both fluids (water and air in my case), but my question is another one.
From my experience, I know that many free-flow simulations in Flow3D(the area for which Flow3D is famous) are based on simulations with only one fluid.

I'm asking to the more experienced forum's users if this capability is due to the use of TruVOF or something else.

Also, is there a solver in openFoam that can do the same thing?

Thank you.
Miguel Hernandez is offline   Reply With Quote

Old   September 1, 2021, 01:36
Default
  #5
Senior Member
 
shinji nakagawa
Join Date: Mar 2009
Location: Japan
Posts: 113
Blog Entries: 1
Rep Power: 18
snak is on a distinguished road
There is an interface-tracking dynamic mesh. I'm not sure this fits your needs or not. I have an interest in this function but I have never used...

https://www.openfoam.com/news/main-n...rface-tracking
snak is offline   Reply With Quote

Old   September 1, 2021, 03:25
Default
  #6
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by Miguel Hernandez View Post
Thank you for your reply. I know that interFoam, being a multiphase solver, needs the characteristics of both fluids (water and air in my case), but my question is another one.
From my experience, I know that many free-flow simulations in Flow3D(the area for which Flow3D is famous) are based on simulations with only one fluid.

I'm asking to the more experienced forum's users if this capability is due to the use of TruVOF or something else.

Also, is there a solver in openFoam that can do the same thing?

Thank you.
The solver in flow3d is also two-phase, like interFoam, since it implements VoF! The fact is that flow3d dumbs down much of the input/output, in order to create the feeling you're not solving for air. Perhaps the solver in flow3d does tricks in order to accelerate the solution on water, such as clipping the velocity on the air phase to zero or using a MAC method first in order to get an approximate topology of the water phase and then solve on that region only...
Santiago is offline   Reply With Quote

Old   September 1, 2021, 04:17
Default
  #7
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by Santiago View Post
The solver in flow3d is also two-phase, like interFoam, since it implements VoF! The fact is that flow3d dumbs down much of the input/output, in order to create the feeling you're not solving for air. Perhaps the solver in flow3d does tricks in order to accelerate the solution on water, such as clipping the velocity on the air phase to zero or using a MAC method first in order to get an approximate topology of the water phase and then solve on that region only...

Flow 3D indeed could solve for one phase. For this to happen there has to be a boundary condition to be applied on the free surface. The advantage of this approach is that the velocities from air could be neglected and thus allowing higher time steps.

However this is not the only way to do this, for example the implicit VOF in Wildkatze could have much higher courant numbers without smearing the interface. We do all the time.

For openfoam it is hard to tell.
arjun is offline   Reply With Quote

Old   September 1, 2021, 05:12
Default
  #8
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by arjun View Post
Flow 3D indeed could solve for one phase. For this to happen there has to be a boundary condition to be applied on the free surface.
This is a completely different approach, or "technology" as commercial people like to refer to things, known as Arbitrary Lagrangian-Eulerian (ALE) simulations. OpenFOAM implements such "technology" as well. The DISADVANTAGE of such approach is that you cannot solve "shocks" (read hydraulic jumps), or have to smear them somehow in order to avoid destroying the grid.

Quote:
Originally Posted by arjun View Post
However this is not the only way to do this, for example the implicit VOF in Wildkatze could have much higher courant numbers without smearing the interface. We do all the time.
The fact that one uses time-implicit approaches, and such allow for "arbitrary" Co numbers, doesn't mean that from a theoretical perspective using Co > 1 when in VoF is correct. All free-surface reconstruction methods for FVM/FDM are upwinded: PLIC, MULES, CICSAM, truVoF (CLS-VOF), gVoF, isoAdvector, level-set, etc. That is, the neibouring cells provide 'info' to the cell in question, when reconstructing the free surface. That implies that if you have Co > 1 then this 'info' will 'jump' many cells, producing mass conservation errors.

You can easily implement an implicit VoF In OpenFOAM, a là flow3d, but still the aforementioned problem will exist.
Santiago is offline   Reply With Quote

Old   September 1, 2021, 05:23
Default
  #9
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by Santiago View Post
This is a completely different approach, or "technology" as commercial people like to refer to things, known as Arbitrary Lagrangian-Eulerian (ALE) simulations. OpenFOAM implements such "technology" as well. The DISADVANTAGE of such approach is that you cannot solve "shocks" (read hydraulic jumps), or have to smear them somehow in order to avoid destroying the grid.

Flow 3D people obviously disagree with you here. They have multiple examples of using this. The method is limited but not as much as you are declaring here.


Quote:
Originally Posted by Santiago View Post

That implies that if you have Co > 1 then this 'info' will 'jump' many cells, producing mass conservation errors.

You can easily implement an implicit VoF In OpenFOAM, a là flow3d, but still the aforementioned problem will exist.

Ever heard of validations and benchamarking. We have done that a lot with this implicit appraoch.

As far as mass conversation goes, we have developed methods to keep that in check. We have infact done calculations (on unstructured polyhedral meshes) such a fluel capturing air due to sloshing and match the experimental values. A calculation where mass conservation and numerical errors are of utmost importance because air captured by fuel is quite low.

It all depends on what the method is and how it is implemented.
arjun is offline   Reply With Quote

Old   September 1, 2021, 05:33
Default
  #10
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Here you go one famous benchmark with courant number well above 5. Done on unstrcutured mesh.
Attached Images
File Type: jpg BubbleBenchmarkvof.jpg (166.0 KB, 81 views)
arjun is offline   Reply With Quote

Old   September 1, 2021, 06:06
Default
  #11
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by arjun View Post

Flow 3D people obviously disagree with you here. They have multiple examples of using this. The method is limited but not as much as you are declaring here.
Of course they will.

I will go a step further: being able to resolve "shocks" accurately in ALE implies that you need to re-mesh (using MESQUITE, or other) which defeats the purpose of having a "faster" solver. Then there is the problem of remeshing and boundary layer inflation (you'll have to dispense of the latter), which begs the question: What's more important, resolving wall-bounded turbulence or the jump? A hard choice if you are studying an USBR dissipation bucket...

Unless you implement ALE under DG, this method is only physically relevant, and computationally cheap, for flows that do not undergo shocks, or hydraulic jumps, or breaking waves.

Quote:
Originally Posted by arjun View Post
Ever heard of validations and benchamarking. We have done that a lot with this implicit appraoch.
Yes, I've heard of those and made those. Not a strange notion.

Quote:
Originally Posted by arjun View Post

As far as mass conversation goes, we have developed methods to keep that in check. We have infact done calculations (on unstructured polyhedral meshes) such a fluel capturing air due to sloshing and match the experimental values. A calculation where mass conservation and numerical errors are of utmost importance because air captured by fuel is quite low.
Thanks for proving my point! The fact that you need to keep the mass conservation "in check", for an incompressible flow, using whatever trick you have at your disposal it's already a problem. Whatever trick you use is not going to make your velocities back to solenoidal, WHICH IS THE MATHEMATICAL MEANING OF MASS CONSERVATION in incompressible flows. The implications of this in turbulence (LES, DES) are non-negligible, but one that 99.9999999999% of users seem to not know, and one software vendors (including those in OpenFOAM mind you) don't mention when they promote their "technologies".

We may start arguing about it's importance for "real-life RANS/DES-CFD", and then I'd mention it's a problem of intellectual cleanliness and not of accuracy nor approximation.
Santiago is offline   Reply With Quote

Old   September 1, 2021, 06:24
Default
  #12
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by arjun View Post
Here you go one famous benchmark with courant number well above 5. Done on unstrcutured mesh.
The mass-conservation errors in this case are readily seen! Whoever made this figure was very "sneaky", by putting the grid in YELLOW. Notice the yellow dimple in the lower left corner of the left image, and notice the TWO yellow dimples on the right-hand side image. A bubble rising in water is either FULL WATER or FULL AIR, you dont have dissolution.

On a structured mesh things may go better, and with a smaller Co EVEN BETTER.
Santiago is offline   Reply With Quote

Old   September 1, 2021, 16:07
Default
  #13
Member
 
Francisco T
Join Date: Nov 2011
Location: Melbourne, Australia
Posts: 64
Blog Entries: 1
Rep Power: 14
frantov is on a distinguished road
Quote:
Originally Posted by Miguel Hernandez View Post
for open channel simulations, is to use interFoam and therefore simulations with two fluids?
InterMixingFoam gives you the ability to simulate more than two fluids. Two of then are miscible as far as I understand.
Is that what you mean?
frantov is offline   Reply With Quote

Old   September 2, 2021, 04:11
Default
  #14
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by frantov View Post
InterMixingFoam gives you the ability to simulate more than two fluids. Two of then are miscible as far as I understand.
Is that what you mean?
I am looking for an openFoam solver that allows simulation of open channels with a single fluid, similar to what Flow3d allows...
Miguel Hernandez is offline   Reply With Quote

Old   September 2, 2021, 05:09
Default
  #15
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by Miguel Hernandez View Post
I am looking for an openFoam solver that allows simulation of open channels with a single fluid, similar to what Flow3d allows...
"Single fluid"... You mean, A moving grid, where the free-surface is a boundary condition? Or VoF?
Santiago is offline   Reply With Quote

Old   September 2, 2021, 07:20
Default
  #16
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by Santiago View Post
"Single fluid"... You mean, A moving grid, where the free-surface is a boundary condition? Or VoF?
Flow3D allows simulations with only one fluid (water for example) and uses TruVOF (I'm not an expert but I think it is a modified version of VOF). In this type of simulations the user is not required to provide boundary conditions for the free-surface (nothing prevents the software to consider a boundary condition without showing it to the end user).
I have little experience with openFoam, but from the few projects I've done, I've noticed that interFoam (2 fluids) tends to be more easily unstable than what you get with Flow3D, as well as being much slower computationally. I thought this was due to the fact that interFoam needs to solve the equations for two fluids, hence my question about the existence of an openFoam solver that allow the simulation of open channel considering only one fluid, as Flow3D allows to do.
Miguel Hernandez is offline   Reply With Quote

Old   September 2, 2021, 07:42
Default
  #17
Senior Member
 
shinji nakagawa
Join Date: Mar 2009
Location: Japan
Posts: 113
Blog Entries: 1
Rep Power: 18
snak is on a distinguished road
There is a tutorial case with a liquid filled cavity with free surface. pimpleFoam solver is used. Only one fluid is considered. Free surface moves using an interface-tracking dynamic mesh.


https://develop.openfoam.com/Develop...actAngleCavity
Miguel Hernandez likes this.
snak is offline   Reply With Quote

Old   September 2, 2021, 09:22
Default
  #18
Member
 
Miguel Hernandez
Join Date: Feb 2021
Location: En mi casa
Posts: 56
Rep Power: 5
Miguel Hernandez is on a distinguished road
Quote:
Originally Posted by snak View Post
There is a tutorial case with a liquid filled cavity with free surface. pimpleFoam solver is used. Only one fluid is considered. Free surface moves using an interface-tracking dynamic mesh.


https://develop.openfoam.com/Develop...actAngleCavity
thanks, very interesting...
Miguel Hernandez is offline   Reply With Quote

Old   September 2, 2021, 11:04
Default
  #19
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by Miguel Hernandez View Post
Flow3D allows simulations with only one fluid (water for example) and uses TruVOF (I'm not an expert but I think it is a modified version of VOF). In this type of simulations the user is not required to provide boundary conditions for the free-surface (nothing prevents the software to consider a boundary condition without showing it to the end user).

I have little experience with openFoam, but from the few projects I've done, I've noticed that interFoam (2 fluids) tends to be more easily unstable than what you get with Flow3D, as well as being much slower computationally. I thought this was due to the fact that interFoam needs to solve the equations for two fluids, hence my question about the existence of an openFoam solver that allow the simulation of open channel considering only one fluid, as Flow3D allows to do.
As I said 5 posts above, truVoF is VoF, so it solves for both phases or, at least, the governing equations being solved are written taking in consideration BOTH PHASES. Proof of that is that you make a grid BIGGER than the region that comprises only water.

This distinction IS IMPORTANT because, as you can see, a great deal of confusion can arise if you are not clear on what you want. A single-phase simulation IS NOT THE SAME as a VoF where the air phase IS CLIPPED, or a VoF where the air phase IS NOT CLIPPED. Different algorithms, and somewhat different math, hence the different naming conventions.

The thing you are looking for is **interFoam**, a VoF solver for two-immisible fluids, where you can use turbulence models. This solver is not though to be used for particular set of scenarios, as Flow3D does. Since OpenFOAM is not as foolproof as Flow3D, and IT IS NOT A SUITE OF SOLVERS but A LIBRARY FOR FVM which is full of **example solvers**, such as interFoam, you must be willing to go the extra mile (quite literally) in order to make things work. That sometimes imply you need to program things or, at the very least, dive into the code itself, or get scolded in forums like this one .

If what you want is a SINGLE-PHASE solver with an upper moving boundary representing a free-surface, then you need to use **interTrackFoam** (PISO + ALE). Last time I checked there is no turbulence modelling implemented within. Setting one is not difficult though.

NOTE: interFoam is not that much slower compared to other solvers, when set up correctly. Have in mind that some solvers use pseudo-time integration by default, hence the impression that it "goes" faster. You can use local time stepping also in OpenFOAM.
2538sukham likes this.
Santiago is offline   Reply With Quote

Old   September 3, 2021, 01:53
Default
  #20
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by Santiago View Post

Thanks for proving my point! The fact that you need to keep the mass conservation "in check", for an incompressible flow, using whatever trick you have at your disposal it's already a problem.

You mean like better descretization ie better reconstruction and solving continuity equation is a trick??

No we are not adding or substracting any fluid to maintain the mass conservation if this is what you mean by trick.

If solving equations by descretisation is a problem to you, then there is nothing that could be done because without it there is no solution to the problem.


The scheme that we use is none of what you mentioned. The scheme that i use is something i have designed and the whole thinking about it is very different than the interface tracking that you think of. The method is at its base implicit in nature. This is why it can run on large courants and keep interface sharp.


Edited to add: It occured to me that it is openfoam that actually uses the 'trick'. They have extra term added to VOF equation to keep the interface sharp. Wildkatze does not do even that and there is no such option for user to chose from too.
arjun is offline   Reply With Quote

Reply


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
Water diffusion into air MGabr CFX 19 September 3, 2023 20:06
multiphaseEulerFoam convergence problems Stefanie.S.W. OpenFOAM Running, Solving & CFD 6 August 28, 2019 05:15
Mass Transfer Between AIR and WATER Math13570 CFX 12 June 29, 2016 09:14
3D multiphase micro model: mixing effect of air and water at the T junction ehsanfareed FLUENT 2 March 22, 2015 23:29
I am NOT getting right pressure at the air inlet in water column kcfd FLUENT 2 November 27, 2012 22:36


All times are GMT -4. The time now is 05:20.