Feature evaluation check
Summary
Make sure that values of patchFields are consistent with internals. This is currently not enforced for 'local' field operations (e.g. multiplying two fields)
Resolved bugs (If applicable)
Details of new models (If applicable)
- switch to old behaviour
OptimisationSwitches
{
//- Enable enforced consistency of constraint bcs after 'local' operations.
// Default is on. Set to 0/false to revert to <v2306 behaviour
localConsistency 0;
}
- add checking for consistency:
DebugSwitches
{
volScalarField::Boundary 1;
volVectorField::Boundary 1;
volSphericalTensorField::Boundary 1;
volSymmTensorField::Boundary 1;
volTensorField::Boundary 1;
areaScalarField::Boundary 1;
areaVectorField::Boundary 1;
areaSphericalTensorField::Boundary 1;
areaSymmTensorField::Boundary 1;
areaTensorField::Boundary 1;
}
Risks
- indicator fields:
Some fields are in fact just indicators and are volScalarFields only for convenience. E.g. one such field is the one returned by the
sign
function. It might easily evaluate to 0 if the coupled cells on either side have different signed values. In general this is not a problem since boundary values of indicator fields are not used but if e.g. the sign result is used to divide it might give problems. The solution is to have the indicator field as aDimensionedField
instead so there are no boundary conditions. - geometry fields:
on boundary faces the value is the actual face geometry (e.g. for mesh.C() the boundary values are the face-centres) and not the interpolate of the neighbouring cell geometry. Hence these values are not consistent with the constraints from e.g.
cyclic
. Workarounds:- recognise 'Sliced' (boundary conditions on mesh.C()) to avoid interpolation. However any operation on mesh.C() reverts back to the underlying constraint type so looses the 'sliced' type.
- store bit on GeometricField (like oriented()) to keep track of not needing to apply constraints after any local operation
Merge request reports
Activity
assigned to @andy
Running the
overPimpleDyMFoam/simpleRotor
tutorial threw considerable amount of warning for theoverset
, e.g.:--> FOAM Warning : From bool Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::checkConsistency(Foam::scalar, bool) const [with CheckPatchField = Foam::coupledFvPatchField<Foam::Vector<double> >; Type = Foam::Vector<double>; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh; Foam::scalar = double] in file /nishome/kbc/OpenFOAM/work/feature-evaluation-check/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 144 Field (HbyA-(rAU*volIntegrate((flux(p)|rAUf)))) is not evaluated? On patch procBoundary0to1 type processor : average of field = (-0.00558424048727911 -0.4986012458608675 4.504428487327826e-23). Average of evaluated field = (-0.005580029403147373 -0.4986051111121957 4.504468490096693e-23). Difference:(4.211084131779478e-06 -3.865251328347547e-06 4.000276886655738e-28). Tolerance:1e-10
added 1 commit
- 0309e040 - BUG: cyclicAMI: reinstate blocking for evaluation
added 57 commits
-
9a652e41...dc7d0ffe - 49 commits from branch
develop
- dba98667 - ENH: patchFields: checking consistency
- 03cfa14a - ENH: patchFields: checking coupled consistency
- 5b05b524 - ENH: patchFields: checking consistency
- afd8a950 - ENH: patchFields: checking coupled consistency
- b1163ca0 - ENH: patchFields: better debug messages
- f6711978 - ENH: patchFields: coupled consistency. Optional reverting
- 07ec9565 - BUG: cyclic: disable field-ops on mesh.C()
- 270d91a5 - COMP: cyclicAMI: merge mistake
Toggle commit list-
9a652e41...dc7d0ffe - 49 commits from branch
added 58 commits
-
270d91a5...85243dc8 - 50 commits from branch
develop
- 852d837d - ENH: patchFields: checking consistency
- a6e60f80 - ENH: patchFields: checking coupled consistency
- 47aec0f2 - ENH: patchFields: checking consistency
- 0ea2f82c - ENH: patchFields: checking coupled consistency
- c3082a0a - ENH: patchFields: better debug messages
- cc1725d2 - ENH: patchFields: coupled consistency. Optional reverting
- 3e269a82 - BUG: cyclic: disable field-ops on mesh.C()
- 2e5e1618 - COMP: cyclicAMI: merge mistake
Toggle commit list-
270d91a5...85243dc8 - 50 commits from branch
mentioned in commit 24188d70
mentioned in commit 0897c5bf
mentioned in merge request !641 (merged)
mentioned in commit aa8e822b
mentioned in issue #3038 (closed)
mentioned in issue #2983 (closed)
Please register or sign in to reply