diff --git a/doc/forceModel_ParmarBassetForce.txt b/doc/forceModel_ParmarBassetForce.txt index bc022f53..a5e41730 100644 --- a/doc/forceModel_ParmarBassetForce.txt +++ b/doc/forceModel_ParmarBassetForce.txt @@ -30,12 +30,12 @@ ParmarBassetForceProps {U} = name of the finite volume fluid velocity field :ulb,l {Us} = name of the finite volume cell averaged particle velocity field :l -{scalar1} = number of timesteps considered in the near history :l -{scalar2} = (1 or 2) discretisation order of the far history differential equations :l +{scalar1} = number of timesteps considered in the near history (integer > 1):l +{scalar2} = (optional, default 1) discretisation order of the far history differential equations (1 or 2) :l {switch1} = (optional, default true) sub model switch, see "forceSubModel"_forceSubModel.html for details :l {switch2} = (optional, default false) sub model switch, see "forceSubModel"_forceSubModel.html for details :l {switch3} = (optional, default false) sub model switch, see "forceSubModel"_forceSubModel.html for details :l -{smoothingModel} = name of smoothing model for the dU/dt field :l +{smoothingModel} = name of smoothing model for the dUrel/dt field :l :ule [Examples:] diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ParmarBassetForce/ParmarBassetForce.C b/src/lagrangian/cfdemParticle/subModels/forceModel/ParmarBassetForce/ParmarBassetForce.C index 2446796b..6ccc631b 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/ParmarBassetForce/ParmarBassetForce.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ParmarBassetForce/ParmarBassetForce.C @@ -70,8 +70,8 @@ ParmarBassetForce::ParmarBassetForce U_(sm.mesh().lookupObject (velFieldName_)), UsFieldName_(propsDict_.lookup("granVelFieldName")), Us_(sm.mesh().lookupObject (UsFieldName_)), - nInt_(readLabel(propsDict_.lookup("nIntegral"))), - discOrder_(readLabel(propsDict_.lookup("discretisationOrder"))), + nInt_(propsDict_.lookupOrDefault("nIntegral", -1)), + discOrder_(propsDict_.lookupOrDefault("discretisationOrder", 1)), ddtUrelHistSize_(nInt_+discOrder_), rHistSize_(nInt_), FHistSize_(2*discOrder_), @@ -115,16 +115,6 @@ ParmarBassetForce::ParmarBassetForce ) ) { - - // allocate particle properties - particleCloud_.registerParticleProperty(ddtUrelHistRegName_,3*ddtUrelHistSize_,NOTONCPU,false); - particleCloud_.registerParticleProperty( rHistRegName_, rHistSize_,NOTONCPU,false); - particleCloud_.registerParticleProperty( FHistRegName_, 6*FHistSize_,NOTONCPU,false); - particleCloud_.registerParticleProperty( gH0RegName_, 1 ,NOTONCPU,false); - particleCloud_.registerParticleProperty( tRefRegName_, 1 ,NOTONCPU,false); - particleCloud_.registerParticleProperty( mRefRegName_, 1 ,NOTONCPU,false); - particleCloud_.registerParticleProperty( lRefRegName_, 1 ,NOTONCPU,false); - // init force sub model setForceSubModels(propsDict_); // define switches which can be read from dict @@ -139,6 +129,18 @@ ParmarBassetForce::ParmarBassetForce if (discOrder_ < 1 || discOrder_ > 2) FatalError << "Parmar Basset Force: Discretisation order > 2 not implemented!" << abort(FatalError); + if (nInt_ < 1) + FatalError << "Parmar Basset Force: nIntegral missing or invalid, must be > 1" << abort(FatalError); + + // allocate particle properties + particleCloud_.registerParticleProperty(ddtUrelHistRegName_,3*ddtUrelHistSize_,NOTONCPU,false); + particleCloud_.registerParticleProperty( rHistRegName_, rHistSize_,NOTONCPU,false); + particleCloud_.registerParticleProperty( FHistRegName_, 6*FHistSize_,NOTONCPU,false); + particleCloud_.registerParticleProperty( gH0RegName_, 1 ,NOTONCPU,false); + particleCloud_.registerParticleProperty( tRefRegName_, 1 ,NOTONCPU,false); + particleCloud_.registerParticleProperty( mRefRegName_, 1 ,NOTONCPU,false); + particleCloud_.registerParticleProperty( lRefRegName_, 1 ,NOTONCPU,false); + //Append the field names to be probed particleCloud_.probeM().initialize(typeName, typeName+".logDat"); particleCloud_.probeM().vectorFields_.append("ParmarBassetForce"); //first entry must the be the force diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/ParmarBassetForce/ParmarBassetForce.H b/src/lagrangian/cfdemParticle/subModels/forceModel/ParmarBassetForce/ParmarBassetForce.H index 1d89695d..122e9172 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/ParmarBassetForce/ParmarBassetForce.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/ParmarBassetForce/ParmarBassetForce.H @@ -59,23 +59,23 @@ class ParmarBassetForce private: dictionary propsDict_; - word velFieldName_; + const word velFieldName_; const volVectorField& U_; - word UsFieldName_; + const word UsFieldName_; const volVectorField& Us_; - label nInt_; //no of timesteps to solve full integral + const int nInt_; //no of timesteps to solve full integral - label discOrder_; //ODE discretisation order + const int discOrder_; //ODE discretisation order - label ddtUrelHistSize_; //no of timesteps to save ddtUrel history for + const int ddtUrelHistSize_; //no of timesteps to save ddtUrel history for - label rHistSize_; //no of timesteps to save r history for + const int rHistSize_; //no of timesteps to save r history for - label FHistSize_; //no of timesteps to save Flong history for + const int FHistSize_; //no of timesteps to save Flong history for const word ddtUrelHistRegName_;