mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -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
|
||||
@ -101,6 +101,9 @@ Foam::ParticleErosion<CloudType>::ParticleErosion
|
||||
}
|
||||
|
||||
patchIDs_ = uniquePatchIDs.toc();
|
||||
|
||||
// trigger ther creation of the Q field
|
||||
preEvolve();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
@ -103,17 +103,16 @@ Foam::vector Foam::GradientDispersionRAS<CloudType>::update
|
||||
|
||||
const scalar cps = 0.16432;
|
||||
|
||||
const volScalarField& k = *this->kPtr_;
|
||||
const volScalarField& epsilon = *this->epsilonPtr_;
|
||||
const volVectorField& gradk = *this->gradkPtr_;
|
||||
const scalar k = this->kPtr_->internalField()[cellI];
|
||||
const scalar epsilon =
|
||||
this->epsilonPtr_->internalField()[cellI] + ROOTVSMALL;
|
||||
const vector& gradk = this->gradkPtr_->internalField()[cellI];
|
||||
|
||||
const scalar UrelMag = mag(U - Uc - UTurb);
|
||||
|
||||
const scalar tTurbLoc = min
|
||||
(
|
||||
k[cellI]/epsilon[cellI],
|
||||
cps*pow(k[cellI], 1.5)/epsilon[cellI]/(UrelMag + SMALL)
|
||||
);
|
||||
const scalar tTurbLoc =
|
||||
min(k/epsilon, cps*pow(k, 1.5)/epsilon/(UrelMag + SMALL));
|
||||
|
||||
|
||||
// Parcel is perturbed by the turbulence
|
||||
if (dt < tTurbLoc)
|
||||
@ -124,8 +123,8 @@ Foam::vector Foam::GradientDispersionRAS<CloudType>::update
|
||||
{
|
||||
tTurb = 0.0;
|
||||
|
||||
scalar sigma = sqrt(2.0*k[cellI]/3.0);
|
||||
vector dir = -gradk[cellI]/(mag(gradk[cellI]) + SMALL);
|
||||
scalar sigma = sqrt(2.0*k/3.0);
|
||||
vector dir = -gradk/(mag(gradk) + SMALL);
|
||||
|
||||
// Numerical Recipes... Ch. 7. Random Numbers...
|
||||
scalar x1 = 0.0;
|
||||
|
||||
@ -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
|
||||
@ -72,16 +72,15 @@ Foam::vector Foam::StochasticDispersionRAS<CloudType>::update
|
||||
|
||||
const scalar cps = 0.16432;
|
||||
|
||||
const volScalarField& k = *this->kPtr_;
|
||||
const volScalarField& epsilon = *this->epsilonPtr_;
|
||||
const scalar k = this->kPtr_->internalField()[cellI];
|
||||
const scalar epsilon =
|
||||
this->epsilonPtr_->internalField()[cellI] + ROOTVSMALL;
|
||||
|
||||
const scalar UrelMag = mag(U - Uc - UTurb);
|
||||
|
||||
const scalar tTurbLoc = min
|
||||
(
|
||||
k[cellI]/epsilon[cellI],
|
||||
cps*pow(k[cellI], 1.5)/epsilon[cellI]/(UrelMag + SMALL)
|
||||
);
|
||||
const scalar tTurbLoc =
|
||||
min(k/epsilon, cps*pow(k, 1.5)/epsilon/(UrelMag + SMALL));
|
||||
|
||||
|
||||
// Parcel is perturbed by the turbulence
|
||||
if (dt < tTurbLoc)
|
||||
@ -92,7 +91,7 @@ Foam::vector Foam::StochasticDispersionRAS<CloudType>::update
|
||||
{
|
||||
tTurb = 0.0;
|
||||
|
||||
scalar sigma = sqrt(2.0*k[cellI]/3.0);
|
||||
scalar sigma = sqrt(2.0*k/3.0);
|
||||
vector dir = 2.0*rnd.sample01<vector>() - vector::one;
|
||||
dir /= mag(dir) + SMALL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user