From cad01fea732896c0b0afc7c47ba37dff25e7486b Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Mon, 11 Feb 2019 09:22:26 +0000 Subject: [PATCH] ENH: forces function object - made user selection clearer when running --- src/functionObjects/forces/forces/forces.C | 13 +++++-------- src/functionObjects/forces/forces/forces.H | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/functionObjects/forces/forces/forces.C b/src/functionObjects/forces/forces/forces.C index 8a2fbde6e28..79b88b3d840 100644 --- a/src/functionObjects/forces/forces/forces.C +++ b/src/functionObjects/forces/forces/forces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2015-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -802,12 +802,6 @@ Foam::functionObjects::forces::forces } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::functionObjects::forces::~forces() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::functionObjects::forces::read(const dictionary& dict) @@ -840,11 +834,13 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) // Reference density needed for incompressible calculations if (rhoName_ == "rhoInf") { - dict.readEntry("rhoInf", rhoRef_); + rhoRef_ = dict.get<scalar>("rhoInf"); + Info<< " Freestream density (rhoInf) set to " << rhoRef_ << endl; } // Reference pressure, 0 by default pRef_ = dict.lookupOrDefault<scalar>("pRef", 0); + Info<< " Reference pressure (pRef) set to " << pRef_ << endl; } coordSys_.clear(); @@ -902,6 +898,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) } else { + Info<< " Employing " << nBin_ << " bins" << endl; binDict.readEntry("cumulative", binCumulative_); binDict.readEntry("direction", binDir_); binDir_.normalise(); diff --git a/src/functionObjects/forces/forces/forces.H b/src/functionObjects/forces/forces/forces.H index 905a3652b7a..be28a40ada2 100644 --- a/src/functionObjects/forces/forces/forces.H +++ b/src/functionObjects/forces/forces/forces.H @@ -393,7 +393,7 @@ public: //- Destructor - virtual ~forces(); + virtual ~forces() = default; // Member Functions -- GitLab