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

NicenoKEqn and KEqn models

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2024, 08:19
Default NicenoKEqn and KEqn models
  #1
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,

I would like help answering a question.

The NicenoKEqn.C file calculates kSource() as follows:

Code:
template<class BasicMomentumTransportModel>
tmp<fvScalarMatrix> NicenoKEqn<BasicMomentumTransportModel>::kSource() const
{
    const alphaField& alpha = this->alpha_;
    const rhoField& rho = this->rho_;

    const phaseCompressibleMomentumTransportModel& gasTurbulence =
        this->gasTurbulence();

    const volScalarField phaseTransferCoeff(this->phaseTransferCoeff());

    return
        alpha*rho*bubbleG()
      + phaseTransferCoeff*gasTurbulence.k()
      - fvm::Sp(phaseTransferCoeff, this->k_);
}
Can I deduce that the last three lines of this code are replacing their respective lines in the KEqn model? Code below:

KEqn.C:
Code:
tmp<fvScalarMatrix> kEqn
    (
        fvm::ddt(alpha, rho, k_)
      + fvm::div(alphaRhoPhi, k_)
      - fvm::laplacian(alpha*rho*DkEff(), k_)
     ==
        alpha*rho*G
      - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
      - fvm::Sp(this->Ce_*alpha*rho*sqrt(k_)/this->delta(), k_)
      + kSource()
      + fvModels.source(alpha, rho, k_)
    );
Or am I inserting more tree terms into the k equation?

I'm trying to believe that the result of this combination will generate the code below, but I'm not sure... which would even make the code written by Niceno and referenced in OpenFOAM contrary to the article.

Expectation:
Code:
tmp<fvScalarMatrix> kEqn
    (
        fvm::ddt(alpha, rho, k_)
      + fvm::div(alphaRhoPhi, k_)
      - fvm::laplacian(alpha*rho*DkEff(), k_)
     ==
        alpha*rho*bubbleG()
      - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
      + phaseTransferCoeff*gasTurbulence.k()
      - fvm::Sp(phaseTransferCoeff, this->k_);
      + fvModels.source(alpha, rho, k_)
    );
Thanks.

Last edited by gu1; January 11, 2024 at 09:49.
gu1 is offline   Reply With Quote

Reply

Tags
keqn, nicenokeqn, openfoam11


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



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