mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
WIP: Refactored forces/Coeffs to always use a co-ord system and simplified inputs [UNCHECKED]
This commit is contained in:
@ -47,32 +47,6 @@ namespace functionObjects
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
// Read vector and normalise if present, or set default
|
|
||||||
inline vector readVectorOrDefault
|
|
||||||
(
|
|
||||||
const dictionary& dict,
|
|
||||||
const word& key,
|
|
||||||
const vector::components axis
|
|
||||||
)
|
|
||||||
{
|
|
||||||
vector vec(Zero); // Zero initialise!
|
|
||||||
|
|
||||||
if (dict.readIfPresent(key, vec))
|
|
||||||
{
|
|
||||||
return normalised(vec);
|
|
||||||
}
|
|
||||||
|
|
||||||
vec[axis] = 1;
|
|
||||||
return vec;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::functionObjects::forceCoeffs::createFiles()
|
void Foam::functionObjects::forceCoeffs::createFiles()
|
||||||
@ -88,14 +62,19 @@ void Foam::functionObjects::forceCoeffs::createFiles()
|
|||||||
{
|
{
|
||||||
CdBinFilePtr_ = createFile("CdBin");
|
CdBinFilePtr_ = createFile("CdBin");
|
||||||
writeBinHeader("Drag coefficient bins", CdBinFilePtr_());
|
writeBinHeader("Drag coefficient bins", CdBinFilePtr_());
|
||||||
|
|
||||||
CsBinFilePtr_ = createFile("CsBin");
|
CsBinFilePtr_ = createFile("CsBin");
|
||||||
writeBinHeader("Side coefficient bins", CsBinFilePtr_());
|
writeBinHeader("Side coefficient bins", CsBinFilePtr_());
|
||||||
|
|
||||||
ClBinFilePtr_ = createFile("ClBin");
|
ClBinFilePtr_ = createFile("ClBin");
|
||||||
writeBinHeader("Lift coefficient bins", ClBinFilePtr_());
|
writeBinHeader("Lift coefficient bins", ClBinFilePtr_());
|
||||||
|
|
||||||
CmRollBinFilePtr_ = createFile("CmRollBin");
|
CmRollBinFilePtr_ = createFile("CmRollBin");
|
||||||
writeBinHeader("Roll moment coefficient bins", CmRollBinFilePtr_());
|
writeBinHeader("Roll moment coefficient bins", CmRollBinFilePtr_());
|
||||||
|
|
||||||
CmPitchBinFilePtr_ = createFile("CmPitchBin");
|
CmPitchBinFilePtr_ = createFile("CmPitchBin");
|
||||||
writeBinHeader("Moment coefficient bins", CmPitchBinFilePtr_());
|
writeBinHeader("Moment coefficient bins", CmPitchBinFilePtr_());
|
||||||
|
|
||||||
CmYawBinFilePtr_ = createFile("CmYawBin");
|
CmYawBinFilePtr_ = createFile("CmYawBin");
|
||||||
writeBinHeader("Yaw moment coefficient bins", CmYawBinFilePtr_());
|
writeBinHeader("Yaw moment coefficient bins", CmYawBinFilePtr_());
|
||||||
}
|
}
|
||||||
@ -110,12 +89,12 @@ void Foam::functionObjects::forceCoeffs::writeIntegratedHeader
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
writeHeader(os, "Force coefficients");
|
writeHeader(os, "Force coefficients");
|
||||||
writeHeaderValue(os, "dragDir", dragDir_);
|
writeHeaderValue(os, "dragDir", coordSys_.e1());
|
||||||
writeHeaderValue(os, "sideDir", sideDir_);
|
writeHeaderValue(os, "sideDir", coordSys_.e2());
|
||||||
writeHeaderValue(os, "liftDir", liftDir_);
|
writeHeaderValue(os, "liftDir", coordSys_.e3());
|
||||||
writeHeaderValue(os, "rollAxis", rollAxis_);
|
writeHeaderValue(os, "rollAxis", coordSys_.e1());
|
||||||
writeHeaderValue(os, "pitchAxis", pitchAxis_);
|
writeHeaderValue(os, "pitchAxis", coordSys_.e2());
|
||||||
writeHeaderValue(os, "yawAxis", yawAxis_);
|
writeHeaderValue(os, "yawAxis", coordSys_.e3());
|
||||||
writeHeaderValue(os, "magUInf", magUInf_);
|
writeHeaderValue(os, "magUInf", magUInf_);
|
||||||
writeHeaderValue(os, "lRef", lRef_);
|
writeHeaderValue(os, "lRef", lRef_);
|
||||||
writeHeaderValue(os, "Aref", Aref_);
|
writeHeaderValue(os, "Aref", Aref_);
|
||||||
@ -257,12 +236,6 @@ Foam::functionObjects::forceCoeffs::forceCoeffs
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
forces(name, runTime, dict),
|
forces(name, runTime, dict),
|
||||||
dragDir_(Zero),
|
|
||||||
sideDir_(Zero),
|
|
||||||
liftDir_(Zero),
|
|
||||||
rollAxis_(Zero),
|
|
||||||
pitchAxis_(Zero),
|
|
||||||
yawAxis_(Zero),
|
|
||||||
magUInf_(Zero),
|
magUInf_(Zero),
|
||||||
lRef_(Zero),
|
lRef_(Zero),
|
||||||
Aref_(Zero),
|
Aref_(Zero),
|
||||||
@ -275,6 +248,7 @@ Foam::functionObjects::forceCoeffs::forceCoeffs
|
|||||||
CmYawBinFilePtr_()
|
CmYawBinFilePtr_()
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
|
setCoordinateSystem(dict, "liftDir", "dragDir");
|
||||||
Info<< endl;
|
Info<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,15 +259,6 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
forces::read(dict);
|
forces::read(dict);
|
||||||
|
|
||||||
// Standard (default) definitions
|
|
||||||
dragDir_ = readVectorOrDefault(dict, "dragDir", vector::X);
|
|
||||||
sideDir_ = readVectorOrDefault(dict, "sideDir", vector::Y);
|
|
||||||
liftDir_ = readVectorOrDefault(dict, "liftDir", vector::Z);
|
|
||||||
rollAxis_ = readVectorOrDefault(dict, "rollAxis", vector::X);
|
|
||||||
pitchAxis_ = readVectorOrDefault(dict, "pitchAxis", vector::Y);
|
|
||||||
yawAxis_ = readVectorOrDefault(dict, "yawAxis", vector::Z);
|
|
||||||
|
|
||||||
|
|
||||||
// Free stream velocity magnitude
|
// Free stream velocity magnitude
|
||||||
dict.readEntry("magUInf", magUInf_);
|
dict.readEntry("magUInf", magUInf_);
|
||||||
|
|
||||||
@ -387,18 +352,22 @@ bool Foam::functionObjects::forceCoeffs::execute()
|
|||||||
scalar CmYawTot = 0;
|
scalar CmYawTot = 0;
|
||||||
|
|
||||||
const scalar pDyn = 0.5*rhoRef_*sqr(magUInf_);
|
const scalar pDyn = 0.5*rhoRef_*sqr(magUInf_);
|
||||||
|
|
||||||
// Avoid divide by zero in 2D cases
|
// Avoid divide by zero in 2D cases
|
||||||
const scalar momentScaling = 1.0/(Aref_*pDyn*lRef_ + SMALL);
|
const scalar momentScaling = 1.0/(Aref_*pDyn*lRef_ + SMALL);
|
||||||
const scalar forceScaling = 1.0/(Aref_*pDyn + SMALL);
|
const scalar forceScaling = 1.0/(Aref_*pDyn + SMALL);
|
||||||
|
|
||||||
forAll(liftCoeffs, i)
|
forAll(liftCoeffs, i)
|
||||||
{
|
{
|
||||||
dragCoeffs[i] = forceScaling*(force_[i] & dragDir_);
|
const Field<vector> localForce(coordSys_.localVector(force_[i]));
|
||||||
sideCoeffs[i] = forceScaling*(force_[i] & sideDir_);
|
const Field<vector> localMoment(coordSys_.localVector(moment_[i]));
|
||||||
liftCoeffs[i] = forceScaling*(force_[i] & liftDir_);
|
|
||||||
rollMomentCoeffs[i] = momentScaling*(moment_[i] & rollAxis_);
|
dragCoeffs[i] = forceScaling*(localForce.component(0));
|
||||||
pitchMomentCoeffs[i] = momentScaling*(moment_[i] & pitchAxis_);
|
sideCoeffs[i] = forceScaling*(localForce.component(1));
|
||||||
yawMomentCoeffs[i] = momentScaling*(moment_[i] & yawAxis_);
|
liftCoeffs[i] = forceScaling*(localForce.component(2));
|
||||||
|
rollMomentCoeffs[i] = momentScaling*(localMoment.component(0));
|
||||||
|
pitchMomentCoeffs[i] = momentScaling*(localMoment.component(1));
|
||||||
|
yawMomentCoeffs[i] = momentScaling*(localMoment.component(2));
|
||||||
|
|
||||||
CdTot += sum(dragCoeffs[i]);
|
CdTot += sum(dragCoeffs[i]);
|
||||||
CsTot += sum(sideCoeffs[i]);
|
CsTot += sum(sideCoeffs[i]);
|
||||||
@ -408,7 +377,7 @@ bool Foam::functionObjects::forceCoeffs::execute()
|
|||||||
CmYawTot += sum(yawMomentCoeffs[i]);
|
CmYawTot += sum(yawMomentCoeffs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Single contributions to the front and rear axles
|
// Single contributions to the front and rear
|
||||||
const scalar CdfTot = 0.5*CdTot + CmRollTot;
|
const scalar CdfTot = 0.5*CdTot + CmRollTot;
|
||||||
const scalar CdrTot = 0.5*CdTot - CmRollTot;
|
const scalar CdrTot = 0.5*CdTot - CmRollTot;
|
||||||
const scalar CsfTot = 0.5*CsTot + CmYawTot;
|
const scalar CsfTot = 0.5*CsTot + CmYawTot;
|
||||||
|
|||||||
@ -62,12 +62,14 @@ Usage
|
|||||||
log yes;
|
log yes;
|
||||||
writeFields yes;
|
writeFields yes;
|
||||||
patches (walls);
|
patches (walls);
|
||||||
|
|
||||||
|
coordinateSystem
|
||||||
|
{
|
||||||
|
type xxx;
|
||||||
dragDir (1 0 0);
|
dragDir (1 0 0);
|
||||||
sideDir (0 1 0);
|
|
||||||
liftDir (0 0 1);
|
liftDir (0 0 1);
|
||||||
rollAxis (1 0 0);
|
}
|
||||||
pitchAxis (0 1 0);
|
|
||||||
yawAxis (0 0 1);
|
|
||||||
magUInf 100;
|
magUInf 100;
|
||||||
lRef 3.5;
|
lRef 3.5;
|
||||||
Aref 2.2;
|
Aref 2.2;
|
||||||
@ -140,27 +142,6 @@ class forceCoeffs
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
// Force coefficient geometry in global Cartesian coordinate system
|
|
||||||
|
|
||||||
//- Drag force direction
|
|
||||||
vector dragDir_;
|
|
||||||
|
|
||||||
//- Side force direction
|
|
||||||
vector sideDir_;
|
|
||||||
|
|
||||||
//- Lift force direction
|
|
||||||
vector liftDir_;
|
|
||||||
|
|
||||||
//- Roll axis direction
|
|
||||||
vector rollAxis_;
|
|
||||||
|
|
||||||
//- Pitch axis direction
|
|
||||||
vector pitchAxis_;
|
|
||||||
|
|
||||||
//- Yaw axis direction
|
|
||||||
vector yawAxis_;
|
|
||||||
|
|
||||||
|
|
||||||
// Free-stream conditions
|
// Free-stream conditions
|
||||||
|
|
||||||
//- Free-stream velocity magnitude
|
//- Free-stream velocity magnitude
|
||||||
|
|||||||
@ -71,22 +71,6 @@ void Foam::functionObjects::forces::createFiles()
|
|||||||
momentBinFilePtr_ = createFile("momentBin");
|
momentBinFilePtr_ = createFile("momentBin");
|
||||||
writeBinHeader("Moment", momentBinFilePtr_());
|
writeBinHeader("Moment", momentBinFilePtr_());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (localSystem_)
|
|
||||||
{
|
|
||||||
localForceFilePtr_ = createFile("localForce");
|
|
||||||
writeIntegratedHeader("Force", localForceFilePtr_());
|
|
||||||
localMomentFilePtr_ = createFile("localMoment");
|
|
||||||
writeIntegratedHeader("Moment", localMomentFilePtr_());
|
|
||||||
|
|
||||||
if (nBin_ > 1)
|
|
||||||
{
|
|
||||||
localForceBinFilePtr_ = createFile("localForceBin");
|
|
||||||
writeBinHeader("Force", localForceBinFilePtr_());
|
|
||||||
localMomentBinFilePtr_ = createFile("localMomentBin");
|
|
||||||
writeBinHeader("Moment", localMomentBinFilePtr_());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,6 +153,49 @@ void Foam::functionObjects::forces::writeBinHeader
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObjects::forces::setCoordinateSystem
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const word& e3Name,
|
||||||
|
const word& e1Name
|
||||||
|
)
|
||||||
|
{
|
||||||
|
coordSys_.clear();
|
||||||
|
|
||||||
|
if (dict.readIfPresent<point>("CofR", coordSys_.origin()))
|
||||||
|
{
|
||||||
|
const vector e3 = e3Name == word::null ?
|
||||||
|
vector(0, 0, 1) : dict.get<vector>(e3Name);
|
||||||
|
const vector e1 = e1Name == word::null ?
|
||||||
|
vector(1, 0, 0) : dict.get<vector>(e1Name);
|
||||||
|
|
||||||
|
coordSys_ =
|
||||||
|
coordSystem::cartesian(coordSys_.origin(), e3, e1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// The 'coordinateSystem' sub-dictionary is optional,
|
||||||
|
// but enforce use of a cartesian system if not found.
|
||||||
|
|
||||||
|
if (dict.found(coordinateSystem::typeName_()))
|
||||||
|
{
|
||||||
|
// New() for access to indirect (global) coordinate system
|
||||||
|
coordSys_ =
|
||||||
|
coordinateSystem::New
|
||||||
|
(
|
||||||
|
obr_,
|
||||||
|
dict,
|
||||||
|
coordinateSystem::typeName_()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
coordSys_ = coordSystem::cartesian(dict);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::forces::initialise()
|
void Foam::functionObjects::forces::initialise()
|
||||||
{
|
{
|
||||||
@ -586,41 +613,20 @@ void Foam::functionObjects::forces::writeForces()
|
|||||||
writeIntegratedForceMoment
|
writeIntegratedForceMoment
|
||||||
(
|
(
|
||||||
"forces",
|
"forces",
|
||||||
force_[0],
|
coordSys_.localVector(force_[0]),
|
||||||
force_[1],
|
coordSys_.localVector(force_[1]),
|
||||||
force_[2],
|
coordSys_.localVector(force_[2]),
|
||||||
forceFilePtr_
|
forceFilePtr_
|
||||||
);
|
);
|
||||||
|
|
||||||
writeIntegratedForceMoment
|
writeIntegratedForceMoment
|
||||||
(
|
(
|
||||||
"moments",
|
"moments",
|
||||||
moment_[0],
|
|
||||||
moment_[1],
|
|
||||||
moment_[2],
|
|
||||||
momentFilePtr_
|
|
||||||
);
|
|
||||||
|
|
||||||
if (localSystem_)
|
|
||||||
{
|
|
||||||
writeIntegratedForceMoment
|
|
||||||
(
|
|
||||||
"local forces",
|
|
||||||
coordSys_.localVector(force_[0]),
|
|
||||||
coordSys_.localVector(force_[1]),
|
|
||||||
coordSys_.localVector(force_[2]),
|
|
||||||
localForceFilePtr_
|
|
||||||
);
|
|
||||||
|
|
||||||
writeIntegratedForceMoment
|
|
||||||
(
|
|
||||||
"local moments",
|
|
||||||
coordSys_.localVector(moment_[0]),
|
coordSys_.localVector(moment_[0]),
|
||||||
coordSys_.localVector(moment_[1]),
|
coordSys_.localVector(moment_[1]),
|
||||||
coordSys_.localVector(moment_[2]),
|
coordSys_.localVector(moment_[2]),
|
||||||
localMomentFilePtr_
|
momentFilePtr_
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
Log << endl;
|
Log << endl;
|
||||||
}
|
}
|
||||||
@ -672,11 +678,6 @@ void Foam::functionObjects::forces::writeBinnedForceMoment
|
|||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::forces::writeBins()
|
void Foam::functionObjects::forces::writeBins()
|
||||||
{
|
|
||||||
writeBinnedForceMoment(force_, forceBinFilePtr_);
|
|
||||||
writeBinnedForceMoment(moment_, momentBinFilePtr_);
|
|
||||||
|
|
||||||
if (localSystem_)
|
|
||||||
{
|
{
|
||||||
List<Field<vector>> lf(3);
|
List<Field<vector>> lf(3);
|
||||||
List<Field<vector>> lm(3);
|
List<Field<vector>> lm(3);
|
||||||
@ -687,9 +688,8 @@ void Foam::functionObjects::forces::writeBins()
|
|||||||
lm[1] = coordSys_.localVector(moment_[1]);
|
lm[1] = coordSys_.localVector(moment_[1]);
|
||||||
lm[2] = coordSys_.localVector(moment_[2]);
|
lm[2] = coordSys_.localVector(moment_[2]);
|
||||||
|
|
||||||
writeBinnedForceMoment(lf, localForceBinFilePtr_);
|
writeBinnedForceMoment(lf, forceBinFilePtr_);
|
||||||
writeBinnedForceMoment(lm, localMomentBinFilePtr_);
|
writeBinnedForceMoment(lm, momentBinFilePtr_);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -711,10 +711,6 @@ Foam::functionObjects::forces::forces
|
|||||||
momentFilePtr_(),
|
momentFilePtr_(),
|
||||||
forceBinFilePtr_(),
|
forceBinFilePtr_(),
|
||||||
momentBinFilePtr_(),
|
momentBinFilePtr_(),
|
||||||
localForceFilePtr_(),
|
|
||||||
localMomentFilePtr_(),
|
|
||||||
localForceBinFilePtr_(),
|
|
||||||
localMomentBinFilePtr_(),
|
|
||||||
patchSet_(),
|
patchSet_(),
|
||||||
pName_(word::null),
|
pName_(word::null),
|
||||||
UName_(word::null),
|
UName_(word::null),
|
||||||
@ -724,7 +720,6 @@ Foam::functionObjects::forces::forces
|
|||||||
rhoRef_(VGREAT),
|
rhoRef_(VGREAT),
|
||||||
pRef_(0),
|
pRef_(0),
|
||||||
coordSys_(),
|
coordSys_(),
|
||||||
localSystem_(false),
|
|
||||||
porosity_(false),
|
porosity_(false),
|
||||||
nBin_(1),
|
nBin_(1),
|
||||||
binDir_(Zero),
|
binDir_(Zero),
|
||||||
@ -738,6 +733,7 @@ Foam::functionObjects::forces::forces
|
|||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
|
setCoordinateSystem(dict);
|
||||||
Log << endl;
|
Log << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -759,10 +755,6 @@ Foam::functionObjects::forces::forces
|
|||||||
momentFilePtr_(),
|
momentFilePtr_(),
|
||||||
forceBinFilePtr_(),
|
forceBinFilePtr_(),
|
||||||
momentBinFilePtr_(),
|
momentBinFilePtr_(),
|
||||||
localForceFilePtr_(),
|
|
||||||
localMomentFilePtr_(),
|
|
||||||
localForceBinFilePtr_(),
|
|
||||||
localMomentBinFilePtr_(),
|
|
||||||
patchSet_(),
|
patchSet_(),
|
||||||
pName_(word::null),
|
pName_(word::null),
|
||||||
UName_(word::null),
|
UName_(word::null),
|
||||||
@ -772,7 +764,6 @@ Foam::functionObjects::forces::forces
|
|||||||
rhoRef_(VGREAT),
|
rhoRef_(VGREAT),
|
||||||
pRef_(0),
|
pRef_(0),
|
||||||
coordSys_(),
|
coordSys_(),
|
||||||
localSystem_(false),
|
|
||||||
porosity_(false),
|
porosity_(false),
|
||||||
nBin_(1),
|
nBin_(1),
|
||||||
binDir_(Zero),
|
binDir_(Zero),
|
||||||
@ -786,6 +777,7 @@ Foam::functionObjects::forces::forces
|
|||||||
if (readFields)
|
if (readFields)
|
||||||
{
|
{
|
||||||
read(dict);
|
read(dict);
|
||||||
|
setCoordinateSystem(dict);
|
||||||
Log << endl;
|
Log << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -843,32 +835,6 @@ bool Foam::functionObjects::forces::read(const dictionary& dict)
|
|||||||
Info<< " Reference pressure (pRef) set to " << pRef_ << endl;
|
Info<< " Reference pressure (pRef) set to " << pRef_ << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
coordSys_.clear();
|
|
||||||
localSystem_ = false;
|
|
||||||
|
|
||||||
// Centre of rotation for moment calculations
|
|
||||||
// specified directly, from coordinate system, or implicitly (0 0 0)
|
|
||||||
if (!dict.readIfPresent<point>("CofR", coordSys_.origin()))
|
|
||||||
{
|
|
||||||
// The 'coordinateSystem' sub-dictionary is optional,
|
|
||||||
// but enforce use of a cartesian system.
|
|
||||||
|
|
||||||
if (dict.found(coordinateSystem::typeName_()))
|
|
||||||
{
|
|
||||||
// New() for access to indirect (global) coordinate system
|
|
||||||
coordSys_ =
|
|
||||||
coordinateSystem::New
|
|
||||||
(
|
|
||||||
obr_, dict, coordinateSystem::typeName_()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
coordSys_ = coordSystem::cartesian(dict);
|
|
||||||
}
|
|
||||||
|
|
||||||
localSystem_ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
dict.readIfPresent("porosity", porosity_);
|
dict.readIfPresent("porosity", porosity_);
|
||||||
if (porosity_)
|
if (porosity_)
|
||||||
|
|||||||
@ -192,18 +192,6 @@ protected:
|
|||||||
//- Moment bins
|
//- Moment bins
|
||||||
autoPtr<OFstream> momentBinFilePtr_;
|
autoPtr<OFstream> momentBinFilePtr_;
|
||||||
|
|
||||||
//- Local force
|
|
||||||
autoPtr<OFstream> localForceFilePtr_;
|
|
||||||
|
|
||||||
//- Local moment
|
|
||||||
autoPtr<OFstream> localMomentFilePtr_;
|
|
||||||
|
|
||||||
//- Local force bins
|
|
||||||
autoPtr<OFstream> localForceBinFilePtr_;
|
|
||||||
|
|
||||||
//- Local moment bins
|
|
||||||
autoPtr<OFstream> localMomentBinFilePtr_;
|
|
||||||
|
|
||||||
|
|
||||||
// Read from dictionary
|
// Read from dictionary
|
||||||
|
|
||||||
@ -234,9 +222,6 @@ protected:
|
|||||||
//- Coordinate system used when evaluting forces/moments
|
//- Coordinate system used when evaluting forces/moments
|
||||||
coordSystem::cartesian coordSys_;
|
coordSystem::cartesian coordSys_;
|
||||||
|
|
||||||
//- Flag to indicate whether we are using a local coordinates
|
|
||||||
bool localSystem_;
|
|
||||||
|
|
||||||
//- Flag to include porosity effects
|
//- Flag to include porosity effects
|
||||||
bool porosity_;
|
bool porosity_;
|
||||||
|
|
||||||
@ -283,6 +268,14 @@ protected:
|
|||||||
//- Write header for binned data
|
//- Write header for binned data
|
||||||
void writeBinHeader(const word& header, Ostream& os) const;
|
void writeBinHeader(const word& header, Ostream& os) const;
|
||||||
|
|
||||||
|
//- Set the co-ordinate system from dictionary and axes names
|
||||||
|
void setCoordinateSystem
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
const word& e3Name = word::null,
|
||||||
|
const word& e1Name = word::null
|
||||||
|
);
|
||||||
|
|
||||||
//- Initialise the fields
|
//- Initialise the fields
|
||||||
void initialise();
|
void initialise();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user