diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index b23a6d2328..1dd26906b7 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -428,36 +428,43 @@ void Foam::forces::write() Info<< "forces output:" << nl << " forces(pressure, viscous)" << fm.first() << nl << " moment(pressure, viscous)" << fm.second() << nl; + } - forcesFilePtr_() << obr_.time().value() << tab << fm; + forcesFilePtr_() << obr_.time().value() << tab << fm; - if (localSystem_) + if (localSystem_) + { + forcesMoments fmLocal; + + fmLocal.first().first() = + coordSys_.localVector(fm.first().first()); + + fmLocal.first().second() = + coordSys_.localVector(fm.first().second()); + + fmLocal.second().first() = + coordSys_.localVector(fm.second().first()); + + fmLocal.second().second() = + coordSys_.localVector(fm.second().second()); + + forcesFilePtr_() << tab << fmLocal; + + if (log_) { - forcesMoments fmLocal; - - fmLocal.first().first() = - coordSys_.localVector(fm.first().first()); - - fmLocal.first().second() = - coordSys_.localVector(fm.first().second()); - - fmLocal.second().first() = - coordSys_.localVector(fm.second().first()); - - fmLocal.second().second() = - coordSys_.localVector(fm.second().second()); - - forcesFilePtr_() << tab << fmLocal; - - Info<< " local:" << nl << " forces(pressure, viscous)" << fmLocal.first() << nl << " moment(pressure, viscous)" << fmLocal.second() << nl; } + } - forcesFilePtr_() << endl; + + forcesFilePtr_() << endl; + + if (log_) + { Info<< endl; } } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C index 394e35e536..d5707fe8fd 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/multiComponentMixture/multiComponentMixture.C @@ -49,7 +49,8 @@ const ThermoType& Foam::multiComponentMixture::constructSpeciesData template void Foam::multiComponentMixture::correctMassFractions() { - volScalarField Yt("Yt", Y_[0]); + // It changes Yt patches to "calculated" + volScalarField Yt("Yt", 1.0*Y_[0]); for (label n=1; n