ENH: Added 'added mass' hook to particle forces

This commit is contained in:
andy
2012-08-21 16:31:24 +01:00
parent 45a5899043
commit e406ee04e9
4 changed files with 46 additions and 5 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -180,4 +180,21 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcNonCoupled
}
template<class CloudType>
Foam::scalar Foam::ParticleForceList<CloudType>::massEff
(
const typename CloudType::parcelType& p,
const scalar mass
) const
{
scalar massEff = mass;
forAll(*this, i)
{
massEff += this->operator[](i).massAdd(p, mass);
}
return massEff;
}
// ************************************************************************* //

View File

@ -130,6 +130,13 @@ public:
const scalar Re,
const scalar muc
) const;
//- Return the effective mass
virtual scalar massEff
(
const typename CloudType::parcelType& p,
const scalar mass
) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,6 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class CloudType>
Foam::ParticleForce<CloudType>::ParticleForce
(
@ -120,6 +119,17 @@ Foam::forceSuSp Foam::ParticleForce<CloudType>::calcNonCoupled
}
template<class CloudType>
Foam::scalar Foam::ParticleForce<CloudType>::massAdd
(
const typename CloudType::parcelType& p,
const scalar mass
) const
{
return 0.0;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "ParticleForceNew.C"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,7 +47,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class ParticleForce Declaration
Class ParticleForce Declaration
\*---------------------------------------------------------------------------*/
template<class CloudType>
@ -169,6 +169,13 @@ public:
const scalar Re,
const scalar muc
) const;
//- Return the added mass
virtual scalar massAdd
(
const typename CloudType::parcelType& p,
const scalar mass
) const;
};