solidParticleCloud.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) 2011-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 \*---------------------------------------------------------------------------*/
27 
28 #include "solidParticleCloud.H"
29 #include "fvMesh.H"
30 #include "volFields.H"
31 #include "interpolationCellPoint.H"
32 
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
34 
35 Foam::solidParticleCloud::solidParticleCloud
36 (
37  const fvMesh& mesh,
38  const word& cloudName,
39  bool readFields
40 )
41 :
43  mesh_(mesh),
44  particleProperties_
45  (
46  IOobject
47  (
48  "particleProperties",
49  mesh_.time().constant(),
50  mesh_,
51  IOobject::MUST_READ_IF_MODIFIED,
52  IOobject::NO_WRITE
53  )
54  ),
55  rhop_(dimensionedScalar("rhop", particleProperties_).value()),
56  e_(dimensionedScalar("e", particleProperties_).value()),
57  mu_(dimensionedScalar("mu", particleProperties_).value())
58 {
59  if (readFields)
60  {
62  }
63 }
64 
65 
66 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
67 
69 {
70  const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
71  const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
72  const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");
73 
77 
79  td(*this, rhoInterp, UInterp, nuInterp, g.value());
80 
81  Cloud<solidParticle>::move(*this, td, mesh_.time().deltaTValue());
82 }
83 
84 
85 // ************************************************************************* //
volFields.H
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
cloudName
const word cloudName(propsDict.get< word >("cloud"))
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::solidParticleCloud::move
void move(const dimensionedVector &g)
Move the particles under the influence of the given.
Definition: solidParticleCloud.C:68
rho
rho
Definition: readInitialConditions.H:88
Foam::TimeState::deltaTValue
scalar deltaTValue() const noexcept
Return time step value.
Definition: TimeStateI.H:43
interpolationCellPoint.H
nu
volScalarField & nu
Definition: readMechanicalProperties.H:176
Foam::interpolationCellPoint< scalar >
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
Foam::objectRegistry::lookupObject
const Type & lookupObject(const word &name, const bool recursive=false) const
Definition: objectRegistryTemplates.C:434
Foam::Cloud::move
void move(TrackCloudType &cloud, typename ParticleType::trackingData &td, const scalar trackTime)
Move the particles.
Definition: Cloud.C:147
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::dimensioned< vector >
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
g
const uniformDimensionedVectorField & g
Definition: createFluidFields.H:26
Foam::solidParticle::trackingData
Class used to pass tracking data to the trackToFace function.
Definition: solidParticle.H:83
Foam::readFields
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
Definition: ReadFieldsTemplates.C:312
U
U
Definition: pEqn.H:72
solidParticleCloud.H
Foam::Cloud< solidParticle >
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:280
Foam::GeometricField< scalar, fvPatchField, volMesh >