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, 02:56
Default Addsup in fvOptions
  #1
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 281
Rep Power: 12
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, 17: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: 931
Rep Power: 13
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, 19:32
Default
  #3
Senior Member
 
mohammad
Join Date: Sep 2015
Posts: 281
Rep Power: 12
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 04:55
fvMatrix, fvOptions and SuSp: automatic implicit/explicit source-term treatment Zeppo OpenFOAM Programming & Development 7 December 15, 2021 11:20
Turbulence injection via fvOptions: addSup, constrain, or correct? pbachant OpenFOAM Programming & Development 1 May 22, 2020 23:48
Configuration of boundary conditions and fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 16 May 3, 2019 17:35
Power and Enthalpy in fvOptions file Raza Javed OpenFOAM Running, Solving & CFD 1 April 26, 2019 11:03


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