Reply To: Particle periodicity running with MPI.
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Particle periodicity running with MPI. › Reply To: Particle periodicity running with MPI.
Dear Rookie,
are you using the subgrid3DLegacyFramework
in your setup? Unfortunately, I cannot provide support in that context, so please correct me if I’m wrong.
Here a few thoughts:
I don’t see why the explained error should be caused by missing communications (I don’t think you have to add any communication, without the periodic boundary the particles move from one to the other block without problem, don’t they?). Because, if I understand it correctly, then the particles are duplicated when they pass through a block boundary in the middle of the domain. The periodic boundary shouldn’t be called there, should it?
I could imagine that the hardcoded //cube extents with origin (0,0,0)
doesn’t fit in your setup. Apparently, this part of the legacy code assumes that the simulation domain’s origin is at (0,0,0). Perhaps you should try to change your simulation setup to fit that assumption, if this doesn’t align with your setup.
In general, consider to check these values (inside the applyBoundary
method) for correctness, that is, are the values would they should be?
_minPhys = sg.getStatistics().getMinPhysR(1);
_maxPhys = sg.getStatistics().getMaxPhysR(1);
_extend[0] = _maxPhys[0] – _minPhys[0];
_extend[1] = _maxPhys[1] – _minPhys[1];
_extend[2] = _maxPhys[2] – _minPhys[2];
However, I’m aware that this doesn’t explain why it’s working in sequential mode, but not in parallel. Are you sure that it worked in sequential? Do the above values differ between sequential and parallel mode? I believe that here the positions are merely updated and that the communication should take place somewhere else.
You could also try to change the places where the particle position is updated (in case some change to CuboidGeometry
broke the logic, for example:
p->getPos()[0] -= _extend[0];
++_jumper[0];
int C = this->_cuboidGeometry.get_iC(p->getPos()[0], p->getPos()[1], p->getPos()[2], _overlap);
p->setCuboid(C);
Consider following movePositionToEnd
and movePositionToStart
of the current code: https://www.openlb.net/DoxyGen/html/d9/d46/namespaceolb_1_1particles_1_1communication.html#a1647f5b5b28d226caa8ae64e54f0320b
(min
and max
area already read from the SuperGeometry
at the top and position
refers to the current position)
Best regards,
Jan
- This reply was modified 4 months, 3 weeks ago by jan.