mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Making the collision model able to say whether or not it controls
wall interactions. If it does, then make the wallImpactDistance 0, if it doesn't make it d/2.
This commit is contained in:
@ -182,8 +182,8 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline trackData
|
inline trackData
|
||||||
(
|
(
|
||||||
KinematicCloud<ParcelType>& cloud,
|
KinematicCloud<ParcelType>& cloud,
|
||||||
const constantProperties& constProps,
|
const constantProperties& constProps,
|
||||||
|
|||||||
@ -439,14 +439,23 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::wallImpactDistance
|
|||||||
const vector&
|
const vector&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Do not use a wall impact distance to allow proper multiple face
|
const KinematicCloud<ParcelType>& c =
|
||||||
// collisions. In a twisted mesh the particle can be within range
|
dynamic_cast<const KinematicCloud<ParcelType>&>(this->cloud());
|
||||||
// of a wall but not in the cell attached to a wall face, hence
|
|
||||||
// miss the interaction.
|
|
||||||
|
|
||||||
return 0.0;
|
if (c.collision().controlsWallInteraction())
|
||||||
|
{
|
||||||
|
// Do not use a wall impact distance if the collision model
|
||||||
|
// controls wall interactions to allow proper multiple face
|
||||||
|
// collisions. In a twisted mesh the particle can be within
|
||||||
|
// range of a wall but not in the cell attached to a wall
|
||||||
|
// face, hence miss the interaction.
|
||||||
|
|
||||||
// return 0.5*d_;
|
return 0.0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0.5*d_;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -141,6 +141,10 @@ public:
|
|||||||
//- Flag to indicate whether model activates injection model
|
//- Flag to indicate whether model activates injection model
|
||||||
virtual bool active() const = 0;
|
virtual bool active() const = 0;
|
||||||
|
|
||||||
|
//- Indicates whether model determines wall collisions or not,
|
||||||
|
// used to determine what value to use for wallImpactDistance
|
||||||
|
virtual bool controlsWallInteraction() const = 0;
|
||||||
|
|
||||||
// Collision function
|
// Collision function
|
||||||
virtual void collide() = 0;
|
virtual void collide() = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -61,6 +61,13 @@ bool Foam::NoCollision<CloudType>::active() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
bool Foam::NoCollision<CloudType>::controlsWallInteraction() const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::NoCollision<CloudType>::collide()
|
void Foam::NoCollision<CloudType>::collide()
|
||||||
{}
|
{}
|
||||||
|
|||||||
@ -82,6 +82,10 @@ public:
|
|||||||
//- Flag to indicate whether model activates injection model
|
//- Flag to indicate whether model activates injection model
|
||||||
virtual bool active() const;
|
virtual bool active() const;
|
||||||
|
|
||||||
|
//- Indicates whether model determines wall collisions or not,
|
||||||
|
// used to determine what value to use for wallImpactDistance
|
||||||
|
virtual bool controlsWallInteraction() const;
|
||||||
|
|
||||||
// Collision function
|
// Collision function
|
||||||
virtual void collide();
|
virtual void collide();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -611,6 +611,13 @@ bool Foam::PairCollision<CloudType>::active() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class CloudType>
|
||||||
|
bool Foam::PairCollision<CloudType>::controlsWallInteraction() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
void Foam::PairCollision<CloudType>::collide()
|
void Foam::PairCollision<CloudType>::collide()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -174,6 +174,10 @@ public:
|
|||||||
//- Flag to indicate whether model activates injection model
|
//- Flag to indicate whether model activates injection model
|
||||||
virtual bool active() const;
|
virtual bool active() const;
|
||||||
|
|
||||||
|
//- Indicates whether model determines wall collisions or not,
|
||||||
|
// used to determine what value to use for wallImpactDistance
|
||||||
|
virtual bool controlsWallInteraction() const;
|
||||||
|
|
||||||
// Collision function
|
// Collision function
|
||||||
virtual void collide();
|
virtual void collide();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user