|
[Sponsors] |
August 7, 2012, 18:17 |
MULES with source terms and multiple phases
|
#1 |
New Member
Tyler V
Join Date: Jul 2012
Posts: 24
Rep Power: 14 |
Hello,
I have a question for any of the MULES experts out there. I am attempting to add source terms to multiphaseInterFoam and am running into trouble maintaining boundedness. I have added the source term for each phase to both the limiter for that phase (MULES::limit) and the solver for that phase (MULES::explicitSolve) but the solution still slowly becomes unbounded when the source terms are non-negligible. Odder still, increasing nAlphaSubCycles only makes it become unbounded sooner. Does anyone know what could cause MULES to stop producing bounded results? It seems like the limiter algorithm called on phase A isn't being influenced enough by the source in phase B, for example, but I'm not sure how that could be fixed. Thanks! |
|
December 11, 2013, 10:04 |
|
#2 |
Member
Hrushi
Join Date: Jan 2013
Posts: 58
Rep Power: 13 |
Hi Tyler,
Did you find solution to your problem? Thanks and regards, Hrushi |
|
December 11, 2013, 11:17 |
Unfortunately, no
|
#3 |
New Member
Tyler V
Join Date: Jul 2012
Posts: 24
Rep Power: 14 |
Hrushi,
I never did find a solution to this, so I ended up restructuring my code to use only two phases (liquid and gas) and differentiate between components using species mass fraction instead. With only two phases it's easier to maintain boundedness and the MULES multiphase limiter gets really expensive with more phases anyway. -Tyler |
|
December 11, 2013, 11:25 |
|
#4 |
Member
Hrushi
Join Date: Jan 2013
Posts: 58
Rep Power: 13 |
Thank you for a quick response, Tyler.
I am facing a similar issue with two phase simulations. Is it possible to post your implementation of source for two phases for me to compare? Thanks and regards, Hrushi |
|
December 11, 2013, 11:35 |
|
#5 |
New Member
Tyler V
Join Date: Jul 2012
Posts: 24
Rep Power: 14 |
With only two phases, there are several solvers that do this already. Take a look at the alphaEqn.H files in compressibleInterFoam and interPhaseChangeFoam for examples. If you have severe boundedness issues, the implicit solver used in interPhaseChangeFoam may help.
-Tyler |
|
December 11, 2013, 11:52 |
|
#6 |
Member
Hrushi
Join Date: Jan 2013
Posts: 58
Rep Power: 13 |
Thanks Tyler. Will look them up.
- Hrushi |
|
December 13, 2013, 08:43 |
|
#7 |
New Member
Tommy V
Join Date: Nov 2013
Posts: 29
Rep Power: 13 |
Hi foamers!
Tyler, which OpenFoam release are you using? I had similar problems for multiphase flow (twoLiquidMixingFoam and interMixingFoam) in OpenFoam 2.0. I have try hundreds different numerical schemes to limit the field, but problems were finally suppressed moving from OpenFoam 2.0 to OpenFoam 2.2.0 (more limiters (as lambda) and better structured)). Regards |
|
December 22, 2015, 10:24 |
|
#8 |
New Member
Markus
Join Date: Jul 2014
Posts: 2
Rep Power: 0 |
Dear all,
I am also trying to implement a source term into the phaseEquation of a multiphase solver (multiphaseInterFoam). My goal is to convert one phase e.g. alpha2 ( 3 phases in total: alpha1, alpha2, alpha3) into another phase (e.g. alpha3 with different transportProperties -> liquid into vapour) at certain conditions. The distinction criterion for each phase should be a volScalarField between 0 and 1, where 0 means alpha2 only and 1 alpha3 only respectively. Is this possible using MULES in the solveAlphas() Method in multiphaseMixture.C ? Code:
void Foam::multiphaseMixture::solveAlphas ( const scalar cAlpha ) { static label nSolves=-1; nSolves++; word alphaScheme("div(phi,alpha)"); word alpharScheme("div(phirb,alpha)"); surfaceScalarField phic(mag(phi_/mesh_.magSf())); phic = min(cAlpha*phic, max(phic)); PtrList<surfaceScalarField> phiAlphaCorrs(phases_.size()); int phasei = 0; forAllIter(PtrDictionary<phase>, phases_, iter) { phase& alpha = iter(); phiAlphaCorrs.set ( phasei, new surfaceScalarField ( fvc::flux ( phi_, alpha, alphaScheme ) ) ); surfaceScalarField& phiAlphaCorr = phiAlphaCorrs[phasei]; forAllIter(PtrDictionary<phase>, phases_, iter2) { phase& alpha2 = iter2(); if (&alpha2 == &alpha) continue; surfaceScalarField phir(phic*nHatf(alpha, alpha2)); phiAlphaCorr += fvc::flux ( -fvc::flux(-phir, alpha2, alpharScheme), alpha, alpharScheme ); } MULES::limit ( geometricOneField(), alpha, phi_, phiAlphaCorr, zeroField(), zeroField(), 1, 0, 3, true ); phasei++; } MULES::limitSum(phiAlphaCorrs); rhoPhi_ = dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0); volScalarField sumAlpha ( IOobject ( "sumAlpha", mesh_.time().timeName(), mesh_ ), mesh_, dimensionedScalar("sumAlpha", dimless, 0) ); phasei = 0; forAllIter(PtrDictionary<phase>, phases_, iter) { phase& alpha = iter(); surfaceScalarField& phiAlpha = phiAlphaCorrs[phasei]; phiAlpha += upwind<scalar>(mesh_, phi_).flux(alpha); MULES::explicitSolve ( geometricOneField(), alpha, phiAlpha, zeroField(), zeroField() ); rhoPhi_ += phiAlpha* fvc::interpolate (alpha.rho()); Info<< alpha.name() << " volume fraction, min, max = " << alpha.weightedAverage(mesh_.V()).value() << ' ' << min(alpha).value() << ' ' << max(alpha).value() << endl; sumAlpha += alpha; phasei++; } Info<< "Phase-sum volume fraction, min, max = " << sumAlpha.weightedAverage(mesh_.V()).value() << ' ' << min(sumAlpha).value() << ' ' << max(sumAlpha).value() << endl; calcAlphas(); } Or is there another way to do this ? Thanks and Regards Markus |
|
March 21, 2018, 07:14 |
Solving alpha2
|
#9 | |
New Member
Saicharan
Join Date: Jan 2018
Location: Bangalore, India
Posts: 29
Rep Power: 8 |
Quote:
So if you modified interPhaseChangeFoam to accomodate your source terms in it, did you add an equation to solve alpha2 as well? Because if there are multiple phases present, alpha2 is not equal to (1 - alpha1) as given in the alphaEqn.H file in interPhaseChangeFoam. |
||
Tags |
mules, multiphaseinterfoam, openfoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Source term units in 2D | Chief | FLUENT | 1 | August 23, 2004 13:40 |
Multiple species and UDS source terms | Ale | FLUENT | 2 | September 9, 2002 04:45 |