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

alphaEqn.H in compressibleTwoPhaseEulerFoam OpenFoam 2.2

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2014, 10:49
Default alphaEqn.H in compressibleTwoPhaseEulerFoam OpenFoam 2.2
  #1
New Member
 
simone colucci
Join Date: May 2014
Location: Pisa (Italy)
Posts: 4
Rep Power: 12
simone1981 is on a distinguished road
Hi,
I'm working with compressibleTwoPhaseEulerFoam, I have a few questions about the continuity equation in alphaEqn.H. Consider the continuity equation as written, for example, in the thesis of Ghione 'Development and validation of a two phase CFD model using OpenFoam', eq. 2.11.

- In alphaEqn.H the are two source terms Sp and Su. Considering the equation in 2.11 I expect someting like :

Sp + Su = -alpha1 div(U) + alpha2 alpha1[1/rho1 Drho1/dt + 1/rho2 Drho2/dt]

In alphaEqn.H Sp and Su are written as a function of dgdt, where in CreateFields.H

volScalarField dgdt
(
pos(alpha2)*fvc::div(phi)/max(alpha2, scalar(0.0001))
);

while in PEqn.H

dgdt =
(
pos(alpha2)*(pEqnComp2 & p)/rho2
- pos(alpha1)*(pEqnComp1 & p)/rho1
);

If I combine Sp+Su, in the first case I obtaine (this should be the case at the first call inside the pimple loop!):

alpha1 div(U) + div(U)

1) What does it mean? In the continuity equation I do not see this term.

in the second case, if I consider the formulation commented in alphaEqn. H ('Legacy semi-implicit and potentially unbounded...')

// Legacy semi-implicit and potentially unbounded form
fvScalarMatrix alpha1Eqn
(
fvm::ddt(alpha1)
+ fvm::div(phic, alpha1, alphaScheme)
+ fvm::div
(
-fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
==
fvm::Sp(Sp, alpha1) + Su
);


and I do not consider & p in dgdt, I obtain the term

-alpha1 div(U) + alpha2 alpha1[1/rho1 Drho1/dt + 1/rho2 Drho2/dt]

that fits with the equation 2.11.

2) Why & p in dgdt? Is it the inner product, right? Considering 2.11 I do not need this product.

3) How does the uncommented formulation work? I do not see something like Sp(Sp, alpha1) + Su, but only Sp + Su.

Thank you in advance

Simone
simone1981 is offline   Reply With Quote

Old   April 29, 2015, 06:28
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Ciao simone!

Point 2 is because that pEqnComp1 is defined as tmp<fvScalarMatrix>, u can use pEqnComp1 to call matrix, also u can use pEqnComp1 & p to call some real value.

I mean we define U matrix like this:

Code:
fvVectorMatrix UEqn
        (
            fvm::ddt(U)
          + fvm::div(phi, U)
          - fvm::laplacian(nu, U)
        );
If we use UEqn & U, we will have the value of U instead of matrix.

This is my thought I'm not sure. lol

Best,
sharonyue 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
timeVaryingMappedFixedValue with OpenFOAM 2.2 hfs OpenFOAM Pre-Processing 6 May 22, 2014 04:48
OpenFOAM Install problem masb OpenFOAM 3 May 25, 2009 12:32
Summer School on Numerical Modelling and OpenFOAM hjasak OpenFOAM 5 October 12, 2008 14:14
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 22:07


All times are GMT -4. The time now is 06:09.