Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2013-05-30 10:30:22 +01:00
2 changed files with 14 additions and 22 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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -95,7 +95,9 @@ Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled
const vector& r = p.position();
// Coriolis and centrifugal acceleration terms
value.Su() = mass*(2.0*(p.U() ^ omega) + (omega ^ (r ^ omega)));
value.Su() =
mass*(1.0 - p.rhoc()/p.rho())
*(2.0*(p.U() ^ omega) + (omega ^ (r ^ omega)));
return value;
}

View File

@ -144,11 +144,21 @@ void Foam::fieldAverage::initialize()
}
}
}
// ensure first averaging works unconditionally
prevTimeIndex_ = -1;
initialised_ = true;
}
void Foam::fieldAverage::calcAverages()
{
if (!initialised_)
{
initialize();
}
const label currentTimeIndex =
static_cast<const fvMesh&>(obr_).time().timeIndex();
@ -374,16 +384,6 @@ void Foam::fieldAverage::execute()
{
if (active_)
{
if (!initialised_)
{
initialize();
// ensure first averaging works unconditionally
prevTimeIndex_ = -1;
initialised_ = true;
}
calcAverages();
}
}
@ -397,16 +397,6 @@ void Foam::fieldAverage::write()
{
if (active_)
{
if (!initialised_)
{
initialize();
// ensure first averaging works unconditionally
prevTimeIndex_ = -1;
initialised_ = true;
}
calcAverages();
writeAverages();
writeAveragingProperties();