1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 Full Approximation Storage Multigrid numeric flux
32 Rewrite by Hrvoje Jasak
38 \*---------------------------------------------------------------------------*/
40 #ifndef FASNumericFlux_H
41 #define FASNumericFlux_H
43 #include "numericFluxBase.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class FASNumericFlux Declaration
52 \*---------------------------------------------------------------------------*/
57 public numericFluxBase<Flux>
61 //- Reference to meshLevel
62 const mgMeshLevel& meshLevel_;
64 //- Reference to fieldLevel
65 const mgFieldLevel& fieldLevel_;
75 //- static Temperature
79 // References to fine fluxes
82 surfaceScalarField& fineRhoFlux_;
85 surfaceVectorField& fineRhoUFlux_;
88 surfaceScalarField& fineRhoEFlux_;
97 vectorField rhoUFlux_;
100 scalarField rhoEFlux_;
103 // Private Member Functions
105 //- Disallow default bitwise copy construct
106 FASNumericFlux(const FASNumericFlux&);
108 //- Disallow default bitwise assignment
109 void operator=(const FASNumericFlux&);
116 //- Construct from components
119 const mgMeshLevel& meshLevel,
120 const mgFieldLevel& fieldLevel
125 virtual ~FASNumericFlux() {}
130 //- Return reference to the mesh
131 const fvMesh& mesh() const
133 return meshLevel_.mesh();
139 //- Return density equation flux
140 virtual const surfaceScalarField& rhoFlux() const
145 //- Return momentum equation flux
146 virtual const surfaceVectorField& rhoUFlux() const
148 return fineRhoUFlux_;
151 //- Return energy equation flux
152 virtual const surfaceScalarField& rhoEFlux() const
154 return fineRhoEFlux_;
160 //- Return density residual
161 virtual tmp<scalarField> rhoResidual() const;
163 //- Return momentum residual
164 virtual tmp<vectorField> rhoUResidual() const;
166 //- Return energy residual
167 virtual tmp<scalarField> rhoEResidual() const;
170 //- Update fluxes based on current state
171 virtual void computeFlux();
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 } // End namespace Foam
180 # include "FASNumericFlux.C"
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 // ************************************************************************* //