uncoupledKinematicParcelDyMFoam.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Application
27  uncoupledKinematicParcelDyMFoam
28 
29 Description
30  Transient solver for the passive transport of a particle cloud.
31 
32  Uses a pre-calculated velocity field to evolve the cloud.
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #include "fvCFD.H"
37 #include "dynamicFvMesh.H"
38 #include "psiThermo.H"
40 #include "basicKinematicCloud.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 int main(int argc, char *argv[])
45 {
46  argList::addNote
47  (
48  "Transient solver for the passive transport of a particle cloud"
49  " with optional mesh motion"
50  "Uses a pre-calculated velocity field to evolve the cloud."
51  );
52  argList::addOption
53  (
54  "cloudName",
55  "name",
56  "specify alternative cloud name. default is 'kinematicCloud'"
57  );
58 
59  #define NO_CONTROL
60  #include "postProcess.H"
61 
62  #include "setRootCaseLists.H"
63  #include "createTime.H"
64  #include "createDynamicFvMesh.H"
65  #include "createFields.H"
66  #include "compressibleCourantNo.H"
67 
68  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70  Info<< "\nStarting time loop\n" << endl;
71 
72  while (runTime.loop())
73  {
74  Info<< "Time = " << runTime.timeName() << nl << endl;
75 
76  kinematicCloud.storeGlobalPositions();
77 
78  mesh.update();
79 
80  U.correctBoundaryConditions();
81 
82  Info<< "Evolving " << kinematicCloud.name() << endl;
83  kinematicCloud.evolve();
84 
85  runTime.write();
86 
87  runTime.printExecutionTime(Info);
88  }
89 
90  Info<< "End\n" << endl;
91 
92  return 0;
93 }
94 
95 
96 // ************************************************************************* //
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
engineTime & runTime
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
dynamicFvMesh & mesh
U
Definition: pEqn.H:72
messageStream Info
Information stream (stdout output on master, null elsewhere)
Execute application functionObjects to post-process existing results.