From 614b33f3e1b669b8ed06c209cf48245cc8e1f323 Mon Sep 17 00:00:00 2001 From: sergio <sergio> Date: Mon, 19 Jun 2017 12:42:03 -0700 Subject: [PATCH] pRef is not required (default 0.0) when calcTotal flag is true. --- src/functionObjects/field/pressure/pressure.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functionObjects/field/pressure/pressure.C b/src/functionObjects/field/pressure/pressure.C index c7cd724bc48..b73ebffcfc3 100644 --- a/src/functionObjects/field/pressure/pressure.C +++ b/src/functionObjects/field/pressure/pressure.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -249,7 +249,7 @@ bool Foam::functionObjects::pressure::read(const dictionary& dict) dict.lookup("calcTotal") >> calcTotal_; if (calcTotal_) { - dict.lookup("pRef") >> pRef_; + pRef_ = dict.lookupOrDefault<scalar>("pRef", 0.0); } dict.lookup("calcCoeff") >> calcCoeff_; -- GitLab