|
[Sponsors] |
October 22, 2020, 14:45 |
Two-phase scalar transport
|
#1 |
New Member
Join Date: Oct 2020
Posts: 1
Rep Power: 0 |
Hello everyone.
I'm trying to implement functionality similar to scalarTransport function object directly in interFoam solver in order to be able to correct implemented equations manually in the future. As a starting point I decided to dig into the scalarTransport.C source code. In a part of this file related to two-phase scalar transport one can see: Code:
// Two phase scalar transport if (phaseName_ != "none") { const volScalarField& alpha = mesh_.lookupObject<volScalarField>(phaseName_); const surfaceScalarField& limitedPhiAlpha = mesh_.lookupObject<surfaceScalarField>(phasePhiCompressedName_); D *= pos(alpha - 0.99); // Reset D dimensions consistent with limitedPhiAlpha D.dimensions().reset(limitedPhiAlpha.dimensions()/dimLength); // Solve tmp<surfaceScalarField> tTPhiUD; for (label i = 0; i <= nCorr_; i++) { fvScalarMatrix sEqn ( fvm::ddt(s) + fvm::div(limitedPhiAlpha, s, divScheme) - fvm::laplacian(D, s, laplacianScheme) == alpha*fvOptions_(s) ); sEqn.relax(relaxCoeff); fvOptions_.constrain(sEqn); sEqn.solve(mesh_.solverDict(schemesField_)); tTPhiUD = sEqn.flux(); } 1) Did I understand correctly, that limitedPhiAlpha in case of interFoam solver stays for alphaPhi10 flux? 2) What is the function of Code:
fvOptions_.constrain(sEqn); Thank you in advance. |
|
March 2, 2021, 21:33 |
|
#2 |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
limitedPhiAlpha in interFoam is alphaPhiUn
|
|
Tags |
interfoam, scalartransport |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Direct numerical simulation of species transport equation with phase change | Pmaroul | Main CFD Forum | 2 | October 12, 2018 17:02 |
dieselFoam problem!! trying to introduce a new heat transfer model | vivek070176 | OpenFOAM Programming & Development | 10 | December 24, 2014 00:48 |
Scalar Transport - multiphaseEulerFoam | dschmidt | OpenFOAM Programming & Development | 2 | July 11, 2014 04:49 |
Solving N (Non-Coupled) Scalar Transport Equations | joel.lehikoinen | OpenFOAM Programming & Development | 9 | October 3, 2013 09:00 |
how to make a scalar transport equation to be conserved? | immortality | OpenFOAM Programming & Development | 3 | May 5, 2013 09:11 |