mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: include the selection volume in momentum output
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -249,8 +249,9 @@ void Foam::functionObjects::momentum::writeFileHeader(Ostream& os)
|
|||||||
{
|
{
|
||||||
writeTabbed(os, "(momentum_r momentum_rtheta momentum_axis)");
|
writeTabbed(os, "(momentum_r momentum_rtheta momentum_axis)");
|
||||||
}
|
}
|
||||||
os << endl;
|
|
||||||
|
|
||||||
|
writeTabbed(os, "volume");
|
||||||
|
os << endl;
|
||||||
|
|
||||||
writtenHeader_ = true;
|
writtenHeader_ = true;
|
||||||
}
|
}
|
||||||
@ -319,7 +320,8 @@ void Foam::functionObjects::momentum::writeValues(Ostream& os)
|
|||||||
{
|
{
|
||||||
os << tab << sumAngularMom_;
|
os << tab << sumAngularMom_;
|
||||||
}
|
}
|
||||||
os << endl;
|
|
||||||
|
os << tab << volRegion::V() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log << endl;
|
Log << endl;
|
||||||
@ -409,9 +411,6 @@ bool Foam::functionObjects::momentum::read(const dictionary& dict)
|
|||||||
pName_ = dict.lookupOrDefault<word>("p", "p");
|
pName_ = dict.lookupOrDefault<word>("p", "p");
|
||||||
rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
|
rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
|
||||||
rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1.0);
|
rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1.0);
|
||||||
|
|
||||||
rhoRef_ = dict.lookupOrDefault<scalar>("rhoRef", 1.0);
|
|
||||||
|
|
||||||
hasCsys_ = dict.lookupOrDefault("cylindrical", false);
|
hasCsys_ = dict.lookupOrDefault("cylindrical", false);
|
||||||
|
|
||||||
if (hasCsys_)
|
if (hasCsys_)
|
||||||
@ -570,4 +569,16 @@ bool Foam::functionObjects::momentum::write()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObjects::momentum::updateMesh(const mapPolyMesh& mpm)
|
||||||
|
{
|
||||||
|
volRegion::updateMesh(mpm);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::functionObjects::momentum::movePoints(const polyMesh& pm)
|
||||||
|
{
|
||||||
|
volRegion::movePoints(pm);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -251,6 +251,12 @@ public:
|
|||||||
|
|
||||||
//- Write the momentum, possibly angular momentum and velocity
|
//- Write the momentum, possibly angular momentum and velocity
|
||||||
virtual bool write();
|
virtual bool write();
|
||||||
|
|
||||||
|
//- Update for changes of mesh
|
||||||
|
virtual void updateMesh(const mapPolyMesh&);
|
||||||
|
|
||||||
|
//- Update for mesh point-motion
|
||||||
|
virtual void movePoints(const polyMesh&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user