fvcSmooth.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 InNamespace
25  Foam::fvc
26 
27 Description
28  Provides functions smooth spread and sweep which use the FaceCellWave
29  algorithm to smooth and redistribute the first field argument.
30 
31  smooth: smooths the field by ensuring the values in neighbouring cells are
32  at least coeff* the cell value.
33 
34  spread: redistributes the field by spreading the maximum value within the
35  region defined by the value (being between alphaMax and alphaMin)
36  and gradient of alpha (where the difference between the values in
37  neighbouring cells is larger than alphaDiff).
38 
39  sweep: redistributes the field by sweeping the maximum value where the
40  gradient of alpha is large (where the difference between the values
41  in neighbouring cells is larger than alphaDiff) away from that
42  starting point of the sweep.
43 
44 SourceFiles
45  fvcSmooth.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef fvcSmooth_H
50 #define fvcSmooth_H
51 
52 #include "volFieldsFwd.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace fvc
59 {
60  void smooth
61  (
62  volScalarField& field,
63  const scalar coeff
64  );
65 
66  void spread
67  (
68  volScalarField& field,
69  const volScalarField& alpha,
70  const label nLayers,
71  const scalar alphaDiff = 0.2,
72  const scalar alphaMax = 0.99,
73  const scalar alphaMin = 0.01
74  );
75 
76  void sweep
77  (
78  volScalarField& field,
79  const volScalarField& alpha,
80  const label nLayers,
81  const scalar alphaDiff = 0.2
82  );
83 }
84 }
85 
86 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
87 
88 #endif
89 
90 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
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:124
void smooth(volScalarField &field, const scalar coeff)
Definition: fvcSmooth.C:35
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
void sweep(volScalarField &field, const volScalarField &alpha, const label nLayers, const scalar alphaDiff=0.2)
Definition: fvcSmooth.C:222
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"))
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Namespace for OpenFOAM.