Skip to content
Snippets Groups Projects
Commit 5e48cd50 authored by Christoph Rettinger's avatar Christoph Rettinger
Browse files

Removed isFixed checks from lubrication force evaluators

parent 8684e182
Branches
Tags
No related merge requests found
......@@ -107,10 +107,6 @@ void LubricationForceEvaluator::operator ()( )
{
pe::SphereID sphereI = static_cast<pe::SphereID> ( *body1It );
// only moving spheres are considered
if ( sphereI->isFixed() )
continue;
auto copyBody1It = body1It;
// loop over all rigid bodies after current body1 to avoid double forces
for( auto body2It = (++copyBody1It); body2It != pe::BodyIterator::end(); ++body2It )
......@@ -132,10 +128,6 @@ void LubricationForceEvaluator::operator ()( )
{
pe::SphereID sphereI = static_cast<pe::SphereID> ( *body1It );
// only moving spheres are considered
if ( sphereI->isFixed() )
continue;
for (auto body2It = globalBodyStorage_->begin(); body2It != globalBodyStorage_->end(); ++body2It)
{
if ( body2It->getTypeID() == pe::Plane::getStaticTypeID() )
......@@ -187,9 +179,8 @@ void LubricationForceEvaluator::treatLubricationSphrSphr( real_t nu_Lattice, rea
if ( blockAABB.contains(midPoint) || sphereJ->isGlobal() )
{
fLub = compLubricationSphrSphr(nu_Lattice, gap, cutOff, sphereI, sphereJ);
sphereI->addForce(fLub);
if( !sphereJ->isFixed() )
sphereJ->addForce( -fLub);
sphereI->addForce( fLub);
sphereJ->addForce(-fLub);
WALBERLA_LOG_DETAIL( "Lubrication force on sphere " << sphereI->getID() << " from sphere " << sphereJ->getID() << " is:" << fLub);
WALBERLA_LOG_DETAIL( "Lubrication force on sphere " << sphereJ->getID() << " from sphere " << sphereI->getID() << " is:" << -fLub << "\n");
......
......@@ -96,10 +96,6 @@ void LubricationCorrection::operator ()( )
{
pe::SphereID sphereI = static_cast<pe::SphereID> ( *body1It );
// only moving spheres are considered
if ( sphereI->isFixed() )
continue;
auto copyBody1It = body1It;
// loop over all rigid bodies after current body1 to avoid double forces
for( auto body2It = (++copyBody1It); body2It != pe::BodyIterator::end(); ++body2It )
......@@ -121,10 +117,6 @@ void LubricationCorrection::operator ()( )
{
pe::SphereID sphereI = static_cast<pe::SphereID> ( *body1It );
// only moving spheres are considered
if ( sphereI->isFixed() )
continue;
for (auto body2It = globalBodyStorage_->begin(); body2It != globalBodyStorage_->end(); ++body2It)
{
if ( body2It->getTypeID() == pe::Plane::getStaticTypeID() )
......@@ -183,9 +175,8 @@ void LubricationCorrection::treatLubricationSphrSphr( real_t nu_Lattice, real_t
if ( blockAABB.contains(midPoint) || sphereJ->isGlobal() )
{
fLub = compLubricationSphrSphr(nu_Lattice, gap, cutOff, sphereI, sphereJ);
sphereI->addForce(fLub);
if( !sphereJ->isFixed() ) //TODO needed?
sphereJ->addForce( -fLub);
sphereI->addForce( fLub);
sphereJ->addForce(-fLub);
WALBERLA_LOG_DETAIL( "Lubrication force on sphere " << sphereI->getID() << " from sphere " << sphereJ->getID() << " is:" << fLub);
WALBERLA_LOG_DETAIL( "Lubrication force on sphere " << sphereJ->getID() << " from sphere " << sphereI->getID() << " is:" << -fLub << "\n");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment