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

Why we specify both p and P_rgh in twoPhaseEulerFoam and other concerns

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By rdbisme

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2017, 23:32
Default Why we specify both p and P_rgh in twoPhaseEulerFoam and other concerns
  #1
New Member
 
Mahmoud Shehata
Join Date: Mar 2015
Posts: 13
Rep Power: 11
mshehata85 is on a distinguished road
Hi All,
I am trying to use the twoPhaseEulerFoam solver to simulate particles drift in air. However, I got a little confused about couple of questions:

1- why we need to specify both the p and P_rgh fields? I thought it is because the flow is compressible and it is a sort of implicitly specifying initial rho field. am I right?

2- If so, how to make that solver incompressible? I managed to eliminate the energy equation by modifying the solver itself(commenting out the #include "EEqns.H" lines) as specified in another thread here. Afterwords, I tried to modify the continuous phase equationOfState from perfectGas to constant and specified the rho value. However the simulation crashed after a couple of runs. So, Does any one knows how to make that solver isothermal and incompressible?

3- I tried to use calculated boundary condition of p for all patches and zero gradient to all p_rgh and used the pRefCell & the pRefValue to set the reference pressure. However, after running the simulation, I noticed that the specified value is not maintained in the specified cell. How this could happen?

I appreciate any help in these topics.

Thanks in advance

Mahmoud
mshehata85 is offline   Reply With Quote

Old   February 25, 2017, 13:02
Default
  #2
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by mshehata85 View Post
Hi All,
I am trying to use the twoPhaseEulerFoam solver to simulate particles drift in air. However, I got a little confused about couple of questions:

1- why we need to specify both the p and P_rgh fields? I thought it is because the flow is compressible and it is a sort of implicitly specifying initial rho field. am I right?

2- If so, how to make that solver incompressible? I managed to eliminate the energy equation by modifying the solver itself(commenting out the #include "EEqns.H" lines) as specified in another thread here. Afterwords, I tried to modify the continuous phase equationOfState from perfectGas to constant and specified the rho value. However the simulation crashed after a couple of runs. So, Does any one knows how to make that solver isothermal and incompressible?

3- I tried to use calculated boundary condition of p for all patches and zero gradient to all p_rgh and used the pRefCell & the pRefValue to set the reference pressure. However, after running the simulation, I noticed that the specified value is not maintained in the specified cell. How this could happen?

I appreciate any help in these topics.

Thanks in advance

Mahmoud
I will try to answer to 2) and 3). I'm not an experienced user of the solver so take my comment as a suggestion that could be wrong.

2) In my case what I did to emulate an incompressible was just disabling the solution of energy equation. Check here

3) Emulating what is done in the tutorials what I always did is to set "calculated" for all the p patches, while setting up p_rgh as you would do with pressure in other cases. So for example: zeroGradient for inlet and fixedValue for outlet. For what concerns the pRefValue and pCellValue, it should be used only for the first iteration. In facts if you check in the solver code, you find:

Code:
// createFields.H
[...]
label pRefCell=0;
scalar pRefValue = 0.0;
setRefCell
(
   p,
   p_rgh,
   pimple.dict(),
   pRefCell,
   pRefValue,
)
that is called at the beginning of the solver execution.

For the first question I have to study a bit on that. Hope by the way that this comment could be useful.
mshehata85 and Lennart.H like this.
rdbisme is offline   Reply With Quote

Reply

Tags
incompressible, openfoam, twophaseeulerfoam


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



All times are GMT -4. The time now is 15:57.