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

alpha in twoPhaseEulerFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 4, 2016, 12:37
Default
  #21
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Hi All,

I read the pEqn.H in twoPhaseEulerFoam and have some questions. The openFOAM version is 3.0.0.

https://github.com/OpenFOAM/OpenFOAM...Foam/pU/pEqn.H

1, in lines 132 and 141, there are the following source code lines:

Code:
- alphaf2*fvc::interpolate(rho1 - rho2)*(g & mesh.Sf())
Code:
- alphaf1*fvc::interpolate(rho2 - rho1)*(g & mesh.Sf())
What do the above lines mean physically?

2, the pressure "diffusivity" is constructed in line 215, this can be understood since finally the pressure equation has the term of \nabla (\Gamma \nabla p). \Gamma is the "diffusivity", and is predicted with

Code:
mag(alphaf1*alpharAUf1 + alphaf2*alpharAUf2)
If I am not making a mistake, the pressure "diffusivity" should be: alpha_1/(rho_1*A_1) + alpha_2/(rho_2*A_2). Here A_1 and A2 are the diagonal part of the coefficient matrices from momentum equations. alphaf1 and alphaf2 are computed at the very beginnig of pEqn.h file, while alpharAUf1 and alpharAUf1 are coputed by lines25-32. This equation is not consistent with the above code, is it?

3, Could anybody give some hints about what is the following lines doing? What does pEqnComp1 stand for?

Code:
        pEqnComp1 =
            (
                contErr1
              - fvc::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), rho1)
            )/rho1
          + (alpha1*psi1/rho1)*correction(fvm::ddt(p_rgh));
4, I found the governing equation of pressure is solved starting by the following:
Code:
        solve
        (
            pEqnComp1() + pEqnComp2() + pEqnIncomp,
            mesh.solver(p_rgh.select(pimple.finalInnerIter()))
        );
However, the above lines are within the while loop:

Code:
while (pimple.correctNonOrthogonal())
{....

}
So if in the system/fvSolution, we set nNonOrthogonalCorrectors 0;. Does it mean actually the lines within the while loop and therefore solving the pressure will not be executed?

Thank you so much for your help.

OFFO
openfoammaofnepo is offline   Reply With Quote

Old   August 17, 2016, 07:30
Default
  #22
New Member
 
Nicoḷ Scapin
Join Date: Apr 2016
Posts: 15
Rep Power: 10
nic92 is on a distinguished road
Any answer? I have similar doubts.
Thanks in advance.
nic92 is offline   Reply With Quote

Old   September 6, 2016, 05:50
Default
  #23
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Gerhard,

In the twoPhaseEulerFoam, do you have experience to include the radiation model for both phases or for the primary phase? I am considering the possibility of this and need to decide how to proceed. If you have some comments about it, I would really appreciate it.

Thank you so much.
openfoammaofnepo is offline   Reply With Quote

Old   May 11, 2017, 06:37
Default
  #24
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
I am using reactingTwoPhaseEulerFoam for simulating particle-laden gas flows with chemical reaction. The Openfoam version is 3.0.1. In this solver, the UEqn, heEqn and YiEqn are written in source files for phaseModel, i.e.

UEqn ---> MovingPhaseModel.C
YiEqn ---> MultiComponentPhaseModel.C
heEqn ---> AnisothermalPhaseModel.C

So when the solver is running, these functions will be called, and then momentum, energy and species mass fraction equations are constructed. In the /phaseModel, there are many classes for phaseModel, however, each model is inherited from BasePhaseModel in a public way. So, what are the relations between these classes for phaseModel in the folder /phaseModel? They are completely parallel, or they are inherited from some others in this folder? Not clear for me now. Anybody knows?

Thanks.
openfoammaofnepo is offline   Reply With Quote

Old   July 18, 2017, 15:42
Default
  #25
Member
 
Hooman
Join Date: Apr 2011
Posts: 35
Rep Power: 15
hooman.4028 is on a distinguished road
Quote:
Originally Posted by GerhardHolzinger View Post
You find an answer to your question by playing around.
There is a tutorial case of twoPhaseEulerFoam, named injection, which uses the fvOption framework.

If you run the tutorial as is, then the solver tells you about the active fvOptions models. See the relevant lines of solver output below.

Code:
No MRF models present

Creating finite volume options from "constant/fvOptions"

Selecting finite volume options model type scalarSemiImplicitSource
    Source: massSource1
    - selecting cells using points
    - selected 1 cell(s) with volume 8e-06
Selecting finite volume options model type vectorSemiImplicitSource
    Source: momentumSource1
    - selecting cells using points
    - selected 1 cell(s) with volume 8e-06
Selecting finite volume options model type scalarSemiImplicitSource
    Source: energySource1
    - selecting cells using points
    - selected 1 cell(s) with volume 8e-06
