From 384b9f8100c43119e5666fe3cfd6ba0dcb509ecc Mon Sep 17 00:00:00 2001 From: sergio <s.ferraris@opencfd.co.uk> Date: Mon, 26 Oct 2020 10:19:56 -0700 Subject: [PATCH] ENH: reactingParcelFoam: allow to run single species --- .../solvers/lagrangian/reactingParcelFoam/createFields.H | 6 +++++- .../phaseProperties/phaseProperties/phaseProperties.C | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index eee7772c233..6984cc61781 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -11,7 +11,11 @@ basicSpecieMixture& composition = thermo.composition(); PtrList<volScalarField>& Y = composition.Y(); 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) << "Inert specie " << inertSpecie << " not found in available species " diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C index 35076e8718b..a610389b914 100644 --- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C +++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -85,11 +86,11 @@ void Foam::phaseProperties::reorder(const wordList& specieNames) if (!found) { - FatalErrorInFunction + WarningInFunction << "Could not find specie " << names0[i] << " in list " << names_ << " for phase " << phaseTypeNames[phase_] - << exit(FatalError); + << nl; } } } @@ -114,11 +115,11 @@ void Foam::phaseProperties::setCarrierIds } if (carrierIds_[i] == -1) { - FatalErrorInFunction + WarningInFunction << "Could not find carrier specie " << names_[i] << " in species list" << nl << "Available species are: " << nl << carrierNames << nl - << exit(FatalError); + << nl; } } } -- GitLab