
[Sponsors] 
April 11, 2016, 07:27 
reactingFoam without reaction

#1 
Member
Adrien ORSINI
Join Date: Mar 2016
Location: France
Posts: 85
Rep Power: 2 
Hi foamers,
I'm running reactingFoam without reaction in order to simulate a flow of CH4 into another flow of air (N2+02). The thing is, when I run the solver, "rho" isn't solved. I've post a photo of two successive iteration of what I get on terminal. As you can see, rho doesn't seems to be resolved because without any iteration. FIRST: Does it means that reactingFoam isn't a compressible solver (but I can't believe it because of the purpose of this solver...) SECOND: Does it mean that my set up isn't okay ? Here is my file fvSolution Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.2   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "rho.*" { solver diagonal; } p { solver PCG; preconditioner DIC; tolerance 1e6; relTol 0.1; } pFinal { $p; tolerance 1e6; relTol 0.0; } "(Uhkepsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e6; relTol 0.1; } "(Uhkepsilon)Final" { $U; relTol 0; } Yi { $hFinal; } } PIMPLE { momentumPredictor no; nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 2; } // ************************************************************************* // Should I use the solver rhoPimpleFoam instead of PimpleFoam ? 

April 11, 2016, 09:10 

#2 
Member
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 37
Rep Power: 3 
That's no problem. The reason is
Code:
"rho.*" { solver diagonal; } Code:
fvScalarMatrix rhoEqn ( fvm::ddt(rho) + fvc::div(phi) == fvOptions(rho) );
__________________
Blog: http://blog.sina.com.cn/multiphyzks RG:https://www.researchgate.net/profile/Yan_Wang154 

April 11, 2016, 09:24 

#3 
Member
Adrien ORSINI
Join Date: Mar 2016
Location: France
Posts: 85
Rep Power: 2 
Thank you for your reply Wayne14, but in fact, I don't see what's ok (or not).
Do you wanna mean that the solver "diagonal" isn't good for a scalar wich appeared in equation "on time" like this fvm::ddt(rho) Could you explain to me more precisely ? Thank you for your time again Wayne14, Adrien 

April 11, 2016, 10:19 

#4 
Member
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 37
Rep Power: 3 
Hi Adrien,
When you solve Ax=b, if A is a diagonal matrix, then you would not need any iteration to solve for x. fvm::ddt(x) + fvc:: anything gives exactly a diagonal matrix. So it is correct. Yan
__________________
Blog: http://blog.sina.com.cn/multiphyzks RG:https://www.researchgate.net/profile/Yan_Wang154 

April 11, 2016, 11:26 

#5 
Member
Adrien ORSINI
Join Date: Mar 2016
Location: France
Posts: 85
Rep Power: 2 
Aaaa ok (I feel stupid ) ! Thank you for this explanation.
But... in fact, I tried before to run my case (I mean a quite easier but quit closed case) with rhoPimpleFoam in order to "approach" a compressible solver. And with rhoPimpleFoam I had some iterations on rho. It means that physical equations involved with those two solvers (rhopimplefoam & reactingfoam but without reaction) are not the same ? And as a result, does it means that reactingFoam isn't fitting well for my case (with wrong hypothesis)... ? Any hints/clue would be very welcomed, Thank you Adrien 

June 2, 2016, 11:29 

#6  
New Member
Mr.liu
Join Date: Sep 2012
Posts: 22
Rep Power: 5 
Quote:
First i added this code in the CreatField.H, volScalarField Rrate ( IOobject ( "Rrate", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("Rrate", dimMass/dimVolume/dimTime, 0.0) ); Then, i added this code in YEqn, forAll(Y, i) { if (Y[i].name() != "CH4") RR = reaction>R(Yi); } After wmake, it shows YEqn.H:26:14: error: no match for ‘operator=’ (operand types are ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ and ‘Foam::tmp<Foam::fvMatrix<double> >’) Rrate = reaction>R(Yi); Can you tell me how to do that? Thank you very much. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to switch off combustion and reaction in reactingFoam  shenzhou1987  OpenFOAM Running, Solving & CFD  12  June 20, 2016 07:23 
PaSR + infinite reaction rate in reactingFoam > no reactions occurring  tatu  OpenFOAM Running, Solving & CFD  1  November 21, 2012 06:02 
Not tracking the products of a reactingFoam reaction  Cyberholmes  OpenFOAM  0  August 8, 2011 15:14 
Segmentation fault in running alternateSteadyReactingFoam,why?  NewKid  OpenFOAM  18  January 20, 2011 17:55 
chemical reaction  decompostition  La S. Hyuck  CFX  1  May 23, 2001 00:07 