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

Porous Media with rhoCentralFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By shock77

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2020, 11:48
Default Porous Media with rhoCentralFoam
  #1
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi,


I have noticed that rhoCentralFoam has no porosity treatment unlike sonicFoam or rhoPimpleFoam. Since I have the best results with rhoCentralFoam I would like to add the porosity treatment.


I want to use the Darcy-Forchheimer model explicitly by using fvOptions, which works well for other solvers except rhoCentralFoam.


I have noticed, that in rhoPimpleFoam UEqn.H fvOptions is mentioned:


Code:
// Solve the Momentum equation

MRF.correctBoundaryVelocity(U);

tmp<fvVectorMatrix> tUEqn
(
    fvm::ddt(rho, U) + fvm::div(phi, U)
  + MRF.DDt(rho, U)
  + turbulence->divDevRhoReff(U)
 ==
    fvOptions(rho, U)
);
fvVectorMatrix& UEqn = tUEqn.ref();

UEqn.relax();

fvOptions.constrain(UEqn);

if (pimple.momentumPredictor())
{
    solve(UEqn == -fvc::grad(p));

    fvOptions.correct(U);
    K = 0.5*magSqr(U);
}
while in rhoCentralFoam.C it is not:


Code:
        // --- Solve momentum
        solve(fvm::ddt(rhoU) + fvc::div(phiUp));

        U.ref() =
            rhoU()
           /rho();
        U.correctBoundaryConditions();
        rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField();

        if (!inviscid)
        {
            solve
            (
                fvm::ddt(rho, U) - fvc::ddt(rho, U)
              - fvm::laplacian(muEff, U)
              - fvc::div(tauMC)
            );
            rhoU = rho*U;
        }

Since my flow is viscous, I should concentrate on the if statement. Replacing it by


Code:
        if (!inviscid)
        {
            solve
            (
                fvm::ddt(rho, U) - fvc::ddt(rho, U)
              - fvm::laplacian(muEff, U)
              - fvc::div(tauMC) ==    fvOptions(rho, U)
            );
            rhoU = rho*U;
        }
doesn't seem to work.




I would be glad to hear your advice!




Regards,
shock77
shock77 is offline   Reply With Quote

Old   May 8, 2020, 08:00
Default
  #2
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
So what I want to to is to add the additional sink term of the darcy model or better the darcy forchheimer model. Unfortunately I dont know how to do it.
https://openfoamwiki.net/index.php/DarcyForchheimer



I hope someone has more experience than me.
shock77 is offline   Reply With Quote

Old   May 9, 2020, 18:54
Default
  #3
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I was mistaken, it works well.


For anyone with the same issue:


Just add the additional sink term with fvOptions(rho, U) like I did. Of course you have to include fvOption.H in rhoCentralFoam.C or your new solver! Compile it and use it like the other solvers.
jherb and HPE like this.
shock77 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
Thermal non-equilibrium porous media model with conjugate heat transfer Hexahedron FLUENT 9 February 22, 2023 02:55
use of porous media with sonicFoam or rhoCentralFoam Calmly OpenFOAM Running, Solving & CFD 6 May 7, 2020 11:12
Porous media setup issues in Fluent Bernard Van FLUENT 29 January 26, 2017 04:09
How to model granular flow through porous media Axius FLUENT 2 August 7, 2014 10:34
porous media: Fluent or Star-CD? Igor Main CFD Forum 0 December 5, 2002 15:16


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