ENH: reactingParcelFoam: allow to run single species

This commit is contained in:
sergio
2020-10-26 10:19:56 -07:00
committed by Sergio Ferraris
parent f98633e427
commit 384b9f8100
2 changed files with 10 additions and 5 deletions

View File

@ -11,7 +11,11 @@ basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y(); PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.get<word>("inertSpecie")); const word inertSpecie(thermo.get<word>("inertSpecie"));
if (!composition.species().found(inertSpecie)) if
(
!composition.species().found(inertSpecie)
&& composition.species().size() > 0
)
{ {
FatalIOErrorIn(args.executable().c_str(), thermo) FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species " << "Inert specie " << inertSpecie << " not found in available species "

View File

@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -85,11 +86,11 @@ void Foam::phaseProperties::reorder(const wordList& specieNames)
if (!found) if (!found)
{ {
FatalErrorInFunction WarningInFunction
<< "Could not find specie " << names0[i] << "Could not find specie " << names0[i]
<< " in list " << names_ << " in list " << names_
<< " for phase " << phaseTypeNames[phase_] << " for phase " << phaseTypeNames[phase_]
<< exit(FatalError); << nl;
} }
} }
} }
@ -114,11 +115,11 @@ void Foam::phaseProperties::setCarrierIds
} }
if (carrierIds_[i] == -1) if (carrierIds_[i] == -1)
{ {
FatalErrorInFunction WarningInFunction
<< "Could not find carrier specie " << names_[i] << "Could not find carrier specie " << names_[i]
<< " in species list" << nl << " in species list" << nl
<< "Available species are: " << nl << carrierNames << nl << "Available species are: " << nl << carrierNames << nl
<< exit(FatalError); << nl;
} }
} }
} }