Interface dimensionedscalar

Submitted by paulaalejandrayo on Thu, 11/23/2017 - 14:00

Hello,

I am using the cfdemSolverIB.
I do not finish to understand what is, what is the function of, and how it is calculated the InterfaceField :
##################
void Foam::cfdemCloudIB::setInterFace
(
volScalarField& interFace
)
{
interFace == dimensionedScalar("zero", interFace.dimensions(), 0.);
for(int par=0; par< numberOfParticles(); par++)
{
vector ParPos(positions()[par][0],positions()[par][1],positions()[par][2]);
const boundBox& globalBb = mesh().bounds();
double skin = 2.0;
forAll(mesh_.C(),cellI)
{
vector posC = mesh_.C()[cellI];
if(checkPeriodicCells_)
{...}
double aaa2 = voidFractionM().pointInParticle(par, ParPos, posC, skin);
if(aaa2 <= 0.0)
{
interFace[cellI] = aaa2 + 1.0;
}
}
}
}
#####

So it looks it gives a value of interface to each cell based on the position of the particles, but it overwrite it if two particles "share" a cell, as in the TwoSpheresGlowingski tutorial (attached picture). So, can anyone help me to understand this?
Sorry, maybe this is a too basic question.
Thank you very much in advance.

Best regards,
Paula

AttachmentSize
Image icon two2.png44.47 KB

medvedeg | Thu, 11/23/2017 - 15:10

Hallo Paula,

this function is used for mesh refinement around a particle (CFD/constant/refineMeshDict). Previously, void fraction field was used instead as an interface function. But it was found that the zone with refined CFD cells is not big enough.
Current interface function is chosen in such way that it has relative big gradient and the mesh is refined inside a zone that is twice bigger the particle size in each direction and correspondingly 8x larger in volume. You right, interface field around particle 2 can overwrite interface field around particle 1. Maybe it will be corercted in future. But it still looks that the mesh is refined properly.

Regards

Alexander Podlozhnyuk

paulaalejandrayo | Thu, 11/23/2017 - 15:52

Hello Alexander,

Thank you very much! it makes perfect sense now, but just to double-check, if I am not using mesh refinement I should not be worry about this field, right?
Also, in a dense pack system it can bring problems as the refinement is "over-done"? I mean, interface is close to 1 in regions where actually it is not really needed? Maybe I could select voidFraction in refineMeshDict for this kind of cases?

Thank you very much

Best regards,
Paula

alice's picture

alice | Mon, 11/27/2017 - 10:36

Hello Paula,
you are right, when you are not using mesh refinement, this field has no effect. Since the refinement is not done per particle but based on the interface field, it should also work for dense packings. However, when you have a dense packing, it might make sense to generate a mesh with the desired mesh cell size from the beginning. On the one hand you avoid the additional costs of the dynamic mesh refinement (should be small in this case, but still...) and you can create the ideal mesh for you case.
Cheers,
Alice