Reply To: Problems of Resolved Particles with Periodic Boundary
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Problems of Resolved Particles with Periodic Boundary › Reply To: Problems of Resolved Particles with Periodic Boundary
Dear jan,
Thanks for your advice. The code is mostly the same as examples/particles/dkt2d. I will put my code then at another reply post for you to facilitate your reading:)
1. I did get puzzled when I define the “SolidBoundaries”. As the “SolidBoundary” code below, I wonder if “std::unique_ptr<IndicatorF<T, D>> _indPtr” was the whole simulation domain, or just the user-defined boundary wall part? I tried to set the bottom of the container as the “_indPtr”, but particles just went out of the container at the beginning. Plus, why is the cuboid extended larger in the dkt2d example?
struct SolidBoundary {
private:
/// Indicator providing the surface and volume information
std::unique_ptr<IndicatorF<T, D>> _indPtr;
/// Material number on the lattice for identification and handling of boundaries
const unsigned _latticeMaterial;
}
2. I checked again about the periodicity, but the problem still exists. A speculation is that forces of the “ghostPos” are overwritten by “position” according to the line 190-195 of src/functors/lattice/latticeMomentumExchangeForce.hh:
// Calculate force for the ghost particle
particle.template setField<GENERAL,POSITION>(ghostPos);
evaluate(output, particle, iP);
// Calculate force of actual particle
particle.template setField<GENERAL,POSITION>(position);
evaluate(output, particle, iP);
Of course, incorrect definition of the walls could also be the reason since it has not been solved yet.
Really appreciate your suggestions and help. Look forward to your reply.
Sincerely,
yueyq