Skip to content
Snippets Groups Projects
Commit 96b0bce8 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: forces function object - made user selection clearer when running

parent 5610da9f
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) 2015-2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 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();
......
......@@ -393,7 +393,7 @@ public:
//- Destructor
virtual ~forces();
virtual ~forces() = default;
// Member Functions
......
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