Loading...
Searching...
No Matches
CFM.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ██╗████████╗██╗ ██╗ █████╗ ██████╗ █████╗ ███████╗██╗ ██╗
3 ██║╚══██╔══╝██║ ██║██╔══██╗██╔════╝██╔══██╗ ██╔════╝██║ ██║
4 ██║ ██║ ███████║███████║██║ ███████║█████╗█████╗ ██║ ██║
5 ██║ ██║ ██╔══██║██╔══██║██║ ██╔══██║╚════╝██╔══╝ ╚██╗ ██╔╝
6 ██║ ██║ ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ╚████╔╝
7 ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═══╝
8
9 * In real Time Highly Advanced Computational Applications for Finite Volumes
10 * Copyright (C) 2017 by the ITHACA-FV authors
11-------------------------------------------------------------------------------
12License
13 This file is part of ITHACA-FV
14 ITHACA-FV is free software: you can redistribute it and/or modify
15 it under the terms of the GNU Lesser General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18 ITHACA-FV is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
24\*---------------------------------------------------------------------------*/
25// The consistent flux method (forward Euler)
26
27volVectorField U1aux(U);
28volVectorField Faux(U);
29Faux = dt * (-fvc::div(phi, U) + fvc::laplacian(nu, U));
31fvScalarMatrix pEqn = (fvm::laplacian(p)).ref();
32pEqn.setReference(pRefCell, pRefValue);
33solve(pEqn == (1 / dt)*fvc::div(U1aux));
34U = U1aux - dt * fvc::grad(p);
35phi = fvc::flux(U1aux) - dt * fvc::snGrad(p) * mag(mesh.magSf());
36
Faux
Definition CFM.H:29
U
Definition CFM.H:34
fvScalarMatrix pEqn
Definition CFM.H:31
phi
Definition CFM.H:35
U1aux
Definition CFM.H:30
Foam::fvMesh & mesh
Definition createMesh.H:47
TEqn solve()
dimensionedScalar & nu
volScalarField & p
scalar pRefValue
label pRefCell