fluid.C
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) 2022-2023 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 \*---------------------------------------------------------------------------*/
25 
26 #include "fluid.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace solvers
34 {
37 }
38 }
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
45  isothermalFluid(mesh),
46 
48  (
50  (
51  momentumTransport(),
52  thermo
53  )
54  )
55 {
56  thermo.validate(type(), "h", "e");
57 }
58 
59 
60 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
61 
63 {}
64 
65 
66 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
67 
69 {
71 
72  if (pimple.predictTransport())
73  {
74  thermophysicalTransport->predict();
75  }
76 }
77 
78 
80 {
82 
83  if (pimple.correctTransport())
84  {
85  thermophysicalTransport->correct();
86  }
87 }
88 
89 
90 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Templated abstract base class for thermophysical transport models.
void validate(const string &app, const word &) const
Check that the thermodynamics package is consistent.
Definition: basicThermo.C:331
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Abstract base class for run-time selectable region solvers.
Definition: solver.H:55
Solver module for steady or transient turbulent flow of compressible fluids with heat-transfer for HV...
Definition: fluid.H:70
virtual void prePredictor()
Called at the start of the PIMPLE loop.
Definition: fluid.C:68
virtual void postCorrector()
Correct the momentum and thermophysical transport modelling.
Definition: fluid.C:79
fluid(fvMesh &mesh)
Construct from region mesh.
Definition: fluid.C:43
virtual ~fluid()
Destructor.
Definition: fluid.C:62
Solver module for steady or transient turbulent flow of compressible isothermal fluids with optional ...
virtual void prePredictor()
Called at the start of the PIMPLE loop.
Definition: prePredictor.C:30
virtual void postCorrector()
Correct the momentum and thermophysical transport modelling.
const fluidThermo & thermo
Reference to the fluid thermophysical properties.
pimpleControl pimple(mesh)
Info<< "Creating thermophysical transport model\n"<< endl;turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity< RASThermophysicalTransportModel< ThermophysicalTransportModel< compressibleMomentumTransportModel, fluidThermo > >> thermophysicalTransport(turbulence(), thermo, true)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
addToRunTimeSelectionTable(solver, compressibleMultiphaseVoF, fvMesh)
defineTypeNameAndDebug(compressibleMultiphaseVoF, 0)
Namespace for OpenFOAM.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
fluidMulticomponentThermo & thermo
Definition: createFields.H:31