Skip to content

Reply To: New Particle Collision Model 0penLB 1.6

#7717
Jijo
Participant

Hello Jan,

Thank you for your comprehensive explanation. I now understand the implementation.I have one final question that I hope you can help me with. I am currently running a convective flow with resolved particles. However, I constantly come across a problem with the particles deforming into the wall although I am using the discrete contact model you have implemented in OpenLB. I have attached a picture for your information:

Before: https://ibb.co/VgdJJ9m
After: https://ibb.co/3B7Yc0K

Code snippet:

particleSystem.defineDynamics<VerletParticleDynamics<T,PARTICLETYPE>>();

// Create solid boundaries for particle interaction
std::vector<SolidBoundary<T, NSDESCRIPTOR::d>> solidBoundaries;

solidBoundaries.push_back( SolidBoundary<T, NSDESCRIPTOR::d>(std::make_unique<IndicInverse<T, NSDESCRIPTOR::d>>(cuboid, cuboid.getMin()-5 * converter.getPhysDeltaX(),cuboid.getMax()+5 * converter.getPhysDeltaX()), 2, wallContactMaterial));

// Create objects for contact treatment
ContactContainer<T, PARTICLECONTACTTYPE, WALLCONTACTTYPE> contactContainer;
// Generate lookup table for contact properties
ContactProperties<T, 1> contactProperties;
contactProperties.set(particleContactMaterial, wallContactMaterial,
evalEffectiveYoungModulus(youngsModulus, youngsModulus,
poissonRatio, poissonRatio),
dampingConstant, coefficientKineticFriction, coefficientStaticFriction);

// Set contact material
for (std::size_t iP = 0; iP < particleSystem.size(); ++iP) {
auto particlesc = particleSystem.get(iP);
setContactMaterial(particlesc, particleContactMaterial);
}

//Check ParticleSystem
particleSystem.checkForErrors();

for ( std::size_t iT = 0; iT < converter.getLatticeTime( maxPhysT ); ++iT ) {
setBoundaryValues(converter, NSlattice,ADlattice, iT, superGeometry);
// Execute particle manager
particleManager.execute<
couple_lattice_to_particles<T,NSDESCRIPTOR,PARTICLETYPE>,
apply_gravity<T,PARTICLETYPE>
>();

// Calculate and apply contact forces
processContacts<T, PARTICLETYPE, PARTICLECONTACTTYPE, WALLCONTACTTYPE, ContactProperties<T, 1>>(
particleSystem, solidBoundaries, contactContainer, contactProperties,
superGeometry, contactBoxResolutionPerDirection);

// Solve equations of motion
particleManager.execute<process_dynamics<T,PARTICLETYPE>>();

// Couple particles to lattice (with contact detection)
coupleResolvedParticlesToLattice<T, NSDESCRIPTOR, PARTICLETYPE, PARTICLECONTACTTYPE, WALLCONTACTTYPE>(
particleSystem, contactContainer, superGeometry, NSlattice, converter, solidBoundaries);

Any idea why such issue occur? You support is appreciated.
Regards,