mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CentredFitSnGrad: Change deltaCoeffs -> nonOrthDeltaCoeffs for very non-orthogonal meshes
This commit is contained in:
@ -25,9 +25,7 @@ License
|
|||||||
|
|
||||||
#include "CentredFitSnGradData.H"
|
#include "CentredFitSnGradData.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
#include "volFields.H"
|
|
||||||
#include "SVD.H"
|
#include "SVD.H"
|
||||||
#include "syncTools.H"
|
|
||||||
#include "extendedCentredCellToFaceStencil.H"
|
#include "extendedCentredCellToFaceStencil.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
@ -226,7 +224,7 @@ void Foam::CentredFitSnGradData<Polynomial>::calcFit()
|
|||||||
// find the fit coefficients for every face in the mesh
|
// find the fit coefficients for every face in the mesh
|
||||||
|
|
||||||
const surfaceScalarField& w = mesh.surfaceInterpolation::weights();
|
const surfaceScalarField& w = mesh.surfaceInterpolation::weights();
|
||||||
const surfaceScalarField& dC = mesh.deltaCoeffs();
|
const surfaceScalarField& dC = mesh.nonOrthDeltaCoeffs();
|
||||||
|
|
||||||
for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
|
for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,7 +25,7 @@ Class
|
|||||||
Foam::CentredFitSnGradData
|
Foam::CentredFitSnGradData
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Data for the quadratic fit correction interpolation scheme
|
Data for centred fit snGrad schemes
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
CentredFitSnGradData.C
|
CentredFitSnGradData.C
|
||||||
@ -64,6 +64,7 @@ class CentredFitSnGradData
|
|||||||
// values of the stencil to obtain the gradient for each direction
|
// values of the stencil to obtain the gradient for each direction
|
||||||
List<scalarList> coeffs_;
|
List<scalarList> coeffs_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
TypeName("CentredFitSnGradData");
|
TypeName("CentredFitSnGradData");
|
||||||
|
|||||||
@ -100,7 +100,7 @@ public:
|
|||||||
const GeometricField<Type, fvPatchField, volMesh>&
|
const GeometricField<Type, fvPatchField, volMesh>&
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return this->mesh().deltaCoeffs();
|
return this->mesh().nonOrthDeltaCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return true if this scheme uses an explicit correction
|
//- Return true if this scheme uses an explicit correction
|
||||||
@ -124,18 +124,18 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
const CentredFitSnGradData<Polynomial>& cfd =
|
const CentredFitSnGradData<Polynomial>& cfd =
|
||||||
CentredFitSnGradData<Polynomial>::New
|
CentredFitSnGradData<Polynomial>::New
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
stencil,
|
stencil,
|
||||||
linearLimitFactor_,
|
linearLimitFactor_,
|
||||||
centralWeight_
|
centralWeight_
|
||||||
);
|
);
|
||||||
|
|
||||||
const List<scalarList>& f = cfd.coeffs();
|
|
||||||
|
|
||||||
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > sft
|
tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > sft
|
||||||
= stencil.weightedSum(vf, f);
|
(
|
||||||
|
stencil.weightedSum(vf, cfd.coeffs())
|
||||||
|
);
|
||||||
|
|
||||||
sft().dimensions() /= dimLength;
|
sft().dimensions() /= dimLength;
|
||||||
|
|
||||||
@ -143,6 +143,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace fv
|
} // End namespace fv
|
||||||
|
|||||||
Reference in New Issue
Block a user