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

Two-phase scalar transport

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 22, 2020, 13:45
Default Two-phase scalar transport
  #1
New Member
 
Join Date: Oct 2020
Posts: 1
Rep Power: 0
Dmitiy is on a distinguished road
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();
         }
So the questions are:

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);
before solve() method and where can I find description of it?

Thank you in advance.
Dmitiy is offline   Reply With Quote

Old   March 2, 2021, 20:33
Default
  #2
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 140
Rep Power: 10
randolph is on a distinguished road
limitedPhiAlpha in interFoam is alphaPhiUn
randolph is offline   Reply With Quote

Reply

Tags
interfoam, scalartransport

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Direct numerical simulation of species transport equation with phase change Pmaroul Main CFD Forum 2 October 12, 2018 16:02
dieselFoam problem!! trying to introduce a new heat transfer model vivek070176 OpenFOAM Programming & Development 10 December 23, 2014 23:48
Scalar Transport - multiphaseEulerFoam dschmidt OpenFOAM Programming & Development 2 July 11, 2014 03:49
Solving N (Non-Coupled) Scalar Transport Equations joel.lehikoinen OpenFOAM Programming & Development 9 October 3, 2013 08:00
how to make a scalar transport equation to be conserved? immortality OpenFOAM Programming & Development 3 May 5, 2013 08:11


All times are GMT -4. The time now is 16:21.