fvcSmooth.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10 Copyright (C) 2020 Henning Scheufler
11-------------------------------------------------------------------------------
12License
13 This file is part of OpenFOAM.
14
15 OpenFOAM is free software: you can redistribute it and/or modify it
16 under the terms of the GNU General Public License as published by
17 the Free Software Foundation, either version 3 of the License, or
18 (at your option) any later version.
19
20 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27
28InNamespace
29 Foam::fvc
30
31Description
32 Provides functions smooth spread and sweep which use the FaceCellWave
33 algorithm to smooth and redistribute the first field argument.
34
35 smooth: smooths the field by ensuring the values in neighbouring cells are
36 at least coeff* the cell value.
37
38 spread: redistributes the field by spreading the maximum value within the
39 region defined by the value (being between alphaMax and alphaMin)
40 and gradient of alpha (where the difference between the values in
41 neighbouring cells is larger than alphaDiff).
42
43 sweep: redistributes the field by sweeping the maximum value where the
44 gradient of alpha is large (where the difference between the values
45 in neighbouring cells is larger than alphaDiff) away from that
46 starting point of the sweep.
47
48
49 spreadSource: spread a source field (mDotIn) for two phase multiphase using
50 a laplacian operator and diffussivity D.
51 The spread source (mDotOut) is distributed from alpha1 < cutoff
52 to alpha1 > 1 - cutoff, and it is zero across the interface
53
54SourceFiles
55 fvcSmooth.C
56
57\*---------------------------------------------------------------------------*/
58
59#ifndef fvcSmooth_H
60#define fvcSmooth_H
61
62#include "volFieldsFwd.H"
63#include "dimensionedScalar.H"
64
65// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66
67namespace Foam
68{
69namespace fvc
70{
71 void smooth
72 (
74 const scalar coeff
75 );
76
77 void spread
78 (
80 const volScalarField& alpha,
81 const label nLayers,
82 const scalar alphaDiff = 0.2,
83 const scalar alphaMax = 0.99,
84 const scalar alphaMin = 0.01
85 );
86
87 void sweep
88 (
90 const volScalarField& alpha,
91 const label nLayers,
92 const scalar alphaDiff = 0.2
93 );
94
95 void spreadSource
96 (
97 volScalarField& mDotOut,
98 const volScalarField& mDotIn,
100 const volScalarField& alpha2,
101 const dimensionedScalar& D,
102 const scalar cutoff
103 );
104}
105}
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109#endif
110
111// ************************************************************************* //
const volScalarField & alpha1
const volScalarField & alpha2
rDeltaTY field()
void sweep(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2)
Definition: fvcSmooth.C:231
void spreadSource(volScalarField &mDotOut, const volScalarField &mDotIn, const volScalarField &alpha1, const volScalarField &alpha2, const dimensionedScalar &D, const scalar cutoff)
Definition: fvcSmooth.C:325
void smooth(volScalarField &field, const scalar coeff)
Definition: fvcSmooth.C:44
void spread(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2, const scalar alphaMax=0.99, const scalar alphaMin=0.01)
Definition: fvcSmooth.C:133
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:82
volScalarField & alpha
const dimensionedScalar & D
dimensionedScalar alphaMax("alphaMax", dimless/dimTime, laminarTransport)