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

Addsup in fvOptions

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mostanad

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2020, 01:56
Default Addsup in fvOptions
  #1
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
Hi all,
I am working with one of the solvers in OpenFOAM, which is using fvOptions and more specifically, meanVelocitySource.C. However, there are some things that are not clear to me. As you can see in the solver discretization part:
Code:
fvVectorMatrix UEqn
            (
                fvm::ddt(U) //fvm::ddt(voidfraction,U)
              + fvm::div(phi, U)
              + turbulence->divDevReff(U)
                ==
                fvOptions(U)
            );
In this case, the fvOptions is called on the right hand side of the equation. However, I detected that by calling in such this way, the Addsup in the meanVelocitySource.C file is called. You can see the function for this source term in the lines 190-226.
Code:
void Foam::fv::meanVelocityForce::addSup
(
    fvMatrix<vector>& eqn,
    const label fieldi
)
{
    volVectorField::Internal Su
    (
        IOobject
        (
            name_ + fieldNames_[fieldi] + "Sup",
            mesh_.time().timeName(),
            mesh_,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh_,
        dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero)
    );

    scalar gradP = gradP0_ + dGradP_;

    UIndirectList<vector>(Su, cells_) = flowDir_*gradP;

    eqn += Su;
}


void Foam::fv::meanVelocityForce::addSup
(
    const volScalarField& rho,
    fvMatrix<vector>& eqn,
    const label fieldi
)
{
    this->addSup(eqn, fieldi);
}
So the problem is with the link between these two parts. How by calling fvOptions(U) in the momentum equation, the Addsup function is called.
Any help in this regard would be appreciated.
mostanad is offline   Reply With Quote

Old   May 13, 2020, 16:22
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Hi

- I would start looking at `src/finiteVolume/cfdTools/general/fvOptions`.
HPE is offline   Reply With Quote

Old   May 13, 2020, 18:32
Default
  #3
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 274
Rep Power: 11
mostanad is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi

- I would start looking at `src/finiteVolume/cfdTools/general/fvOptions`.
That's the key point. The connection should be provided by fvOptions.C. However, there is no sign of Addsup call in that file.
Kazeshini8999 likes this.
mostanad 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
fvOptions limitTemperature crashing in compressibleInterFoam JM27 OpenFOAM Running, Solving & CFD 38 November 29, 2023 03:55
fvMatrix, fvOptions and SuSp: automatic implicit/explicit source-term treatment Zeppo OpenFOAM Programming & Development 7 December 15, 2021 10:20
Turbulence injection via fvOptions: addSup, constrain, or correct? pbachant OpenFOAM Programming & Development 1 May 22, 2020 22:48
Configuration of boundary conditions and fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 16 May 3, 2019 16:35
Power and Enthalpy in fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 1 April 26, 2019 10:03


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