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

reactingFoam without reaction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2016, 07:27
Default reactingFoam without reaction
  #1
Member
 
AdOo
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 10
adrieno is on a distinguished road
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        1e-6;
        relTol           0.1;
    }

    pFinal
    {
        $p;
        tolerance        1e-6;
        relTol           0.0;
    }

    "(U|h|k|epsilon)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-6;
        relTol          0.1;
    }

    "(U|h|k|epsilon)Final"
    {
        $U;
        relTol          0;
    }

    Yi
    {
        $hFinal;
    }
}

PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors  1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 2;
}


// ************************************************************************* //
THIRD:
Should I use the solver rhoPimpleFoam instead of PimpleFoam ?
Attached Images
File Type: jpg reactingFoam.jpg (204.7 KB, 40 views)
adrieno is offline   Reply With Quote

Old   April 11, 2016, 09:10
Default
  #2
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
wayne14 is on a distinguished road
That's no problem. The reason is

Code:
    "rho.*"
    {
        solver          diagonal;
    }
and

Code:
    fvScalarMatrix rhoEqn
    (
        fvm::ddt(rho)
      + fvc::div(phi)
      ==
        fvOptions(rho)
    );
wayne14 is offline   Reply With Quote

Old   April 11, 2016, 09:24
Default
  #3
Member
 
AdOo
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 10
adrieno is on a distinguished road
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
adrieno is offline   Reply With Quote

Old   April 11, 2016, 10:19
Default
  #4
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10
wayne14 is on a distinguished road
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
wayne14 is offline   Reply With Quote

Old   April 11, 2016, 11:26
Default
  #5
Member
 
AdOo
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 10
adrieno is on a distinguished road
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
adrieno is offline   Reply With Quote

Old   June 2, 2016, 11:29
Default
  #6
New Member
 
Mr.liu
Join Date: Sep 2012
Posts: 27
Rep Power: 13
lx882211 is on a distinguished road
Quote:
Originally Posted by wayne14 View Post
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
I meet a problem in Openfoam 2.3.0, reactingFoam, i need the data of CH4 reaction rate, but i failed to autowrite it like U or Yi.

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.
lx882211 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
How to switch off combustion and reaction in reactingFoam shenzhou1987 OpenFOAM Running, Solving & CFD 16 October 26, 2017 15:31
PaSR + infinite reaction rate in reactingFoam --> no reactions occurring tatu OpenFOAM Running, Solving & CFD 2 November 24, 2016 18:34
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 16:55
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 00:07


All times are GMT -4. The time now is 05:36.