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
Branches
Tags
No related merge requests found
......@@ -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;
}
......
......@@ -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();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment