Hi,
I’m trying to implement MultiGrid3D to flow around the bluff body in a channel. I have some puzzles on it.
- I understand that for many output operations, such as VTK output, we need to point a level to convert the MultiGridLattice3D to this level, then operate is as a common MultiBlockLattice3D. But what if I want to do some operations to modify some variables related to the lattice? E.g., modify local omega or density, How can I do it? I tried to operate the MultiBlockLattice at every level like this:
for (plint iLevel = 0; iLevel < lattice.getNumLevels(); ++iLevel) {
applyProcessingFunctional(new OperateLocalOmegaFunctional3D<T, DESCRIPTOR>(parameters[iLevel]), lattice.getComponent(iLevel).getBoundingBox(), lattice.getComponent(iLevel));
}
But the simulation didn’t work.
- I implemented the bounceback BC to the obstacle at every level, as:
for (plint iLevel = 0; iLevel < lattice.getNumLevels(); ++iLevel) {
plint nx = parameters[iLevel].getNx();
plint ny = parameters[iLevel].getNy();
plint nz = parameters[iLevel].getNz();Box3D obstacle = Box3D(startPos[0] / X_Length * nx, endPos[0] / X_Length * nx, startPos[1] / Y_Length * ny, endPos[1]) / Y_Length * ny, startPos[2] / Z_Length * nz, endPos[2]) / Z_Length * nz);
defineDynamics(lattice.getComponent(iLevel), obstacle, new plb::BounceBack<T, DESCRIPTOR>);
}
But the results show that there is an abnormal velocity value on the boundary grids, and the value is not tiny, as shown in the picture. In addition, inside the obstacle, there occurred velocity values, even though it is small. But the inside of the bluff body should be insolated from the outside flow and there should be no velocity there.
Thank you in advance!
steed188