allow omission of diffCoeffModel in couplingProperties dict

if 'diffCoeffModel' is not defined in couplingProperties, create an
instance of noDiffCoeff ("off") and also do not try to read 'D' from
transportProperties dict
This commit is contained in:
danielque
2021-12-01 14:50:37 +01:00
parent 60df64826a
commit a2f9772ce3
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ diffCoeffModel::diffCoeffModel
)
{
// build constant fields for single phase case
if (!particleCloud_.multiphase())
if (!particleCloud_.multiphase() && dict_.found("diffCoeffModel"))
{
D0Field_ = volScalarField
(

View File

@ -37,7 +37,7 @@ autoPtr<diffCoeffModel> diffCoeffModel::New
{
word diffCoeffModelType
(
dict.lookup("diffCoeffModel")
dict.lookupOrDefault<word>("diffCoeffModel","off")
);
Info<< "Selecting diffCoeffModel "