mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Fixing solidProperties New construtctor when defaultCoeffs is false
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-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -57,19 +57,7 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New(Istream& is)
|
|||||||
}
|
}
|
||||||
else if (coeffs == "coeffs")
|
else if (coeffs == "coeffs")
|
||||||
{
|
{
|
||||||
IstreamConstructorTable::iterator cstrIter =
|
return autoPtr<solidProperties>(new solidProperties(is));
|
||||||
IstreamConstructorTablePtr_->find(solidType);
|
|
||||||
|
|
||||||
if (cstrIter == IstreamConstructorTablePtr_->end())
|
|
||||||
{
|
|
||||||
FatalErrorIn("solidProperties::New(Istream&)")
|
|
||||||
<< "Unknown solidProperties type " << solidType << nl << nl
|
|
||||||
<< "Valid solidProperties types are :" << endl
|
|
||||||
<< IstreamConstructorTablePtr_->sortedToc()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return autoPtr<solidProperties>(cstrIter()(is));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -116,19 +104,13 @@ Foam::autoPtr<Foam::solidProperties> Foam::solidProperties::New
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
return autoPtr<solidProperties>
|
||||||
dictionaryConstructorTablePtr_->find(solidType);
|
(
|
||||||
|
new solidProperties
|
||||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
(
|
||||||
{
|
dict.subDict(solidType + "Coeffs")
|
||||||
FatalErrorIn("solidProperties::New(const dictionary&)")
|
)
|
||||||
<< "Unknown solidProperties type " << solidType << nl << nl
|
);
|
||||||
<< "Valid solidProperties types are :" << endl
|
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< exit(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return autoPtr<solidProperties>(cstrIter()(dict));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,16 @@ solids
|
|||||||
{
|
{
|
||||||
C
|
C
|
||||||
{
|
{
|
||||||
defaultCoeffs yes;
|
defaultCoeffs no;
|
||||||
|
// if defaultCoeffs no properties should be :
|
||||||
|
CCoeffs
|
||||||
|
{
|
||||||
|
rho 2010;
|
||||||
|
Cp 710;
|
||||||
|
K 0.04;
|
||||||
|
Hf 0;
|
||||||
|
emissivity 1.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ash
|
ash
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user