solidParticleCloud.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "solidParticleCloud.H"
00028 #include "fvMesh.H"
00029 #include "volFields.H"
00030 #include "interpolationCellPoint.H"
00031
00032
00033
00034 namespace Foam
00035 {
00036 defineParticleTypeNameAndDebug(solidParticle, 0);
00037 defineTemplateTypeNameAndDebug(Cloud<solidParticle>, 0);
00038 };
00039
00040
00041
00042 Foam::solidParticleCloud::solidParticleCloud
00043 (
00044 const fvMesh& mesh,
00045 const word& cloudName
00046 )
00047 :
00048 Cloud<solidParticle>(mesh, cloudName, false),
00049 mesh_(mesh),
00050 particleProperties_
00051 (
00052 IOobject
00053 (
00054 "particleProperties",
00055 mesh_.time().constant(),
00056 mesh_,
00057 IOobject::MUST_READ,
00058 IOobject::NO_WRITE
00059 )
00060 ),
00061 rhop_(dimensionedScalar(particleProperties_.lookup("rhop")).value()),
00062 e_(dimensionedScalar(particleProperties_.lookup("e")).value()),
00063 mu_(dimensionedScalar(particleProperties_.lookup("mu")).value())
00064 {
00065 solidParticle::readFields(*this);
00066 }
00067
00068
00069
00070
00071 void Foam::solidParticleCloud::move(const dimensionedVector& g)
00072 {
00073 const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
00074 const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
00075 const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");
00076
00077 interpolationCellPoint<scalar> rhoInterp(rho);
00078 interpolationCellPoint<vector> UInterp(U);
00079 interpolationCellPoint<scalar> nuInterp(nu);
00080
00081 solidParticle::trackData td(*this, rhoInterp, UInterp, nuInterp, g.value());
00082
00083 Cloud<solidParticle>::move(td);
00084 }
00085
00086
00087 void Foam::solidParticleCloud::writeFields() const
00088 {
00089 solidParticle::writeFields(*this);
00090 }
00091
00092
00093
Copyright © 2000-2009 OpenCFD Ltd