mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
retain backward compatibility with OF4
This commit is contained in:
@ -54,7 +54,11 @@ FinesFields::FinesFields
|
||||
velFieldName_(propsDict_.lookupOrDefault<word>("velFieldName","U")),
|
||||
U_(sm.mesh().lookupObject<volVectorField> (velFieldName_)),
|
||||
voidfractionFieldName_(propsDict_.lookupOrDefault<word>("voidfractionFieldName","voidfraction")),
|
||||
#if OPENFOAM_VERSION_MAJOR < 5
|
||||
voidfraction_(const_cast<volScalarField&>(sm.mesh().lookupObject<volScalarField>(voidfractionFieldName_))),
|
||||
#else
|
||||
voidfraction_(sm.mesh().lookupObjectRef<volScalarField> (voidfractionFieldName_)),
|
||||
#endif
|
||||
UsFieldName_(propsDict_.lookupOrDefault<word>("granVelFieldName","Us")),
|
||||
UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
|
||||
pFieldName_(propsDict_.lookupOrDefault<word>("pFieldName","p")),
|
||||
|
||||
@ -102,7 +102,7 @@ particleCellVolume::particleCellVolume
|
||||
if(writeToFile_)
|
||||
{
|
||||
fileName path(particleCloud_.IOM().createTimeDir("postProcessing/particleCellVolume"));
|
||||
filePtr_ = new OFstream(path/"particleCellVolume.txt");
|
||||
filePtr_.set(new OFstream(path/"particleCellVolume.txt"));
|
||||
filePtr_() << "# time | total particle volume in cells | total volume of cells with particles | average volume fraction | min(voidfraction) | max(voidfraction)" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ volWeightedAverage::volWeightedAverage
|
||||
if(writeToFile_)
|
||||
{
|
||||
fileName path(particleCloud_.IOM().createTimeDir("postProcessing/volWeightedAverage"));
|
||||
filePtr_ = new OFstream(path/"volWeightedAverage.txt");
|
||||
filePtr_.set(new OFstream(path/"volWeightedAverage.txt"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user