CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

multiPhaseEulerFoam - velocity decay in channel / impossible to add a momentum source

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

LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2019, 10:11
Default multiPhaseEulerFoam - velocity decay in channel / impossible to add a momentum source
New Member
Join Date: May 2019
Posts: 1
Rep Power: 0
lucb-cfd is on a distinguished road
Hi everyone,

I am trying to model an air/water flow in a channel (the initial field is set with setFields with a chosen water level and cyclic conditions in the flow direction are set with a fixed velocity for each phase), see the joined picture.

I realised that the flow velocity would decrease with time and the only solution I found is to add a momentum source with fvOptions, using a mean velocity field, which I did such as (for the air phase):

type meanVelocityForce;
active yes;

selectionMode all;

fields (U.air);
Ubar (3.66 0 0);
relaxation 1.0;

The problem is that I get a warning after the second time step "Source momentumSource defined for field U.air but never used".
Then I realised that the source term wasn't present in /opt/openfoam6/applications/solvers/multiphase/multiphaseEulerFoam/UEqn.H so I added it like it is implemented in any other solvers:

new fvVectorMatrix
fvm::ddt(alpha, U)
+ fvOptions(U)

However I get an error when compiling "error: 'fvOptions' was not declared in this scope".

I tried to include fvOptions (#include "fvOptions.H") at the beginning of UEqn.H with not results.

Any help will be much appreciated to solve this last error, or any suggestions to avoid this velocity decay along the channel.


PS : I am aware that a former post concerning velocity decay already exists but it does not solve my issue as my periodic conditions should maintain the velocity field constant. (Openfoam - setFields - Creates velocity that does not move and decays in place)
Attached Images
File Type: png channel_periodic.png (29.8 KB, 14 views)

Last edited by lucb-cfd; June 11, 2019 at 11:40. Reason: wrong keyword
lucb-cfd is offline   Reply With Quote


fvoptions, momentum source, multiphaseeulerfoam, velocity decay

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
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 14:14
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 14:59
Mass source, Momentum source theory. diffo FLUENT 4 August 21, 2009 11:26
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24

All times are GMT -4. The time now is 02:12.