Skip to content
Snippets Groups Projects
Commit e646218a authored by Sergio Ferraris's avatar Sergio Ferraris Committed by Andrew Heather
Browse files

BUG: Fixing reading of volumeUpdateMethod


Signed-off-by: default avatarKutalmis Bercin <kutalmis.bercin@esi-group.com>
parent ba4a675c
1 merge request!412TUT: Alltest: Corrections
......@@ -61,20 +61,27 @@ inline Foam::ReactingParcel<ParcelType>::constantProperties::constantProperties
ParcelType::constantProperties(parentDict),
pMin_(this->dict_, "pMin", 1000.0),
constantVolume_(this->dict_, "constantVolume", false),
volUpdateType_
(
this->dict_,
"volumeUpdateMethod",
volumeUpdateType::mConstRho
)
volUpdateType_(this->dict_, "volumeUpdateMethod")
{
// If constantVolume found use it
if (this->dict_.found("constantVolume"))
{
volUpdateType_.setValue(mUndefined);
}
else if (this->dict_.found("volumeUpdateMethod"))
else
{
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")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment