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

Why the fuel consumption rate is assigned with the equality operator?

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

Like Tree1Likes
  • 1 Post By s1291

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 25, 2021, 02:46
Default Why the fuel consumption rate is assigned with the equality operator?
  #1
New Member
 
Join Date: Dec 2015
Posts: 24
Rep Power: 8
metalfox is on a distinguished road
I noticed that in the combustion models inheriting from
Code:
singleStepCombustion
assign the fuel consumption rate
Code:
wFuel_
with the equality operator == instead of the assignment operator.

Does anybody know why?

For example, in infinitelyFastChemistry.C (https://develop.openfoam.com/Develop...hemistry.C#L67) we have:

Code:
template<class ReactionThermo, class ThermoType>
void infinitelyFastChemistry<ReactionThermo, ThermoType>::correct()
{
    this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero);

    if (this->active())
    {
        this->singleMixturePtr_->fresCorrect();

        const label fuelI = this->singleMixturePtr_->fuelIndex();

        const volScalarField& YFuel =
            this->thermo().composition().Y()[fuelI];

        const dimensionedScalar s = this->singleMixturePtr_->s();

        if (this->thermo().composition().contains("O2"))
        {
            const volScalarField& YO2 = this->thermo().composition().Y("O2");

            this->wFuel_ ==
                this->rho()/(this->mesh().time().deltaT()*C_)
               *min(YFuel, YO2/s.value());
        }
    }
}
metalfox is offline   Reply With Quote

Old   November 25, 2021, 04:26
Default
  #2
Member
 
s1291's Avatar
 
Join Date: Aug 2017
Location: Algeria
Posts: 72
Rep Power: 7
s1291 is on a distinguished road
take a look at this post:
Difference between = and ==
metalfox likes this.
__________________
"When in doubt, use brute force." -- Ken Thompson
s1291 is offline   Reply With Quote

Reply

Tags
combustion, operator

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 561 July 8, 2022 08:28
Firefoam fuel consumption rate? c_dowd OpenFOAM Programming & Development 2 June 6, 2018 17:14
burning of solid fuel lizihujx FLUENT 8 September 19, 2012 08:50
How to calculate phase flow rate? sangramroy FLUENT 0 January 11, 2012 13:02
fuel composition and pyrolysis rate settting willy CFX 0 March 13, 2004 01:27


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