CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Darcy-Forchheimer OpenFOAM (https://www.cfd-online.com/Forums/openfoam-solving/248563-darcy-forchheimer-openfoam.html)

MiguelMValero March 21, 2023 07:27

Darcy-Forchheimer OpenFOAM
 
Hello everybody,

I have a concern about how the Darcy law is implemented in OpenFOAM. More specifically, I don't really understand the meaning of the vectors "d" and "f". In my case, I want:

d [0 -2 0 0 0 0 0] (2.71508e6 70891 69.2805)
f [0 -1 0 0 0 0 0] (0 0 0)

where I thought that "d" and "f" were "D" and "F", respectively, in the Darcy formula:

S_i = -\nu (D_{ij}+\frac{1}{2}\rho |u_{kk}| F_{ij})u_i.

However, when I tried to manually implement Darcy-Forchheimer in OpenFOAM by removing the file "porosityProperties" file and changing the incompressible solver "pimpleFoam" with the following expression in those cells affected by the porosity condition, I'm not getting the same results.

tmp<fvVectorMatrix> tUEqn
(
fvm::ddt(U) + fvm::div(phi, U)
+ MRF.DDt(U)
+ turbulence->divDegSigma(U)
+ nu*cmptMultiply(D, U)
==
fvOptions(U)
);

I appreciate any help you can give me. I think I misunderstood how the multiplication of D and U is performed. I already checked on this document, but the operation is not specified:

https://www.tfd.chalmers.se/~hani/ku...ukurReport.pdf

Many thanks for considering my request.

SurajGangani December 28, 2023 11:34

Hey Valero,

I know you posted this a long time ago, but I am also doing similar stuff and want to know whether you succeeded or not?

Kind regards,
Suraj

Miguel M Valero January 3, 2024 08:58

Hello Suraj,

Honestly, I cannot provide a good answer to you. When I wrote the post, I was using version 8 of OpenFOAM. Then, I moved to version 9, and the fvOptions library no longer exists, but it has been split into two other libraries: fvConstraints and fvModels.

In my particular test case (I only used the linear relationship with the velocity), both methods seem to agree when coefficients constituting D are up to 1e5. When I try larger orders of magnitude, OpenFOAM appears to give good results whereas implementing the forcing term directly inside the solver gradually diverges the simulation. So, I think that OpenFOAM employs some diffusive schemes inside the fvOptions library that might stabilize the results.

I know it is not a very good reply, but unfortunately I cannot tell you further about this.


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