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

fvOptions for meanVelocityForce

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

Like Tree1Likes
  • 1 Post By mostanad

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2020, 21:41
Default fvOptions for meanVelocityForce
  #1
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
Hi all,
I am using the meanVelocityForce option through fvOptions in order to constrain the volumetric flow rate in a three-dimensional periodic box. So I am using the following setting my fvOptions file:
Code:
momentumSource
{
    type            meanVelocityForce;
    active          yes;
 
    meanVelocityForceCoeffs
    {
        selectionMode   all;
 
        fields          (U);
        Ubar            (0.000001 0.000001 0.000001);
        relaxation      1.0;
    }
}
As you see, I have used a very small value for the desired Ubar since the meanVelocityForce.C cannot detect the flow direction vector by setting zero value. Now I have two questions in this regard:
1- Is it possible to implement the desired Ubar by fvOptions three times instead of just one time? I mean I want to split my Ubar=(0.000001 0.000001 0.000001) to (0.000001 0 0), (0 0.000001 0), and (0 0 0.000001). I want to do so since when I confine the z velocity for a box with PBC in z direction, the result is reasonable. It seems that the
meanVelocityForce has some problem with the velocity directions other than the principal Cartesian coordinates.

2- When I am using meanVelocityForce with "selectionMode all", the mean velocity in the entire domain would be equal to the the desired value? Am I right?
Thank you in advance.
Mo
mostanad is offline   Reply With Quote

Old   May 11, 2020, 18:10
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Hi,

>> meanVelocityForce.C cannot detect the flow direction vector by setting zero value.

- Could you please elaborate what you meant here? I couldn't follow you well.
- And also the first item please?
- Second item, with `selectionMode=all` you select the entire computational domain, and the settings should lead to the bulk velocity to the input value for the whole domain.
HPE is offline   Reply With Quote

Old   May 11, 2020, 19:53
Default
  #3
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
Quote:
Hi,

>> meanVelocityForce.C cannot detect the flow direction vector by setting zero value.

- Could you please elaborate what you meant here? I couldn't follow you well.
Hi,
Thank you HPE for your response. As you can see in meanVelocityForce.C and its line 92:

Code:
flowDir_(Ubar_/mag(Ubar_)),
if I put Ubar equal to a zero vector in fvOptions, it fails to find the Ubar velocity direction. Indeed, the code is trying to correct the velocity and to put a source term into the NSE by this direction.

Quote:
- And also the first item please?
I have two cases which aim to have zero volumetric flow rate. The first one is a box with PBC just in z-direction and wall BC in the other ones, which I don't have any problem when I put Ubar=(0 0 0.000001) in the fvOptions file. I put a small value since I am not able to put the zero value (due to the flow direction) and also imposing the pressure gradient in this direction for obtaining a very small volumetric flow rate.
On the other hand, I have another case with PBC in all directions. So when I set Ubar=(0.000001 0.000001 0.000001), the result is not what I expect. However, Ubar=(0 0 0.000001) can work very well for this case.
So do you think Ubar=(0 0 0.000001) is still suitable for the case with PBC in all directions and zero volumetric flow rate in the box? I think you should be familiar enough with meanVelocityForce.C to understand my problem.

Quote:
- Second item, with `selectionMode=all` you select the entire computational domain, and the settings should lead to the bulk velocity to the input value for the whole domain.
Do you mean using all option for selectionMode applies the force term in the entire domain?
Thank you for your help.
lpz456 likes this.

Last edited by mostanad; May 11, 2020 at 21:44.
mostanad is offline   Reply With Quote

Old   May 12, 2020, 18:38
Red face
  #4
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
No reply???
mostanad is offline   Reply With Quote

Old   May 13, 2020, 16:06
Default
  #5
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Hi,

- The issue I didn't understand is that why do you want to have zero volumetric flow rate for the bulk velocity? This should indicate to be no flow by using the meanVelocityForce. Then what is the driving force of the flow? I am just confused.
- `selection=all` applies the relevant fvOptions to the entire computational domain.

Hope it helps.
HPE is offline   Reply With Quote

Old   May 13, 2020, 18:29
Default
  #6
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

- The issue I didn't understand is that why do you want to have zero volumetric flow rate for the bulk velocity? This should indicate to be no flow by using the meanVelocityForce. Then what is the driving force of the flow? I am just confused.

Hope it helps.
The problem is related to the settling of a particle in an unbounded box. The driving force is gravity, so the particle is falling down. Due to the unbounded box, the net volumetric flow rate should be zero to mimic that condition.
mostanad is offline   Reply With Quote

Reply

Tags
fvoptions

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
fvOptions limitTemperature crashing in compressibleInterFoam JM27 OpenFOAM Running, Solving & CFD 38 November 29, 2023 03:55
Can I use fvOptions to couple a solid region and a fluid region? titanchao OpenFOAM Running, Solving & CFD 4 January 14, 2022 07:55
Configuration of boundary conditions and fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 16 May 3, 2019 16:35
topoSet/setSet and fvOptions pod OpenFOAM Running, Solving & CFD 5 April 30, 2019 05:41
Power and Enthalpy in fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 1 April 26, 2019 10:03


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