CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Monitoring Volume Average of Liquid Velocity Magnitude in a Bubble Column / Airlift

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2013, 11:52
Default Monitoring Volume Average of Liquid Velocity Magnitude in a Bubble Column / Airlift
  #1
New Member
 
Kevin
Join Date: Mar 2012
Posts: 10
Rep Power: 14
kevinlipps is on a distinguished road
Hi there,

I´m fairly new to openFoam, but I know that there is a swak4foam utility that helps solving some minor problems.

What I want to do is to monitor the Volume Average of a defined region of an airlift reactor over the flow time so I can see when the system reaches quasi steady state.
In Fluent there are the "Monitors" which allow that feature - a textfile containing the flowtime and the volumeaverage of the water velocity magnitude of a defined region/volume is written and appended after each timestep of that transient simulation.

The head region of the airlift reactor is not needed, because here the water velocity changes to much because of bubbles bursting at the water/air interface. Instead it would be enough to patch a region from the bottom/sparger until maybe 10 mm underneath the water level. Then a volume average of the water velocity magnitude of that patch shall be written into a text file along with the current flow time. This allows to be plotted XY. Finally this shows how long a simulation need until a quasi steady state is reached.

I guess its very simple code using swak4foam... I just never haved used it and are also very new to openfoam, so I would be very glad if somebody could give those 10? lines of code along a short tutorial what to do else to the openfoam case to make this work.

Thx in advance
Kevin
kevinlipps is offline   Reply With Quote

Old   February 26, 2013, 19:01
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by kevinlipps View Post
Hi there,

I´m fairly new to openFoam, but I know that there is a swak4foam utility that helps solving some minor problems.

What I want to do is to monitor the Volume Average of a defined region of an airlift reactor over the flow time so I can see when the system reaches quasi steady state.
In Fluent there are the "Monitors" which allow that feature - a textfile containing the flowtime and the volumeaverage of the water velocity magnitude of a defined region/volume is written and appended after each timestep of that transient simulation.

The head region of the airlift reactor is not needed, because here the water velocity changes to much because of bubbles bursting at the water/air interface. Instead it would be enough to patch a region from the bottom/sparger until maybe 10 mm underneath the water level. Then a volume average of the water velocity magnitude of that patch shall be written into a text file along with the current flow time. This allows to be plotted XY. Finally this shows how long a simulation need until a quasi steady state is reached.

I guess its very simple code using swak4foam... I just never haved used it and are also very new to openfoam, so I would be very glad if somebody could give those 10? lines of code along a short tutorial what to do else to the openfoam case to make this work.

Thx in advance
Kevin
It's a bit confusing to me as you're not in the OpenFOAM nomenclature. Especially about "patch" which in OF is a boundary patch.

The general mechanism for such "monitors" in OpenFOAM are functionObjects: small plugin-programs that are executed at the end of each timestep. swak4foam happens to implement some.

So what you want is monitor the velocity magnitude in a subvolume of the mesh. How you do that depends on whether the sub-volume is defined in the mesh by a cellSet or a cellZone. In that case a swak-functionObject like (I'm doing this off the top of my head. There my be typos or involuntary omissions) this could do it:
Code:
waterVel {
   type swakExpression;
   valueType cellSet;
   setName kevinsSet;
   expression "mag(U)*alpha1*vol()/(alpha1*vol())";
   accumulations (
     sum
   );
   verbose true;
}
(I'm not quite sure about your definition of "volume average" in a multiphase problem). If there is no such set, then the trick would be to pick all cells that satisfy a certain criteria an sum those
Code:
waterVel {
   type swakExpression;
   valueType internalField;
   variables (
      "validVol=pos().z<-0.01 ? vol() : 0;"
   );
   expression "mag(U)*alpha1*validVol/(alpha1*validVol)";
   accumulations (
     sum
   );
   verbose true;
}
This assumes that you're only interested in the region with z< -10mm
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   February 27, 2013, 11:26
Default
  #3
New Member
 
Kevin
Join Date: Mar 2012
Posts: 10
Rep Power: 14
kevinlipps is on a distinguished road
Hey there Gschaider. Thx for your swift answer.

By Volume Average I mean the value of the Water Velocity Magnitude of each cell divided by the number of cells in the region of interest which brings me to the expression "patch" I used but what I meant is a defined reagion which is somewhat smaller than the whole computational domain/airlift reactor. (There is a function in Fluent "adapt -> region..." and then you can for example patch air to the headspace for initial condition - thats kinda what I meant. )
kevinlipps is offline   Reply With Quote

Old   March 1, 2013, 06:57
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by kevinlipps View Post
Hey there Gschaider. Thx for your swift answer.

By Volume Average I mean the value of the Water Velocity Magnitude of each cell divided by the number of cells in the region of interest which brings me to the expression "patch" I used but what I meant is a defined reagion which is somewhat smaller than the whole computational domain/airlift reactor. (There is a function in Fluent "adapt -> region..." and then you can for example patch air to the headspace for initial condition - thats kinda what I meant. )
OK. The thing I was refering to was whether you also use the volume fraction of water (you never said which solver you used but I assumed interFoam). So you can remove the alpha1 from the terms I posted
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   May 19, 2016, 06:59
Default
  #5
Member
 
thomas
Join Date: Jul 2014
Posts: 50
Rep Power: 11
thomas. is on a distinguished road
Hi,

do you have any experiences with foamMonitor? Why do you prefer this alternative instead of the foamMonitor one?

Thanks in advance!
thomas. 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
[DesignModeler] Bubble column / Airlift Reactor with separate headspace kevinlipps ANSYS Meshing & Geometry 1 March 21, 2012 08:56
velocity of air Robert Main CFD Forum 4 January 22, 2007 19:42
Query on VOF for Bubble rise Vamsi Main CFD Forum 0 December 22, 2005 01:02
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 03:13
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 04:24.