mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
update handling of model options in ShirgaonkarIB*
make options const bool if possible and bring in line with rest of code, i.e. read values from dict already in initializer list
This commit is contained in:
@ -67,7 +67,7 @@ ShirgaonkarIB::ShirgaonkarIB
|
||||
verbose_(propsDict_.found("verbose")),
|
||||
twoDimensional_(propsDict_.found("twoDimensional")),
|
||||
depth_(1),
|
||||
multisphere_(false), // drag for a multisphere particle
|
||||
multisphere_(propsDict_.found("multisphere")), // drag for a multisphere particle
|
||||
velFieldName_(propsDict_.lookup("velFieldName")),
|
||||
U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
|
||||
pressureFieldName_(propsDict_.lookup("pressureFieldName")),
|
||||
@ -87,9 +87,6 @@ ShirgaonkarIB::ShirgaonkarIB
|
||||
Info << "depth of domain is assumed to be :" << depth_ << endl;
|
||||
}
|
||||
|
||||
// Switch to initiate the multisphere calculation
|
||||
if(propsDict_.found("multisphere")) multisphere_=true;
|
||||
|
||||
// init force sub model
|
||||
setForceSubModels(propsDict_);
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ private:
|
||||
|
||||
bool depth_;
|
||||
|
||||
bool multisphere_;
|
||||
const bool multisphere_;
|
||||
|
||||
word velFieldName_;
|
||||
|
||||
|
||||
@ -63,31 +63,27 @@ ShirgaonkarIBTorque::ShirgaonkarIBTorque
|
||||
:
|
||||
forceModel(dict,sm),
|
||||
propsDict_(dict.subDict(typeName + "Props")),
|
||||
verbose_(false),
|
||||
twoDimensional_(false),
|
||||
verbose_(propsDict_.found("verbose")),
|
||||
twoDimensional_(propsDict_.found("twoDimensional")),
|
||||
depth_(1),
|
||||
velFieldName_(propsDict_.lookup("velFieldName")),
|
||||
U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
|
||||
pressureFieldName_(propsDict_.lookup("pressureFieldName")),
|
||||
p_(sm.mesh().lookupObject<volScalarField> (pressureFieldName_)),
|
||||
useTorque_(false)
|
||||
useTorque_(propsDict_.found("useTorque"))
|
||||
{
|
||||
//Append the field names to be probed
|
||||
particleCloud_.probeM().initialize(typeName, typeName+".logDat");
|
||||
particleCloud_.probeM().vectorFields_.append("dragForce"); //first entry must the be the force
|
||||
particleCloud_.probeM().writeHeader();
|
||||
|
||||
if (propsDict_.found("verbose")) verbose_=true;
|
||||
if (propsDict_.found("twoDimensional"))
|
||||
if (twoDimensional_)
|
||||
{
|
||||
twoDimensional_=true;
|
||||
depth_ = propsDict_.lookup("depth");
|
||||
Info << "2-dimensional simulation - make sure DEM side is 2D" << endl;
|
||||
Info << "depth of domain is assumed to be :" << depth_ << endl;
|
||||
}
|
||||
|
||||
if(propsDict_.found("useTorque")) useTorque_ = true;
|
||||
|
||||
// init force sub model
|
||||
setForceSubModels(propsDict_);
|
||||
|
||||
|
||||
@ -60,9 +60,9 @@ class ShirgaonkarIBTorque
|
||||
private:
|
||||
dictionary propsDict_;
|
||||
|
||||
bool verbose_;
|
||||
const bool verbose_;
|
||||
|
||||
bool twoDimensional_;
|
||||
const bool twoDimensional_;
|
||||
|
||||
bool depth_;
|
||||
|
||||
@ -74,7 +74,7 @@ private:
|
||||
|
||||
const volScalarField& p_;
|
||||
|
||||
bool useTorque_;
|
||||
const bool useTorque_;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user