/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see .
\*---------------------------------------------------------------------------*/
#include "HarrisCrighton.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace ParticleStressModels
{
defineTypeNameAndDebug(HarrisCrighton, 0);
addToRunTimeSelectionTable
(
ParticleStressModel,
HarrisCrighton,
dictionary
);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::ParticleStressModels::HarrisCrighton::HarrisCrighton
(
const dictionary& dict
)
:
ParticleStressModel(dict),
pSolid_(dict.get("pSolid")),
beta_(dict.get("beta")),
eps_(dict.get("eps"))
{}
Foam::ParticleStressModels::HarrisCrighton::HarrisCrighton
(
const HarrisCrighton& hc
)
:
ParticleStressModel(hc),
pSolid_(hc.pSolid_),
beta_(hc.beta_),
eps_(hc.eps_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::ParticleStressModels::HarrisCrighton::~HarrisCrighton()
{}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam::tmp>
Foam::ParticleStressModels::HarrisCrighton::denominator
(
const Field& alpha
) const
{
return
max
(
alphaPacked_ - alpha,
max(eps_*(1.0 - alpha), SMALL)
);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp>
Foam::ParticleStressModels::HarrisCrighton::tau
(
const Field& alpha,
const Field& rho,
const Field& uSqr
) const
{
return
(
pSolid_
* pow(alpha, beta_)
/ denominator(alpha)
);
}
Foam::tmp>
Foam::ParticleStressModels::HarrisCrighton::dTaudTheta
(
const Field& alpha,
const Field& rho,
const Field& uSqr
) const
{
const Field d(denominator(alpha));
return
(
pSolid_
* pow(alpha, beta_)
/ d
* (beta_/alpha + 1.0/d)
);
}
// ************************************************************************* //