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

OpenFOAMv9: An useless label variable in member functions (const label li)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2023, 08:05
Default OpenFOAMv9: An useless label variable in member functions (const label li)
  #1
Member
 
bany
Join Date: Nov 2019
Posts: 45
Rep Power: 7
bany is on a distinguished road
When I study the standardChemistryModel.C, the function which calculates dc/dt called omega is different from that in openfoam v7. There is an additional label variable "li" in v9 compared to that in v7.

in openfoam v9:
Code:
        virtual void omega
        (
            const scalar p,
            const scalar T,
            const scalarField& c,
            const label li,
            scalarField& dcdt
        ) const;
in openfoam v7:
Code:
        virtual void omega
        (
            const scalarField& c,
            const scalar T,
            const scalar p,
            scalarField& dcdt
        ) const;
However, when I went deep into the function omega, the label variable of the function omega in Reaction.C is used in code :

Code:
    omegaf = this->kf(p, clippedT, c, li);
    omegar = this->kr(omegaf, p, clippedT, c, li);
For reversible reactions, kf if defined in ReversibleReaction.C:

Code:
template<class ReactionThermo, class ReactionRate>
Foam::scalar Foam::ReversibleReaction<ReactionThermo, ReactionRate>::kf
(
    const scalar p,
    const scalar T,
    const scalarField& c,
    const label li
) const
{
    return k_(p, T, c, li);
}
For Arrhenius reaction rate, above k_ can invoke function operator() in ArrheniusReactionRateI.H:

Code:
inline Foam::scalar Foam::ArrheniusReactionRate::operator()
(
    const scalar p,
    const scalar T,
    const scalarField&,
    const label
) const
{
    scalar ak = A_;

    if (mag(beta_) > vSmall)
    {
        ak *= pow(T, beta_);
    }

    if (mag(Ta_) > vSmall)
    {
        ak *= exp(-Ta_/T);
    }

    return ak;
}
At last, i could not find where is the label variable li used.

What dose the meaning of the existence of the useless label variable?

Any help are appreciated!
bany is offline   Reply With Quote

Reply

Tags
standard;omega


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
Foam::error::printStack(Foam::Ostream&) with simpleFoam -parallel U.Golling OpenFOAM Running, Solving & CFD 52 September 23, 2023 03:35
rhoSimpleFoam floating point exception RuffiE44 OpenFOAM Running, Solving & CFD 1 May 20, 2020 17:50
[OpenFOAM.com] OpenFOAMv1806 with amd aocc 1.2 / 1.3 compiler cfdx OpenFOAM Installation 10 February 27, 2019 04:59
Fatal error: invalid wall function specification kcc49 OpenFOAM Running, Solving & CFD 13 September 26, 2018 04:07
problem in making a new solver!!! adambarfi OpenFOAM Running, Solving & CFD 18 September 29, 2012 11:56


All times are GMT -4. The time now is 00:35.