About the code of ShirgaonkarIB.c (force model)

Submitted by keepfit on Mon, 02/03/2014 - 04:50

Hi CFD-DEM developers,

as the fluid force acting on immersed body is:
f = - grad(P) + nu_ * laplacian(U)

I found that the last line in the following codes seems having a written error:
volVectorField h = rho_*(nufField*fvc::laplacian(U_)-fvc::grad(p_));

as mu = nu * rho

so should it be like this?
volVectorField h = (rho_*nufField*fvc::laplacian(U_)-fvc::grad(p_));
-----------------------------------------------
#ifdef comp
// get viscosity field
const volScalarField& mufField = particleCloud_.turbulence().mu();
volVectorField h = (mufField*fvc::laplacian(U_)-fvc::grad(p_));
#else
// get viscosity field
const volScalarField& nufField = particleCloud_.turbulence().nu();
volVectorField h = rho_*(nufField*fvc::laplacian(U_)-fvc::grad(p_)); // <------------------
-------------------------------

And if turbulence viscosity (nut) is considered and rewrite the nufField:

const volScalarField& nufField =particleCloud_.turbulence()->nut() + particleCloud_.turbulence().nu();

But can not pass the compilation. So I would like to ask, how to get access to the nut() function within CFDEM
frame?

Cheers,

David

alice's picture

alice | Mon, 02/03/2014 - 13:01

Hello David,
concerning your first question: the solver was based on icoFoam, which is written for incompressible fluids. In OpenFOAM thi means that the pressure field p is actually the pressure scaled with the velocity, i.e. p/rho. If you open the p-file in the 0-directory of the test case, you will notice that the pressure has the units [0 2 -2 0 0 0 0] instead of [1 -1 -2 0 0 0 0]. Thus the multiplication by rho makes sense there.
Concerning question 2: have a look at cfdemCloud.C. Different operators are defined there, and also nut() is accessed.
Cheers,
Alice

heliana60 | Fri, 05/20/2016 - 16:44

Hi Alice,

I created a "forum" or the like a while ago about cfdemSolverIB. I want to use it for viscoelastic fluids. I edited the solver so I can include different constitutive equations (based also in viscoelasticFluidFoam solver pre-existing in OpenFOAM.)

this is the forum:
http://www.cfdem.com/forums/viscoelastic-flow-particles

In any case, I would like to contact you for some advice regarding convergence issues I have. I see how many dependences are in the coupling, like CFD/timeStep vs DEM/timeStep, and how varying this changes results importantly, even when the solver runs; mesh dependence vs particle size, etc.

So far I want to use a high relaxation time viscoelastic fluid and just a particle sedimenting in it. I could send you what I have so far, if you have time, it would be nice if you could give a hand, because even though my solver "works" I struggle with tunning it a lot.

Heliana

keepfit | Tue, 02/04/2014 - 21:37

Hi Alice,

1)
thanks for the reply. I realized that the N-S equation for incompressible, single phase is divided by rho (fluid density).

If we work on compressible fluid, so the equation should be like this? because mufField is not constant

const volScalarField& mufField = particleCloud_.turbulence().mu();
volVectorField h = (mufField*fvc::laplacian(U_)-fvc::grad(p_));

and if turbulence viscosity is considered,
muEff = particleCloud_.turbulence().mu() + rho_*particleCloud_.turbulence()->nut();

2)
where to put #ifdef comp ... or #ifdef incomp in the solver, so that force model can choose the correct equation to calculate?

As for the original solver- cfdemSoverIB, I could not find such information say it's incompressible solver.

Cheers,

David