|
[Sponsors] |
What is "faceMomentum" in twoPhaseEulerFoam in OF 3.0.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 23, 2016, 17:10 |
What is "faceMomentum" in twoPhaseEulerFoam in OF 3.0.0
|
#1 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Hello,
In the very latest openfoam e.g. 3.0.0, the multiphase solver folder has lots of update. In the twoPhaseEulerFoam solver, there are two sets of velocity and pressure source files, i.e. pU and pUf. In twoPhaseEulerFoam.C, they are chosed based on the switch "faceMomentum". I checked the source files for "pUf/UEqns.H" and "pU/UEqns.H". There are some differences, for instance, for the U equation, the time derivative term in pUf/UEqns.H is not considered. Could anybody familar this solver give some explanations about this? This is a little confused. Thank you. |
|
March 4, 2016, 05:57 |
faceMomentum
|
#2 |
New Member
Sankar
Join Date: Oct 2013
Posts: 1
Rep Power: 0 |
It is switch between face-based and cell-based formulation.
Have you seen the seen the comment in git? https://github.com/OpenFOAM/OpenFOAM...777bb10a3e1dda |
|
March 4, 2016, 05:59 |
|
#3 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Dear Sankar,
I also saw that information last week. Thank you so much for your reply. best regards, OFFO |
|
March 7, 2016, 19:54 |
|
#4 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Hi,
In the solver twoPhaseEulerFoam in OF300, we have the following two lines in createFields.H: Code:
volScalarField& alpha1 = phase1; volScalarField& alpha2 = phase2; OFFO |
|
April 19, 2016, 11:34 |
|
#5 |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28 |
The phase model class is derived, among others, from volScalarField. I.e. the phaseModel is a scalar field. Guess which one?
The constructor of phaseModel tells us more: Code:
Foam::phaseModel::phaseModel ( const phaseSystem& fluid, const word& phaseName, const label index ) : volScalarField ( IOobject ( IOobject::groupName("alpha", phaseName), fluid.mesh().time().timeName(), fluid.mesh(), IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), fluid.mesh(), dimensionedScalar("alpha", dimless, 0) ), fluid_(fluid), // and so on ... |
|
April 19, 2016, 16:11 |
|
#6 | |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Quote:
Thank you so much for your. clear now! |
||
January 6, 2017, 05:37 |
|
#7 | |
Senior Member
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18 |
Quote:
Code:
surfaceScalarField alphaRhof10 ( "alphaRhof10", fvc::interpolate ( max(alpha1.oldTime(), phase1.residualAlpha()) *rho1.oldTime() ) ); surfaceScalarField alphaRhof20 ( "alphaRhof20", fvc::interpolate ( max(alpha2.oldTime(), phase2.residualAlpha()) *rho2.oldTime() ) ); Code:
surfaceScalarField rAUf1 ( IOobject::groupName("rAUf", phase1.name()), 1.0 /( (alphaRhof10 + Vmf)/runTime.deltaT() + fvc::interpolate(U1Eqn.A()) + Kdf ) ); surfaceScalarField rAUf2 ( IOobject::groupName("rAUf", phase2.name()), 1.0 /( (alphaRhof20 + Vmf)/runTime.deltaT() + fvc::interpolate(U2Eqn.A()) + Kdf ) ); Code:
// Phase-1 predicted flux surfaceScalarField phiHbyA1 ( IOobject::groupName("phiHbyA", phase1.name()), phi1 ); phiHbyA1 = rAUf1 *( (alphaRhof10 + Vmf) *MRF.absolute(phi1.oldTime())/runTime.deltaT() + fvc::flux(U1Eqn.H()) + Vmf*ddtPhi2 + Kdf*MRF.absolute(phi2) - Ff1() ); // Phase-2 predicted flux surfaceScalarField phiHbyA2 ( IOobject::groupName("phiHbyA", phase2.name()), phi2 ); phiHbyA2 = rAUf2 *( (alphaRhof20 + Vmf) *MRF.absolute(phi2.oldTime())/runTime.deltaT() + fvc::flux(U2Eqn.H()) + Vmf*ddtPhi1 + Kdf*MRF.absolute(phi1) - Ff2() ); (rho^n*alpha^n*U^(n+1) - rho^n*alpha^n*U^n)/dT The first (implicit) term of the time derivative goes to rAUf and the second (explicit) one to phiHByA. This works for Euler forward, Euler backward and may be for CrankNicolson, but not for Euler backward second order (backward). Here you see the experimental status of the solver and the option in fvSchemes is not recognized by the solver. If somebody argue this terms exists in a similar fashion also in the cellCentered version, than it might be right, but there are tiny but important differences Code:
volScalarField rAU1 ( IOobject::groupName("rAU", phase1.name()), 1.0 /( U1Eqn.A() + max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1/runTime.deltaT() ) ); volScalarField rAU2 ( IOobject::groupName("rAU", phase2.name()), 1.0 /( U2Eqn.A() + max(phase2.residualAlpha() - alpha2, scalar(0)) *rho2/runTime.deltaT() ) ); Code:
volVectorField HbyA1 ( IOobject::groupName("HbyA", phase1.name()), U1 ); HbyA1 = rAU1 *( U1Eqn.H() + max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1*U1.oldTime()/runTime.deltaT() ); volVectorField HbyA2 ( IOobject::groupName("HbyA", phase2.name()), U2 ); HbyA2 = rAU2 *( U2Eqn.H() + max(phase2.residualAlpha() - alpha2, scalar(0)) *rho2*U2.oldTime()/runTime.deltaT() ); Best regards Fabian |
||
April 27, 2017, 12:14 |
|
#8 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Hello,
Thank you so much for your reply. In EEqns.H of reactingTwoPhaseEulerFoam solver, we have the following to update the thermodynamic properties: Code:
fluid.correctThermo(); Code:
void Foam::phaseSystem::correctThermo() { forAll(phaseModels_, phasei) { phaseModels_[phasei].correctThermo(); } } Code:
//- Phase models phaseModelList phaseModels_; I am using OpenFOAM 3.0.1. best regards, OFFO |
|
May 11, 2017, 07:27 |
|
#9 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
For record:
Code:
template<class BasePhaseModel> void Foam::MultiComponentPhaseModel<BasePhaseModel>::correctThermo() { volScalarField Yt ( IOobject ( IOobject::groupName("Yt", this->name()), this->fluid().mesh().time().timeName(), this->fluid().mesh() ), this->fluid().mesh(), dimensionedScalar("zero", dimless, 0) ); PtrList<volScalarField>& Yi = Y(); forAll(Yi, i) { if (i != inertIndex_) { Yt += Yi[i]; } } if (inertIndex_ != -1) { Yi[inertIndex_] = scalar(1) - Yt; Yi[inertIndex_].max(0); } else { forAll(Yi, i) { Yi[i] /= Yt; Yi[i].max(0); } } BasePhaseModel::correctThermo(); } |
|
June 21, 2017, 20:06 |
|
#10 |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Hello,
In twoPhaseEulerFoam, I found that if I change "nAlphaCorr" for alpha.* in fvSolution file from 1 to 2 or any values > 1, then the computations crash. For my own case and for the tutorial /twoPhaseEulerFoam/RAS/fluidizedBed, this happens. Did you also have this similar problem? What causes this? Thanks! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suppress twoPhaseEulerFoam energy | AlmostSurelyRob | OpenFOAM Running, Solving & CFD | 33 | September 25, 2018 18:45 |
twoPhaseEulerFoam: Exceeding iterations, residual = NaN | Flyingcircus | OpenFOAM Running, Solving & CFD | 0 | January 2, 2016 14:18 |
OpenFOAM Foundation releases OpenFOAMŪ 3.0.0 | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 1 | November 7, 2015 16:16 |
Is twoPhaseEulerFoam applicable to 3D cases / delivering erroneous results? | ThomasV | OpenFOAM | 0 | November 11, 2013 09:10 |
twoPhaseEulerFoam | freemankofi | OpenFOAM | 0 | May 23, 2011 17:24 |