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

what is 'useReactionRate' in reactingFoam ??

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 25, 2014, 14:47
Question what is 'useReactionRate' in reactingFoam ??
  #1
New Member
 
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 6
harshad88 is on a distinguished road
Hello all,

I am still a newbie with OpenFoam. I want to know what does the boolean statement useReactionRate TRUE achieve when using the reactingFoam solver ??

Any help would be greatly appreciated. Thanks!
harshad88 is offline   Reply With Quote

Old   September 28, 2014, 14:38
Default
  #2
New Member
 
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 6
harshad88 is on a distinguished road
Anyone who can help?
harshad88 is offline   Reply With Quote

Old   September 30, 2014, 03:44
Default
  #3
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,691
Rep Power: 28
alexeym will become famous soon enoughalexeym will become famous soon enough
Send a message via Skype™ to alexeym
Hi,

Assuming that you mean useReactionRate in PaSRCoeffs dictionary in constant/combustionProperties file (though it was non-trivial to figure this out), it has no direct connection with reactingFoam but it's a property of combustoin model.

If you go to src/combustionModels/PaSR and look as PaSR.C, you'll find there:

Code:
template<class Type>
void Foam::combustionModels::PaSR<Type>::correct()
{
    if (this->active())
    {
        ...
        if (!useReactionRate_)
        {
            this->chemistryPtr_->solve(t - dt, dt);
        }
        else
        {
            this->chemistryPtr_->calculate();
        }
...
}
there type is defined by the line "combustionModel PaSR<psiChemistryCombustion>" in combustionProperties. Properties of psiChemistryCombustion are defined in chemistryProperties dictionary. If you then go to src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel and open basicChemistryModel.H file, you'll find the following code and comments:

Code:
            // Chemistry solution
                
                //- Calculates the reaction rates
                virtual void calculate() = 0;

                //- Solve the reaction system for the given start time and
                //  timestep and return the characteristic time
                virtual scalar solve(const scalar t0, const scalar deltaT) = 0;
Now you can use Doxygen generated documentation and sources to find concrete implementations of these methods.
alexeym is offline   Reply With Quote

Old   March 18, 2015, 11:10
Smile How to know the detail of the models and parameters? in reactingFoam
  #4
Member
 
Howar
Join Date: Mar 2015
Posts: 53
Rep Power: 4
Howard is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

Assuming that you mean useReactionRate in PaSRCoeffs dictionary in constant/combustionProperties file (though it was non-trivial to figure this out), it has no direct connection with reactingFoam but it's a property of combustoin model.

If you go to src/combustionModels/PaSR and look as PaSR.C, you'll find there:

Code:
template<class Type>
void Foam::combustionModels::PaSR<Type>::correct()
{
    if (this->active())
    {
        ...
        if (!useReactionRate_)
        {
            this->chemistryPtr_->solve(t - dt, dt);
        }
        else
        {
            this->chemistryPtr_->calculate();
        }
...
}
there type is defined by the line "combustionModel PaSR<psiChemistryCombustion>" in combustionProperties. Properties of psiChemistryCombustion are defined in chemistryProperties dictionary. If you then go to src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel and open basicChemistryModel.H file, you'll find the following code and comments:

Code:
            // Chemistry solution
 
                //- Calculates the reaction rates
                virtual void calculate() = 0;
 
                //- Solve the reaction system for the given start time and
                //  timestep and return the characteristic time
                virtual scalar solve(const scalar t0, const scalar deltaT) = 0;
Now you can use Doxygen generated documentation and sources to find concrete implementations of these methods.
Thank you very much for your answer. I am new user of OpenFoam and I also try to understand the parametersn and the model uses in the reactiongFoam. Could you explain how to see the detail thing by 'Doxygen generated documentation and sources', I am not quite clear.
Howard is offline   Reply With Quote

Old   February 27, 2016, 12:05
Arrow reply
  #5
Member
 
amin jalalian
Join Date: Mar 2014
Posts: 34
Rep Power: 5
amin_jalalian is on a distinguished road
Hi
the "useReactionRate" has been removed in OF301. It is not in src's files or other folder's, but it is in some tutorial files which is not true and their programmers forgot to remove that phrase from tutorials.
regards.
amin_jalalian is offline   Reply With Quote

Old   May 7, 2016, 04:39
Default
  #6
Member
 
amin jalalian
Join Date: Mar 2014
Posts: 34
Rep Power: 5
amin_jalalian is on a distinguished road
Quote:
Originally Posted by amin_jalalian View Post
Hi
the "useReactionRate" has been removed in OF301. It is not in src's files or other folder's, but it is in some tutorial files which is not true and their programmers forgot to remove that phrase from tutorials.
regards.

better:

Hi
the "useReactionRate" in has been removed in OF301. It is not in src's files or other folder's, but it is still in 3 tutorial files (file: combustionProperties) which is not right and it seems its programmers forgot to remove "useReactionRate" from tutorials.
regards.
amin_jalalian is offline   Reply With Quote

Old   June 2, 2016, 11:27
Default
  #7
New Member
 
Mr.liu
Join Date: Sep 2012
Posts: 27
Rep Power: 7
lx882211 is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

Assuming that you mean useReactionRate in PaSRCoeffs dictionary in constant/combustionProperties file (though it was non-trivial to figure this out), it has no direct connection with reactingFoam but it's a property of combustoin model.

If you go to src/combustionModels/PaSR and look as PaSR.C, you'll find there:

Code:
template<class Type>
void Foam::combustionModels::PaSR<Type>::correct()
{
    if (this->active())
    {
        ...
        if (!useReactionRate_)
        {
            this->chemistryPtr_->solve(t - dt, dt);
        }
        else
        {
            this->chemistryPtr_->calculate();
        }
...
}
there type is defined by the line "combustionModel PaSR<psiChemistryCombustion>" in combustionProperties. Properties of psiChemistryCombustion are defined in chemistryProperties dictionary. If you then go to src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel and open basicChemistryModel.H file, you'll find the following code and comments:

Code:
            // Chemistry solution
                
                //- Calculates the reaction rates
                virtual void calculate() = 0;

                //- Solve the reaction system for the given start time and
                //  timestep and return the characteristic time
                virtual scalar solve(const scalar t0, const scalar deltaT) = 0;
Now you can use Doxygen generated documentation and sources to find concrete implementations of these methods.
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

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate flame speed using reactingFoam IColin OpenFOAM Running, Solving & CFD 0 February 4, 2014 16:14
reactingFoam crashing rishibigghe OpenFOAM Running, Solving & CFD 0 June 14, 2011 17:50
Constant Volume Combustion with reactingFoam Alish1984 OpenFOAM Running, Solving & CFD 2 May 8, 2011 08:51
reactingFoam wedge handling wrong U dhondupant OpenFOAM Bugs 1 December 9, 2010 08:34
reactingFoam - turbulent reacting flow hamburgFoam OpenFOAM 0 December 7, 2009 13:57


All times are GMT -4. The time now is 02:11.