Rationalized the keyword to specify a file name in a dictionary to 'file'
e.g. in tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/0/T
hot
{
type externalCoupledTemperature;
commsDir "${FOAM_CASE}/comms";
file "data";
initByExternal yes;
log true;
value uniform 307.75; // 34.6 degC
}
Previously both 'file' and 'fileName' were used inconsistently in different
classes and given that there is no confusion or ambiguity introduced by using
the simpler 'file' rather than 'fileName' this change simplifies the use and
maintenance of OpenFOAM.
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
|||||||
argList::noBanner();
|
argList::noBanner();
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.insert("fileName .. fileNameN");
|
argList::validArgs.insert("fileName .. fileNameN");
|
||||||
argList::addOption("istream", "fileName", "test Istream values");
|
argList::addOption("istream", "file", "test Istream values");
|
||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -696,7 +696,7 @@ int main(int argc, char *argv[])
|
|||||||
Foam::argList::addOption
|
Foam::argList::addOption
|
||||||
(
|
(
|
||||||
"outFile",
|
"outFile",
|
||||||
"fileName",
|
"file",
|
||||||
"name of the file to save the simplified surface to"
|
"name of the file to save the simplified surface to"
|
||||||
);
|
);
|
||||||
#include "addDictOption.H"
|
#include "addDictOption.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -93,7 +93,7 @@ Foam::interpolation2DTable<Type>::interpolation2DTable(const dictionary& dict)
|
|||||||
:
|
:
|
||||||
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
|
List<Tuple2<scalar, List<Tuple2<scalar, Type>>>>(),
|
||||||
boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))),
|
boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))),
|
||||||
fileName_(dict.lookup("fileName")),
|
fileName_(dict.lookup("file")),
|
||||||
reader_(tableReader<Type>::New(dict))
|
reader_(tableReader<Type>::New(dict))
|
||||||
{
|
{
|
||||||
readTable();
|
readTable();
|
||||||
@ -445,7 +445,7 @@ void Foam::interpolation2DTable<Type>::checkOrder() const
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::interpolation2DTable<Type>::write(Ostream& os) const
|
void Foam::interpolation2DTable<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os.writeKeyword("fileName")
|
os.writeKeyword("file")
|
||||||
<< fileName_ << token::END_STATEMENT << nl;
|
<< fileName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("outOfBounds")
|
os.writeKeyword("outOfBounds")
|
||||||
<< boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl;
|
<< boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -284,7 +284,7 @@ Foam::interpolationLookUpTable<Type>::interpolationLookUpTable
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
List<scalarField>(),
|
List<scalarField>(),
|
||||||
fileName_(fileName(dict.lookup("fileName")).expand()),
|
fileName_(fileName(dict.lookup("file")).expand()),
|
||||||
dim_(0),
|
dim_(0),
|
||||||
min_(0.0),
|
min_(0.0),
|
||||||
delta_(0.0),
|
delta_(0.0),
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,7 +97,7 @@ Foam::interpolationTable<Type>::interpolationTable(const dictionary& dict)
|
|||||||
:
|
:
|
||||||
List<Tuple2<scalar, Type>>(),
|
List<Tuple2<scalar, Type>>(),
|
||||||
boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))),
|
boundsHandling_(wordToBoundsHandling(dict.lookup("outOfBounds"))),
|
||||||
fileName_(dict.lookup("fileName")),
|
fileName_(dict.lookup("file")),
|
||||||
reader_(tableReader<Type>::New(dict))
|
reader_(tableReader<Type>::New(dict))
|
||||||
{
|
{
|
||||||
readTable();
|
readTable();
|
||||||
@ -229,7 +229,7 @@ void Foam::interpolationTable<Type>::check() const
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::interpolationTable<Type>::write(Ostream& os) const
|
void Foam::interpolationTable<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os.writeKeyword("fileName")
|
os.writeKeyword("file")
|
||||||
<< fileName_ << token::END_STATEMENT << nl;
|
<< fileName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("outOfBounds")
|
os.writeKeyword("outOfBounds")
|
||||||
<< boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl;
|
<< boundsHandlingToWord(boundsHandling_) << token::END_STATEMENT << nl;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -214,7 +214,7 @@ Foam::Function1Types::CSV<Type>::CSV
|
|||||||
componentColumns_(coeffs_.lookup("componentColumns")),
|
componentColumns_(coeffs_.lookup("componentColumns")),
|
||||||
separator_(coeffs_.lookupOrDefault<string>("separator", string(","))[0]),
|
separator_(coeffs_.lookupOrDefault<string>("separator", string(","))[0]),
|
||||||
mergeSeparators_(readBool(coeffs_.lookup("mergeSeparators"))),
|
mergeSeparators_(readBool(coeffs_.lookup("mergeSeparators"))),
|
||||||
fName_(coeffs_.lookup("fileName"))
|
fName_(coeffs_.lookup("file"))
|
||||||
{
|
{
|
||||||
if (componentColumns_.size() != pTraits<Type>::nComponents)
|
if (componentColumns_.size() != pTraits<Type>::nComponents)
|
||||||
{
|
{
|
||||||
@ -293,7 +293,7 @@ void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
|
|||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("mergeSeparators") << mergeSeparators_
|
os.writeKeyword("mergeSeparators") << mergeSeparators_
|
||||||
<< token::END_STATEMENT << nl;
|
<< token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("fileName") << fName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("file") << fName_ << token::END_STATEMENT << nl;
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
os << decrIndent << indent << token::END_BLOCK << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -38,7 +38,7 @@ Foam::Function1Types::TableFile<Type>::TableFile
|
|||||||
fName_("none")
|
fName_("none")
|
||||||
{
|
{
|
||||||
const dictionary coeffs(dict.subDict(entryName + "Coeffs"));
|
const dictionary coeffs(dict.subDict(entryName + "Coeffs"));
|
||||||
coeffs.lookup("fileName") >> fName_;
|
coeffs.lookup("file") >> fName_;
|
||||||
|
|
||||||
fileName expandedFile(fName_);
|
fileName expandedFile(fName_);
|
||||||
IFstream is(expandedFile.expand());
|
IFstream is(expandedFile.expand());
|
||||||
@ -87,7 +87,7 @@ void Foam::Function1Types::TableFile<Type>::writeData(Ostream& os) const
|
|||||||
// the values themselves
|
// the values themselves
|
||||||
TableBase<Type>::writeEntries(os);
|
TableBase<Type>::writeEntries(os);
|
||||||
|
|
||||||
os.writeKeyword("fileName")<< fName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("file")<< fName_ << token::END_STATEMENT << nl;
|
||||||
os << decrIndent << indent << token::END_BLOCK << endl;
|
os << decrIndent << indent << token::END_BLOCK << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -497,7 +497,7 @@ externalCoupledMixedFvPatchField
|
|||||||
:
|
:
|
||||||
mixedFvPatchField<Type>(p, iF),
|
mixedFvPatchField<Type>(p, iF),
|
||||||
commsDir_(dict.lookup("commsDir")),
|
commsDir_(dict.lookup("commsDir")),
|
||||||
fName_(dict.lookup("fileName")),
|
fName_(dict.lookup("file")),
|
||||||
waitInterval_(dict.lookupOrDefault("waitInterval", 1)),
|
waitInterval_(dict.lookupOrDefault("waitInterval", 1)),
|
||||||
timeOut_(dict.lookupOrDefault("timeOut", 100*waitInterval_)),
|
timeOut_(dict.lookupOrDefault("timeOut", 100*waitInterval_)),
|
||||||
calcFrequency_(dict.lookupOrDefault("calcFrequency", 1)),
|
calcFrequency_(dict.lookupOrDefault("calcFrequency", 1)),
|
||||||
@ -809,7 +809,7 @@ void Foam::externalCoupledMixedFvPatchField<Type>::write(Ostream& os) const
|
|||||||
mixedFvPatchField<Type>::write(os);
|
mixedFvPatchField<Type>::write(os);
|
||||||
|
|
||||||
os.writeKeyword("commsDir") << commsDir_ << token::END_STATEMENT << nl;
|
os.writeKeyword("commsDir") << commsDir_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("fileName") << fName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("file") << fName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("waitInterval") << waitInterval_ << token::END_STATEMENT
|
os.writeKeyword("waitInterval") << waitInterval_ << token::END_STATEMENT
|
||||||
<< nl;
|
<< nl;
|
||||||
os.writeKeyword("timeOut") << timeOut_ << token::END_STATEMENT << nl;
|
os.writeKeyword("timeOut") << timeOut_ << token::END_STATEMENT << nl;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -123,7 +123,7 @@ bool Foam::functionObjects::abort::read(const dictionary& dict)
|
|||||||
action_ = nextWrite;
|
action_ = nextWrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dict.readIfPresent("fileName", abortFile_))
|
if (dict.readIfPresent("file", abortFile_))
|
||||||
{
|
{
|
||||||
abortFile_.expand();
|
abortFile_.expand();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -118,7 +118,7 @@ Usage
|
|||||||
|
|
||||||
|
|
||||||
Note
|
Note
|
||||||
- the table with name "fileName" should have the same units as the
|
- the table with name "file" should have the same units as the
|
||||||
secondary mass flow rate and kg/s for phi
|
secondary mass flow rate and kg/s for phi
|
||||||
- faceZone is the faces at the inlet of the cellzone, it needs to be
|
- faceZone is the faces at the inlet of the cellzone, it needs to be
|
||||||
created with flip map flags. It is used to integrate the net mass flow
|
created with flip map flags. It is used to integrate the net mass flow
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,7 @@ Foam::profileModel::profileModel(const dictionary& dict, const word& name)
|
|||||||
name_(name),
|
name_(name),
|
||||||
fName_(fileName::null)
|
fName_(fileName::null)
|
||||||
{
|
{
|
||||||
dict.readIfPresent("fileName", fName_);
|
dict.readIfPresent("file", fName_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -35,7 +35,7 @@ boundaryField
|
|||||||
{
|
{
|
||||||
type externalCoupledTemperature;
|
type externalCoupledTemperature;
|
||||||
commsDir "${FOAM_CASE}/comms";
|
commsDir "${FOAM_CASE}/comms";
|
||||||
fileName "data";
|
file "data";
|
||||||
initByExternal yes;
|
initByExternal yes;
|
||||||
log true;
|
log true;
|
||||||
value uniform 307.75; // 34.6 degC
|
value uniform 307.75; // 34.6 degC
|
||||||
@ -45,7 +45,7 @@ boundaryField
|
|||||||
{
|
{
|
||||||
type externalCoupledTemperature;
|
type externalCoupledTemperature;
|
||||||
commsDir "${FOAM_CASE}/comms";
|
commsDir "${FOAM_CASE}/comms";
|
||||||
fileName "data";
|
file "data";
|
||||||
initByExternal yes;
|
initByExternal yes;
|
||||||
log true;
|
log true;
|
||||||
value uniform 288.15; // 15 degC
|
value uniform 288.15; // 15 degC
|
||||||
|
|||||||
Reference in New Issue
Block a user