rework input

This commit is contained in:
Tim MJ Nijssen
2022-10-24 12:21:29 +02:00
parent 0fdb464d73
commit 2aa5c7880b
3 changed files with 24 additions and 22 deletions

View File

@ -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:]

View File

@ -70,8 +70,8 @@ ParmarBassetForce::ParmarBassetForce
U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
UsFieldName_(propsDict_.lookup("granVelFieldName")),
Us_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
nInt_(readLabel(propsDict_.lookup("nIntegral"))),
discOrder_(readLabel(propsDict_.lookup("discretisationOrder"))),
nInt_(propsDict_.lookupOrDefault<int>("nIntegral", -1)),
discOrder_(propsDict_.lookupOrDefault<int>("discretisationOrder", 1)),
ddtUrelHistSize_(nInt_+discOrder_),
rHistSize_(nInt_),
FHistSize_(2*discOrder_),
@ -115,16 +115,6 @@ ParmarBassetForce::ParmarBassetForce
)
)
{
// allocate particle properties
particleCloud_.registerParticleProperty<double**>(ddtUrelHistRegName_,3*ddtUrelHistSize_,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( rHistRegName_, rHistSize_,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( FHistRegName_, 6*FHistSize_,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( gH0RegName_, 1 ,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( tRefRegName_, 1 ,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( mRefRegName_, 1 ,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( 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<double**>(ddtUrelHistRegName_,3*ddtUrelHistSize_,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( rHistRegName_, rHistSize_,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( FHistRegName_, 6*FHistSize_,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( gH0RegName_, 1 ,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( tRefRegName_, 1 ,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( mRefRegName_, 1 ,NOTONCPU,false);
particleCloud_.registerParticleProperty<double**>( 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

View File

@ -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_;