ENH: Giving sigmaTcRMax field zeroGradient type and calling

correctBOundaryConditions on it and dsmcRhoN.
This commit is contained in:
graham
2010-06-17 11:35:14 +01:00
parent fe43a59812
commit 399486e9a6
2 changed files with 14 additions and 8 deletions

View File

@ -28,6 +28,7 @@ License
#include "WallInteractionModel.H" #include "WallInteractionModel.H"
#include "InflowBoundaryModel.H" #include "InflowBoundaryModel.H"
#include "constants.H" #include "constants.H"
#include "zeroGradientFvPatchFields.H"
using namespace Foam::constant; using namespace Foam::constant;
@ -459,6 +460,8 @@ void Foam::DsmcCloud<ParcelType>::collisions()
reduce(collisionCandidates, sumOp<label>()); reduce(collisionCandidates, sumOp<label>());
sigmaTcRMax_.correctBoundaryConditions();
if (collisionCandidates) if (collisionCandidates)
{ {
Info<< " Collisions = " Info<< " Collisions = "
@ -550,6 +553,8 @@ void Foam::DsmcCloud<ParcelType>::calculateFields()
rhoM *= nParticle_/mesh().cellVolumes(); rhoM *= nParticle_/mesh().cellVolumes();
rhoM_.correctBoundaryConditions(); rhoM_.correctBoundaryConditions();
dsmcRhoN_.correctBoundaryConditions();
linearKE *= nParticle_/mesh().cellVolumes(); linearKE *= nParticle_/mesh().cellVolumes();
linearKE_.correctBoundaryConditions(); linearKE_.correctBoundaryConditions();
@ -851,7 +856,8 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh_, mesh_,
dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0.0) dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0.0),
zeroGradientFvPatchScalarField::typeName
), ),
collisionSelectionRemainder_(), collisionSelectionRemainder_(),
q_ q_

View File

@ -83,10 +83,10 @@ class DsmcCloud
//- Dictionary of particle properties //- Dictionary of particle properties
IOdictionary particleProperties_; IOdictionary particleProperties_;
//- A list of unique instances of molecule types in the simulation. //- A list of unique instances of molecule types in the
// The position of an entry in the list maps to the label identifying // simulation. The position of an entry in the list maps to
// the typeId, i.e. where typeIdList_ = (N2 O2 CO2) // the label identifying the typeId, i.e. where typeIdList_ =
// N2 has typeId label = 0, O2 = 1, CO2 = 2. // (N2 O2 CO2) N2 has typeId label = 0, O2 = 1, CO2 = 2.
List<word> typeIdList_; List<word> typeIdList_;
//- Number of real atoms/molecules represented by a parcel //- Number of real atoms/molecules represented by a parcel
@ -95,9 +95,9 @@ class DsmcCloud
//- A data structure holding which particles are in which cell //- A data structure holding which particles are in which cell
List<DynamicList<ParcelType*> > cellOccupancy_; List<DynamicList<ParcelType*> > cellOccupancy_;
//- An IOField holding the value of (sigmaT * cR)max for each cell (see //- A field holding the value of (sigmaT * cR)max for each
// Bird p220). Initialised with the parcels, updated as required, and // cell (see Bird p220). Initialised with the parcels,
// read in on start/restart. // updated as required, and read in on start/restart.
volScalarField sigmaTcRMax_; volScalarField sigmaTcRMax_;
//- A field holding the remainder from the previous collision selections //- A field holding the remainder from the previous collision selections