From 30ea7d6134f82f7e21d837af60a099c576df2957 Mon Sep 17 00:00:00 2001
From: sergio <s.ferraris@opencfd.co.uk>
Date: Tue, 10 Nov 2020 09:17:21 -0800
Subject: [PATCH] BUG: Make volUpdateType default to constRho particle. Fixes
 #1916

---
 .../Templates/ReactingParcel/ReactingParcelI.H    | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H
index 033b34cd107..f625bc50d31 100644
--- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H
+++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H
@@ -61,26 +61,15 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
     ParcelType::constantProperties(parentDict),
     pMin_(this->dict_, "pMin", 1000.0),
     constantVolume_(this->dict_, "constantVolume", false),
-    volUpdateType_(this->dict_, "volumeUpdateMethod")
+    volUpdateType_(this->dict_, "volumeUpdateMethod", volumeUpadteType::mConstRho)
 {
     // If constantVolume found use it
     if (this->dict_.found("constantVolume"))
     {
         volUpdateType_.setValue(mUndefined);
     }
-    else
+    else if (this->dict_.found("volumeUpdateMethod"))
     {
-        if (!this->dict_.found("volumeUpdateMethod"))
-        {
-            FatalErrorInFunction
-                << "Either 'constantVolume' or 'volumeUpdateMethod' " << nl
-                << " must be provided. " << nl
-                << " The new keyword is 'volumeUpdateMethod'. " << nl
-                << " Available methods are  : " << nl
-                << " constantRho, constantVolume or updateRhoAndVol. " << nl
-                << " 'constantVolume' is either true/false " << nl
-                << nl << exit(FatalError);
-        }
         const word volumeUpdateMethod
         (
             this->dict_.getWord("volumeUpdateMethod")
-- 
GitLab