41 namespace patchDistMethods
50 Foam::patchDistMethods::meshWaveFrozen::meshWaveFrozen(
51 const dictionary& dict,
53 const labelHashSet& patchIDs)
54 : patchDistMethod(
mesh, patchIDs),
55 correctWalls_(dict.lookupOrDefault(
"correctWalls", true)),
57 y_(IOobject(
"yWallFrozen",
mesh.time().timeName(),
mesh),
59 dimensionedScalar(
"yWallFrozen", dimLength, SMALL),
60 patchDistMethod::patchTypes<scalar>(
mesh, patchIDs)),
61 n_(IOobject(
"nWallFrozen",
mesh.time().timeName(),
mesh),
63 dimensionedVector(dimless, Zero),
64 patchDistMethod::patchTypes<vector>(
mesh, patchIDs))
68 Foam::patchDistMethods::meshWaveFrozen::meshWaveFrozen(
70 const labelHashSet& patchIDs,
71 const bool correctWalls)
72 : patchDistMethod(
mesh, patchIDs),
73 correctWalls_(correctWalls),
75 y_(IOobject(
"yWallFrozen",
mesh.time().timeName(),
mesh),
77 dimensionedScalar(
"yWallFrozen", dimLength, SMALL),
78 patchDistMethod::patchTypes<scalar>(
mesh, patchIDs)),
79 n_(IOobject(
"nWallFrozen",
mesh.time().timeName(),
mesh),
81 dimensionedVector(dimless, Zero),
82 patchDistMethod::patchTypes<vector>(
mesh, patchIDs))
97 y = dimensionedScalar(
"yWall", dimLength, GREAT);
100 patchWave wave(mesh_, patchIDs_, correctWalls_);
103 y.transfer(wave.distance());
106 volScalarField::Boundary& ybf = y.boundaryFieldRef();
110 if (!isA<emptyFvPatchScalarField>(ybf[patchi]))
112 scalarField& waveFld = wave.patchDistance()[patchi];
114 ybf[patchi].transfer(waveFld);
119 nUnset_ = wave.nUnset();
134 FatalErrorIn(
"") <<
"NOT implemented" << abort(FatalError);