Feature evaluation check

This commit is contained in:
Mattijs Janssens
2023-11-16 10:33:32 +00:00
committed by Andrew Heather
parent 85243dc89d
commit d0542c7014
31 changed files with 1449 additions and 44 deletions

View File

@ -204,6 +204,9 @@ void Foam::functionObjects::pressure::addHydrostaticContribution
(g_ & (cmptMag(g_.value())/mag(g_.value())))*hRef_
);
const int oldLocal = volScalarField::Boundary::localConsistency;
volScalarField::Boundary::localConsistency = 0;
tmp<volScalarField> rgh = rhoScale(p, (g_ & mesh_.C()) - ghRef);
switch (hydrostaticMode_)
@ -221,6 +224,8 @@ void Foam::functionObjects::pressure::addHydrostaticContribution
default:
{}
}
volScalarField::Boundary::localConsistency = oldLocal;
}

View File

@ -234,6 +234,9 @@ bool Foam::functionObjects::setFlow::execute()
}
case modeType::ROTATION:
{
const int oldLocal = volVectorField::Boundary::localConsistency;
volVectorField::Boundary::localConsistency = 0;
const volVectorField& C = mesh_.C();
const volVectorField d
(
@ -266,6 +269,7 @@ bool Foam::functionObjects::setFlow::execute()
}
U = U & R_;
volVectorField::Boundary::localConsistency = oldLocal;
U.correctBoundaryConditions();
setPhi(U);
@ -275,6 +279,9 @@ bool Foam::functionObjects::setFlow::execute()
{
const scalar pi = Foam::constant::mathematical::pi;
const int oldLocal = volVectorField::Boundary::localConsistency;
volVectorField::Boundary::localConsistency = 0;
const volVectorField& C = mesh_.C();
const volVectorField d
@ -291,6 +298,7 @@ bool Foam::functionObjects::setFlow::execute()
Uc.replace(vector::Z, sin(2*pi*x)*sqr(sin(pi*z)));
U = U & R_;
volVectorField::Boundary::localConsistency = oldLocal;
U.correctBoundaryConditions();
// Calculating phi
@ -334,6 +342,10 @@ bool Foam::functionObjects::setFlow::execute()
case modeType::VORTEX3D:
{
const scalar pi = Foam::constant::mathematical::pi;
const int oldLocal = volVectorField::Boundary::localConsistency;
volVectorField::Boundary::localConsistency = 0;
const volVectorField& C = mesh_.C();
const volVectorField d
@ -351,6 +363,7 @@ bool Foam::functionObjects::setFlow::execute()
Uc.replace(vector::Z, -sin(2*pi*x)*sin(2*pi*y)*sqr(sin(pi*z)));
U = U & R_;
volVectorField::Boundary::localConsistency = oldLocal;
U.correctBoundaryConditions();
// Calculating phi

View File

@ -144,7 +144,7 @@ bool Foam::functionObjects::surfaceDistance::execute()
if (doCells_)
{
const pointField& cc = mesh_.C();
const pointField& cc = mesh_.C().internalField();
labelList surfaces;
List<pointIndexHit> nearestInfo;
@ -203,7 +203,7 @@ bool Foam::functionObjects::surfaceDistance::write()
//
// if (doCells_)
// {
// const pointField& cc = mesh_.C();
// const pointField& cc = mesh_.C().internalField();
//
// labelList surfaces;
// List<pointIndexHit> nearestInfo;