Skip to content
Snippets Groups Projects
Commit 3a1c19f2 authored by mattijs's avatar mattijs
Browse files

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

parents 44e65ecc 5ed77670
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -95,7 +95,9 @@ Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled ...@@ -95,7 +95,9 @@ Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled
const vector& r = p.position(); const vector& r = p.position();
// Coriolis and centrifugal acceleration terms // 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; return value;
} }
......
...@@ -144,11 +144,21 @@ void Foam::fieldAverage::initialize() ...@@ -144,11 +144,21 @@ void Foam::fieldAverage::initialize()
} }
} }
} }
// ensure first averaging works unconditionally
prevTimeIndex_ = -1;
initialised_ = true;
} }
void Foam::fieldAverage::calcAverages() void Foam::fieldAverage::calcAverages()
{ {
if (!initialised_)
{
initialize();
}
const label currentTimeIndex = const label currentTimeIndex =
static_cast<const fvMesh&>(obr_).time().timeIndex(); static_cast<const fvMesh&>(obr_).time().timeIndex();
...@@ -374,16 +384,6 @@ void Foam::fieldAverage::execute() ...@@ -374,16 +384,6 @@ void Foam::fieldAverage::execute()
{ {
if (active_) if (active_)
{ {
if (!initialised_)
{
initialize();
// ensure first averaging works unconditionally
prevTimeIndex_ = -1;
initialised_ = true;
}
calcAverages(); calcAverages();
} }
} }
...@@ -397,16 +397,6 @@ void Foam::fieldAverage::write() ...@@ -397,16 +397,6 @@ void Foam::fieldAverage::write()
{ {
if (active_) if (active_)
{ {
if (!initialised_)
{
initialize();
// ensure first averaging works unconditionally
prevTimeIndex_ = -1;
initialised_ = true;
}
calcAverages(); calcAverages();
writeAverages(); writeAverages();
writeAveragingProperties(); writeAveragingProperties();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment