MRT and BC problems in gridrefinement3d

Hi everybody,

In the gridrefinement3d example code, I read

// The “order” is about how Palabos rescales the populations. For now, we work at order 0.
// RESCALER means: we use convective scaling,
//Palabos scales only the populations and no external scalars, and
// this works for BGK but not for MRT.

plint order = 0;
order = 1;
MultiLevelCoupling3D<T,DESCRIPTOR,RESCALER> lattices(param.ogs, new ConsistentSmagorinskyCompleteRegularizedBGKdynamics<T,DESCRIPTOR>( param.omega[0], 0.14 ), order);

I have some questions about these.

1.I wonder whether this means that the order or RESCALER only works for BGK, or this whole grid refinement method only works for BGK. Because in my own cases, SmagorinskyMRTdynamics does not work but ConsistentSmagorinskyCompleteRegularizedBGKdynamics works well.

2.About the RESCALER, the example uses ConvectiveNoForceRescaler for the simulation, but I also found ConvectiveNoForceCompleteRescaler and ConvectiveNoForceCompleteSmagorinskyRescaler in the source code. Should I use the RESCALAER with the dynamics with corresponding name? Such as ConvectiveNoForceCompleteSmagorinskyRescaler for ConsistentSmagorinskyCompleteRegularizedBGKdynamics.

3.About setting BCs, in the example code, the BCs are set at every level for the outer domain, such as
for (plint iLevel = 0; iLevel <= param.finestLevel; iLevel++) {
Box3D boundingBox = coarsestBoundingBox.multiply(util::intTwoToThePower(iLevel));
Box3D box = boundingBox;
Box3D inlet (box.x0, box.x0, box.y0, box.y1, box.z0, box.z1);
bc->setVelocityConditionOnBlockBoundaries(lattice, boundingBox, inlet, boundary::dirichlet);
}

But when setting BCs for the obstacle, it seems that all operations are only implemented at the finestLevel. Such as

VoxelizedDomain3D voxelizedDomain (boundary, flowType, lattices.getLevel(param.finestLevel).getBoundingBox(), borderWidth, extendedEnvelopeWidth, blockSize );
voxelizedDomain.reparallelize(param.ogs.getMultiBlockManagement(param.finestLevel, lattices.getLevel(param.finestLevel).getBoundingBox(),extendedEnvelopeWidth));
defineDynamics(lattices.getLevel(param.finestLevel), voxelizedDomain.getVoxelMatrix(), lattices.getLevel(param.finestLevel).getBoundingBox(), new NoDynamics<T,DESCRIPTOR>((T) 1), voxelFlag::inside);

I’m confused about what kind of operations should be done at every level, what should be done only at coarsest level or finest level.

Thank you.
with best wishes,
steed188

What do you mean by does not work? Is the result unstable? It is true that the MRT rescaler is not implemented at the moment and should be performed. If you are interested we can try to work I can try to guide you to do it.

Yes.

When simulating an obstacle, at the moment we have to put alla the BCs on the same refinement level (usually it’s the finest level). For the outer boundaries, it is much easier to have BCs that are not on the same level because they are aligne with the lattice strcuture.