coupledToFluid.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) 2025 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 Class
25  Foam::clouds::coupledToFluid
26 
27 Description
28  Base class for clouds which are coupled to a fluid
29 
30 SourceFiles
31  coupledToFluid.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef coupledToFluid_H
36 #define coupledToFluid_H
37 
38 #include "coupled.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace clouds
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class coupledToFluid Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class coupledToFluid
52 :
53  public coupled
54 {
55 private:
56 
57  // Private Member Data
58 
59  //- Reference to the mesh
60  const LagrangianMesh& mesh_;
61 
62  //- Cached carrier density field
63  tmp<volScalarField> trhocVf_;
64 
65 
66  // Private Member Functions
67 
68  //- Get the carrier density field
69  virtual tmp<volScalarField> getRhocVf() const;
70 
71  //- Calculate the carrier kinematic viscosity
72  virtual tmp<LagrangianSubScalarField> calcNuc
73  (
74  const LagrangianModelRef& model,
75  const LagrangianSubMesh& subMesh
76  ) const;
77 
78 
79 protected:
80 
81  // Protected Member Functions
82 
83  //- Update the carrier density
84  void updateRhoc();
85 
86 
87 public:
88 
89  // Public Static Data
90 
91  //- Run-time type information
92  TypeName("coupledToFluid");
93 
94 
95  // Public Data
96 
97  //- Carrier density
99 
100  //- Carrier dynamic viscosity
101  const CarrierField<scalar>& muc;
102 
103 
104  // Constructors
105 
106  //- Construct from a reference to the cloud
107  coupledToFluid(const cloud&);
108 
109 
110  //- Destructor
111  virtual ~coupledToFluid();
112 };
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace clouds
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
Class containing Lagrangian geometry and topology.
Simple wrapper to provide an optional reference to a Lagrangian model.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
Base class for clouds. Provides a basic evolution algorithm, models, and a database for caching deriv...
Definition: cloud.H:63
Base class for clouds which are coupled to a fluid.
const CarrierField< scalar > & muc
Carrier dynamic viscosity.
TypeName("coupledToFluid")
Run-time type information.
void updateRhoc()
Update the carrier density.
const CarrierField< scalar > & rhoc
Carrier density.
coupledToFluid(const cloud &)
Construct from a reference to the cloud.
virtual ~coupledToFluid()
Destructor.
Base class for clouds which are coupled to a fluid.
Definition: coupled.H:60
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.