Courant Number mean: 0 max: 0
Max Ur Courant Number = 0
Calculating field DDtU1 and DDtU2


Starting time loop
Then, I renamed the file fvOptions, any name other than fvOptions does the trick. With a non-present fvOptions file, the solver output looked like this:

Code:
No MRF models present

No finite volume options present

Courant Number mean: 0 max: 0
Max Ur Courant Number = 0
Calculating field DDtU1 and DDtU2


Starting time loop
Hello Gerhard,

Thank you for the tutorial. I had a question, what are phasePressureCoeffs? I have been through so many different documents but no luck yet. For example, if the g0 is found via SinclairJackson, then what is the point of defining a new constant for it? The default is 1000. How do we calculate this?

Thank you,
hooman.4028 is offline   Reply With Quote

Old   June 6, 2019, 08:43
Lightbulb
  #26
New Member
 
Siqi Ma
Join Date: May 2019
Location: Germany
Posts: 4
Rep Power: 6
masimasiqi is on a distinguished road
Quote:
Originally Posted by openfoammaofnepo View Post
Hi,

In twoPhaseEulerFoam, is it possible to print out the residual and number of the iterations for the momentum equations as well? In stead of just say: 'Constructing momentum equations'. Since I should know the residuals of solving the momentum equations. In the current solver of twoPhaseEulerFoam, we can get as follows:

==========
PIMPLE: iteration 1
MULES: Solving for alpha.particles
MULES: Solving for alpha.particles
alpha.particles volume fraction = 0 Min(alpha.particles) = 0 Max(alpha.particles) = 2.4e-05
Constructing momentum equations
min T.particles 300
min T.air 300
GAMG: Solving for p_rgh, Initial residual = 1, Final residual = 6.98034e-09, No Iterations 22
==========

Thank you so much.

Heyyy, I have the same questions about the residuals of momentum equation. Have you get the residuals and iterations of alpha or velocity?



It seems that the momentum equation is not solved... only used as a Momentumpredictor before PIMPLE loop to deal with pressure and velocity coupling...



thanks a lot
masimasiqi is offline   Reply With Quote

Old   July 21, 2020, 09:32
Question
  #27
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
Hi guys, I have a question that after I changed the twophasesystem.C and compiled it, as the Make/files like "LIB = $(FOAM_USER_LIBBIN)/libmycompressibleTwoPhaseSystem". I include this code in system/controDict. However, the solver neglected it and still used the original twophasesystem.C. If I Make/files like "LIB = $(FOAM_LIBBIN)/libcompressibleTwoPhaseSystem", it surely works. I need to make it into user's library. Do you have any suggestion? Thanks a lot.
qi.yang@polimi.it is offline   Reply With Quote

Old   May 2, 2022, 03:00
Default
  #28
Member
 
Huan Zhang
Join Date: Nov 2020
Posts: 55
Rep Power: 5
Jasper Z is on a distinguished road
Dear openfoammaofnepo,

Hope all is well! I know this thread is long time ago, but I am also confused with the pressure "diffusivity" in twoPhaseEulerFoam. It should be exactly what you wrote: alpha_1/(rho_1*A_1) + alpha_2/(rho_2*A_2), but the code reads, mag(alphaf1*alpharAUf1 + alphaf2*alpharAUf2), where alpharAUf1 is defined as alpha1f*A_1, which is not consistent with the equation, have you managed this question?

Kind regards,
Jasper
Jasper Z is offline   Reply With Quote

Old   March 30, 2024, 18:21
Default
  #29
New Member
 
Oscar Zagal
Join Date: Jan 2024
Posts: 10
Rep Power: 2
oscar_zagal is on a distinguished road
Hi dear all

I saw that knowing the entire code of this solver is very difficult, my question is: why don't the creators of the solver post a description of the goberning equations and other stuff like the pressure diffusivity?

I know that OpenFOAM is free, but at least a brief description would be very nice.
oscar_zagal 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
TwoPhaseEulerFoam high courant number mwaqas OpenFOAM Running, Solving & CFD 11 July 11, 2017 14:19
twoPhaseEulerFoam fvOptions for alpha lavdwall OpenFOAM Running, Solving & CFD 8 October 19, 2015 09:57
TwoPhaseEulerFoam alpha "ripples" MichaelB88 OpenFOAM Running, Solving & CFD 1 July 9, 2015 04:20
twoPhaseEulerFoam BC calculated from wall shear and alpha potac OpenFOAM Running, Solving & CFD 0 October 6, 2014 08:08
about bounded alpha equation for bubbleFoam and twoPhaseEulerFoam kaifu OpenFOAM 2 May 6, 2011 05:33


All times are GMT -4. The time now is 01:07.