generalisedNewtonianViscosityModels: Updated and simplified reading of coefficients
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,24 +81,19 @@ read
|
||||
const dictionary& coeffs =
|
||||
viscosityProperties.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
coeffs.lookup("nuInf") >> nuInf_;
|
||||
nuInf_.read(coeffs);;
|
||||
|
||||
if (coeffs.found("tauStar"))
|
||||
{
|
||||
coeffs.lookup("tauStar") >> tauStar_;
|
||||
tauStar_.read(coeffs);
|
||||
}
|
||||
else
|
||||
{
|
||||
coeffs.lookup("k") >> k_;
|
||||
k_.read(coeffs);
|
||||
}
|
||||
|
||||
coeffs.lookup("n") >> n_;
|
||||
|
||||
a_ = coeffs.lookupOrDefault
|
||||
(
|
||||
"a",
|
||||
dimensionedScalar("a", dimless, 2)
|
||||
);
|
||||
n_.read(coeffs);
|
||||
a_.read(coeffs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -78,10 +78,10 @@ bool Foam::laminarModels::generalisedNewtonianViscosityModels::Casson::read
|
||||
const dictionary& coeffs =
|
||||
viscosityProperties.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
coeffs.lookup("m") >> m_;
|
||||
coeffs.lookup("tau0") >> tau0_;
|
||||
coeffs.lookup("nuMin_") >> nuMin_;
|
||||
coeffs.lookup("nuMax_") >> nuMax_;
|
||||
m_.read(coeffs);
|
||||
tau0_.read(coeffs);
|
||||
nuMin_.read(coeffs);
|
||||
nuMax_.read(coeffs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -81,18 +81,18 @@ read
|
||||
const dictionary& coeffs =
|
||||
viscosityProperties.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
coeffs.lookup("nuInf") >> nuInf_;
|
||||
nuInf_.read(coeffs);
|
||||
|
||||
if (coeffs.found("tauStar"))
|
||||
{
|
||||
coeffs.lookup("tauStar") >> tauStar_;
|
||||
tauStar_.read(coeffs);
|
||||
}
|
||||
else
|
||||
{
|
||||
coeffs.lookup("m") >> m_;
|
||||
m_.read(coeffs);
|
||||
}
|
||||
|
||||
coeffs.lookup("n") >> n_;
|
||||
n_.read(coeffs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -80,9 +80,9 @@ HerschelBulkley::read
|
||||
const dictionary& coeffs =
|
||||
viscosityProperties.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
coeffs.lookup("k") >> k_;
|
||||
coeffs.lookup("n") >> n_;
|
||||
coeffs.lookup("tau0") >> tau0_;
|
||||
k_.read(coeffs);
|
||||
n_.read(coeffs);
|
||||
tau0_.read(coeffs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2018-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -79,10 +79,10 @@ bool Foam::laminarModels::generalisedNewtonianViscosityModels::powerLaw::read
|
||||
const dictionary& coeffs =
|
||||
viscosityProperties.optionalSubDict(typeName + "Coeffs");
|
||||
|
||||
coeffs.lookup("k") >> k_;
|
||||
coeffs.lookup("n") >> n_;
|
||||
coeffs.lookup("nuMin") >> nuMin_;
|
||||
coeffs.lookup("nuMax") >> nuMax_;
|
||||
k_.read(coeffs);
|
||||
n_.read(coeffs);
|
||||
nuMin_.read(coeffs);
|
||||
nuMax_.read(coeffs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user