mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Pair collision model - added ramp time to bleed-in force contributions
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -37,7 +37,11 @@ Foam::PairModel<CloudType>::PairModel
|
||||
:
|
||||
dict_(dict),
|
||||
owner_(owner),
|
||||
coeffDict_(dict.subDict(type + "Coeffs"))
|
||||
coeffDict_(dict.subDict(type + "Coeffs")),
|
||||
forceRampTime_
|
||||
(
|
||||
this->coeffDict().template lookupOrDefault<scalar>("forceRampTime", -1)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -66,13 +70,28 @@ const Foam::dictionary& Foam::PairModel<CloudType>::dict() const
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary&
|
||||
Foam::PairModel<CloudType>::coeffDict() const
|
||||
const Foam::dictionary& Foam::PairModel<CloudType>::coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::PairModel<CloudType>::forceCoeff
|
||||
(
|
||||
typename CloudType::parcelType& pA,
|
||||
typename CloudType::parcelType& pB
|
||||
) const
|
||||
{
|
||||
if (forceRampTime_ < 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
return min(min(pA.age(), pB.age())/forceRampTime_, 1);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "PairModelNew.C"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -63,6 +63,21 @@ class PairModel
|
||||
//- The coefficients dictionary
|
||||
const dictionary coeffDict_;
|
||||
|
||||
//- Time to bleed-in collision forces; default = 0 (no delay)
|
||||
scalar forceRampTime_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Return the force coefficient based on the forceRampTime_
|
||||
scalar forceCoeff
|
||||
(
|
||||
typename CloudType::parcelType& pA,
|
||||
typename CloudType::parcelType& pB
|
||||
) const;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -193,7 +193,10 @@ void Foam::PairSpringSliderDashpot<CloudType>::evaluatePair
|
||||
|
||||
if (normalOverlapMag > 0)
|
||||
{
|
||||
//Particles in collision
|
||||
// Particles in collision
|
||||
|
||||
// Force coefficient
|
||||
scalar forceCoeff = this->forceCoeff(pA, pB);
|
||||
|
||||
vector rHat_AB = r_AB/(r_AB_mag + VSMALL);
|
||||
|
||||
@ -224,6 +227,8 @@ void Foam::PairSpringSliderDashpot<CloudType>::evaluatePair
|
||||
*rHat_AB;
|
||||
}
|
||||
|
||||
fN_AB *= forceCoeff;
|
||||
|
||||
pA.f() += fN_AB;
|
||||
pB.f() += -fN_AB;
|
||||
|
||||
@ -278,6 +283,8 @@ void Foam::PairSpringSliderDashpot<CloudType>::evaluatePair
|
||||
fT_AB = - kT*tangentialOverlap_AB - etaT*USlip_AB;
|
||||
}
|
||||
|
||||
fT_AB *= forceCoeff;
|
||||
|
||||
pA.f() += fT_AB;
|
||||
pB.f() += -fT_AB;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user