ENH: Function object updates

This commit is contained in:
andy
2014-01-03 10:37:08 +00:00
parent f724ce787e
commit 659249064f
36 changed files with 378 additions and 386 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -227,15 +227,12 @@ void Foam::forceCoeffs::write()
<< obr_.time().value() << tab << Cm << tab << Cd
<< tab << Cl << tab << Clf << tab << Clr << endl;
if (log_)
{
Info<< type() << " " << name_ << " output:" << nl
<< " Cm = " << Cm << nl
<< " Cd = " << Cd << nl
<< " Cl = " << Cl << nl
<< " Cl(f) = " << Clf << nl
<< " Cl(r) = " << Clr << endl;
}
Info(log_)<< type() << " " << name_ << " output:" << nl
<< " Cm = " << Cm << nl
<< " Cd = " << Cd << nl
<< " Cl = " << Cl << nl
<< " Cl(f) = " << Clf << nl
<< " Cl(r) = " << Clr << endl;
if (nBin_ > 1)
{
@ -262,10 +259,7 @@ void Foam::forceCoeffs::write()
file(1) << endl;
}
if (log_)
{
Info<< endl;
}
Info(log_)<< endl;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -391,19 +391,17 @@ void Foam::forces::applyBins
void Foam::forces::writeForces()
{
if (log_)
{
Info<< type() << " " << name_ << " output:" << nl
<< " sum of forces:" << nl
<< " pressure : " << sum(force_[0]) << nl
<< " viscous : " << sum(force_[1]) << nl
<< " porous : " << sum(force_[2]) << nl
<< " sum of moments:" << nl
<< " pressure : " << sum(moment_[0]) << nl
<< " viscous : " << sum(moment_[1]) << nl
<< " porous : " << sum(moment_[2])
<< endl;
}
Info(log_)
<< type() << " " << name_ << " output:" << nl
<< " sum of forces:" << nl
<< " pressure : " << sum(force_[0]) << nl
<< " viscous : " << sum(force_[1]) << nl
<< " porous : " << sum(force_[2]) << nl
<< " sum of moments:" << nl
<< " pressure : " << sum(moment_[0]) << nl
<< " viscous : " << sum(moment_[1]) << nl
<< " porous : " << sum(moment_[2])
<< endl;
file(0) << obr_.time().value() << tab << setw(1) << '['
<< sum(force_[0]) << setw(1) << ','
@ -642,10 +640,7 @@ void Foam::forces::read(const dictionary& dict)
log_ = dict.lookupOrDefault<Switch>("log", false);
if (log_)
{
Info<< type() << " " << name_ << ":" << nl;
}
Info(log_)<< type() << " " << name_ << ":" << nl;
directForceDensity_ = dict.lookupOrDefault("directForceDensity", false);
@ -809,10 +804,7 @@ void Foam::forces::write()
writeBins();
if (log_)
{
Info<< endl;
}
Info(log_)<< endl;
}
}