nearWallDist: now a MeshObject to provide automatic update on mesh change

This commit is contained in:
Henry Weller
2022-03-30 11:45:14 +01:00
parent 89e4b0fc7c
commit 91e4493a53
5 changed files with 98 additions and 60 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,6 +27,7 @@ License
#include "momentumTransportModel.H"
#include "nutWallFunctionFvPatchScalarField.H"
#include "wallFvPatch.H"
#include "nearWallDist.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -79,8 +80,7 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::yPlus::calcYPlus
volScalarField::Boundary& yPlusBf = tyPlus.ref().boundaryFieldRef();
const nearWallDist nwd(mesh_);
const volScalarField::Boundary& d = nwd.y();
const volScalarField::Boundary& d = nearWallDist::New(mesh_).y();
const tmp<volScalarField> tnut = turbModel.nut();
const volScalarField::Boundary& nutBf = tnut().boundaryField();