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

YEqn.H of reactingFoam solver in Openform

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By THUCT

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 6, 2018, 11:20
Question YEqn.H of reactingFoam solver in Openform
  #1
New Member
 
TaoChen
Join Date: Sep 2018
Posts: 11
Rep Power: 8
THUCT is on a distinguished road
Hello guys!
I am reading the code's of solver reactingFoam in Openfoam. There is some sentences in YEqn.H:
Code:
 
    1 tmp<fv::convectionScheme<scalar>> mvConvection
    2 (
    3     fv::convectionScheme<scalar>::New
    4     (
    5         mesh,
    6         fields,
    7         phi,
    8         mesh.divScheme("div(phi,Yi_h)")
    9     )
   10 );
   11 
   12 {
   13     reaction->correct();
   14     Qdot = reaction->Qdot();
   15     volScalarField Yt(0.0*Y[0]);
   16 
   17     forAll(Y, i)
   18     {
   19         if (i != inertIndex && composition.active(i))
   20         {
   21             volScalarField& Yi = Y[i];
   22 
   23             fvScalarMatrix YiEqn
   24             (
   25                 fvm::ddt(rho, Yi)
   26               + mvConvection->fvmDiv(phi, Yi)
   27               - fvm::laplacian(turbulence->muEff(), Yi)
   28              ==
   29                 reaction->R(Yi)
   30               + fvOptions(rho, Yi)
   31             );
   32 
   33             YiEqn.relax();
   34 
   35             fvOptions.constrain(YiEqn);
   36 
   37             YiEqn.solve(mesh.solver("Yi"));
   38 
   39
   40 
   41             Yi.max(0.0);
   42             Yt += Yi;
   43         }
   44     }
   45 
   46     Y[inertIndex] = scalar(1) - Yt;
   47     Y[inertIndex].max(0.0);
   48 }
I tracked the
Code:
 fvOptions.correct(Yi);
and
Code:
fvOptions.constrain(YiEqn);
It turned to be as following:

Code:
 void Foam::fv::option::correct(volScalarField& field)
{}
and
Code:
 void Foam::fv::option::constrain(fvMatrix<scalar>& eqn, const label fieldi){}
I think it does not make any change in the program.But I do not understand why the programmer put them there. Could anyone clear this confusion?
Best regards!
NuclearLeaf and lumpor like this.
THUCT 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
Hybrid discretisation - blend factor gcoopermax CFX 5 September 23, 2016 09:05
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 01:01
HELP!!! (ReactingFoam) vianne OpenFOAM 3 March 14, 2010 20:17
ReactingFoam solver muthukaalai OpenFOAM Running, Solving & CFD 1 June 16, 2008 14:36
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 15:08


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