SchaefferFrictionalStress: phi input in deg as in JohnsonJacksonFrictionalStress

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1204
This commit is contained in:
Henry
2014-03-03 19:20:17 +00:00
committed by Andrew Heather
parent 078e4b6980
commit fd13ec635a
4 changed files with 29 additions and 13 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
@ -127,10 +127,12 @@ bool Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
Fr_.readIfPresent(coeffDict_);
eta_.readIfPresent(coeffDict_);
p_.readIfPresent(coeffDict_);
phi_.readIfPresent(coeffDict_);
Fr_.read(coeffDict_);
eta_.read(coeffDict_);
p_.read(coeffDict_);
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;
return true;
}

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
@ -57,7 +57,9 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer
frictionalStressModel(dict),
coeffDict_(dict.subDict(typeName + "Coeffs")),
phi_("phi", dimless, coeffDict_.lookup("phi"))
{}
{
phi_ *= constant::mathematical::pi/180.0;
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
@ -158,7 +160,8 @@ bool Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::read()
{
coeffDict_ <<= dict_.subDict(typeName + "Coeffs");
phi_.readIfPresent(coeffDict_);
phi_.read(coeffDict_);
phi_ *= constant::mathematical::pi/180.0;
return true;
}

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
@ -245,6 +245,13 @@ void Foam::dimensioned<Type>::replace
}
template<class Type>
void Foam::dimensioned<Type>::read(const dictionary& dict)
{
dict.lookup(name_) >> value_;
}
template<class Type>
bool Foam::dimensioned<Type>::readIfPresent(const dictionary& dict)
{

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
@ -159,21 +159,25 @@ public:
//- Return transpose.
dimensioned<Type> T() const;
//- Update the value of dimensioned<Type>
void read(const dictionary&);
//- Update the value of dimensioned<Type> if found in the dictionary.
bool readIfPresent(const dictionary&);
// I/O
//- Read using provided units. Only used during startup.
//- Read value from stream and units from dictionary
Istream& read(Istream& is, const dictionary&);
//- Read using provided units
//- Read value from stream and units from table
Istream& read(Istream& is, const HashTable<dimensionedScalar>&);
//- Read using system units
//- Read value from stream and units from system table
Istream& read(Istream& is);
// Member operators
//- Return a component as a dimensioned<cmptType>