diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index e748f72077fb7bdaec4f178441bdf082c6cdbc29..80e0dea37d5faa8b9914f8dbe23707954ba5c52b 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -28,6 +28,7 @@ License #include "WallInteractionModel.H" #include "InflowBoundaryModel.H" #include "constants.H" +#include "zeroGradientFvPatchFields.H" using namespace Foam::constant; @@ -459,6 +460,8 @@ void Foam::DsmcCloud<ParcelType>::collisions() reduce(collisionCandidates, sumOp<label>()); + sigmaTcRMax_.correctBoundaryConditions(); + if (collisionCandidates) { Info<< " Collisions = " @@ -550,6 +553,8 @@ void Foam::DsmcCloud<ParcelType>::calculateFields() rhoM *= nParticle_/mesh().cellVolumes(); rhoM_.correctBoundaryConditions(); + dsmcRhoN_.correctBoundaryConditions(); + linearKE *= nParticle_/mesh().cellVolumes(); linearKE_.correctBoundaryConditions(); @@ -851,7 +856,8 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0.0) + dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0.0), + zeroGradientFvPatchScalarField::typeName ), collisionSelectionRemainder_(), q_ diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H index 1df4935f6850e72e8ed47f3674b93533f2d61d27..aba26e7bf83ad714a05bcf9a57283800626fa3d2 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H @@ -83,10 +83,10 @@ class DsmcCloud //- Dictionary of particle properties IOdictionary particleProperties_; - //- A list of unique instances of molecule types in the simulation. - // The position of an entry in the list maps to the label identifying - // the typeId, i.e. where typeIdList_ = (N2 O2 CO2) - // N2 has typeId label = 0, O2 = 1, CO2 = 2. + //- A list of unique instances of molecule types in the + // simulation. The position of an entry in the list maps to + // the label identifying the typeId, i.e. where typeIdList_ = + // (N2 O2 CO2) N2 has typeId label = 0, O2 = 1, CO2 = 2. List<word> typeIdList_; //- 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 List<DynamicList<ParcelType*> > cellOccupancy_; - //- An IOField holding the value of (sigmaT * cR)max for each cell (see - // Bird p220). Initialised with the parcels, updated as required, and - // read in on start/restart. + //- A field holding the value of (sigmaT * cR)max for each + // cell (see Bird p220). Initialised with the parcels, + // updated as required, and read in on start/restart. volScalarField sigmaTcRMax_; //- A field holding the remainder from the previous collision selections diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/fixedAxis/fixedAxis.H b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/fixedAxis/fixedAxis.H index 6a17da99c928816c57220ea569b02452c144b590..c068bea3005ecd05a4724e3e164b43ce3f349d9d 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/fixedAxis/fixedAxis.H +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/fixedAxis/fixedAxis.H @@ -25,8 +25,8 @@ Class Foam::sixDoFRigidBodyMotionConstraints::fixedAxis Description - sixDoFRigidBodyMotionConstraint. Axis of body fixed global - space. + sixDoFRigidBodyMotionConstraint. Body may only rotate around + an axis fixed in global space. SourceFiles fixedAxis.C diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index b0c1390c4b95f1b672959b1013a9917c47b7155a..5cce898e22b9cf8b609d278b3824c09a72d80f75 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -221,24 +221,13 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs() { label faceCellI = patch().faceCells()[faceI]; - scalar yPlus = - Cmu25*y[faceI]*sqrt(k[faceCellI]) - /(muw[faceI]/rhow[faceI]); - epsilon[faceCellI] = Cmu75*pow(k[faceCellI], 1.5)/(kappa_*y[faceI]); - if (yPlus > yPlusLam_) - { - G[faceCellI] = - (mutw[faceI] + muw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[faceCellI]) - /(kappa_*y[faceI]); - } - else - { - G[faceCellI] = 0.0; - } + G[faceCellI] = + (mutw[faceI] + muw[faceI]) + *magGradUw[faceI] + *Cmu25*sqrt(k[faceCellI]) + /(kappa_*y[faceI]); } fixedInternalValueFvPatchField<scalar>::updateCoeffs(); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index d8437b07c54e6a54c44535dbe770d8bda0727053..1ab15d336fb6a2c8218a6714f2d175925eb091ca 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -223,28 +223,15 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() { label faceCellI = patch().faceCells()[faceI]; - scalar yPlus = - Cmu25*y[faceI]*sqrt(k[faceCellI]) - /(muw[faceI]/rhow[faceI]); - scalar omegaVis = 6.0*muw[faceI]/(rhow[faceI]*beta1_*sqr(y[faceI])); - scalar omegaLog = sqrt(k[faceCellI])/(Cmu25*kappa_*y[faceI]); - omega[faceCellI] = sqrt(sqr(omegaVis) + sqr(omegaLog)); - if (yPlus > yPlusLam_) - { - G[faceCellI] = - (mutw[faceI] + muw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[faceCellI]) - /(kappa_*y[faceI]); - } - else - { - G[faceCellI] = 0.0; - } + G[faceCellI] = + (mutw[faceI] + muw[faceI]) + *magGradUw[faceI] + *Cmu25*sqrt(k[faceCellI]) + /(kappa_*y[faceI]); } fixedInternalValueFvPatchField<scalar>::updateCoeffs(); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index e90118f7998e6e61e338cc79f8f1ed6ac425ada8..55a309f8abfc932d93cfa3fd9eccbc92491ba934 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -214,22 +214,13 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs() { label faceCellI = patch().faceCells()[faceI]; - scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI]; - epsilon[faceCellI] = Cmu75*pow(k[faceCellI], 1.5)/(kappa_*y[faceI]); - if (yPlus > yPlusLam_) - { - G[faceCellI] = - (nutw[faceI] + nuw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[faceCellI]) - /(kappa_*y[faceI]); - } - else - { - G[faceCellI] = 0.0; - } + G[faceCellI] = + (nutw[faceI] + nuw[faceI]) + *magGradUw[faceI] + *Cmu25*sqrt(k[faceCellI]) + /(kappa_*y[faceI]); } fixedInternalValueFvPatchField<scalar>::updateCoeffs(); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 51622da14c91c67d30bc2feee8b7a88cf6adb08a..5bd1ab97b10358b01dea2dc27cf097e75450310f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -219,26 +219,17 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() { label faceCellI = patch().faceCells()[faceI]; - scalar yPlus = Cmu25*y[faceI]*sqrt(k[faceCellI])/nuw[faceI]; - scalar omegaVis = 6.0*nuw[faceI]/(beta1_*sqr(y[faceI])); scalar omegaLog = sqrt(k[faceCellI])/(Cmu25*kappa_*y[faceI]); omega[faceCellI] = sqrt(sqr(omegaVis) + sqr(omegaLog)); - if (yPlus > yPlusLam_) - { - G[faceCellI] = - (nutw[faceI] + nuw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[faceCellI]) - /(kappa_*y[faceI]); - } - else - { - G[faceCellI] = 0.0; - } + G[faceCellI] = + (nutw[faceI] + nuw[faceI]) + *magGradUw[faceI] + *Cmu25*sqrt(k[faceCellI]) + /(kappa_*y[faceI]); } fixedInternalValueFvPatchField<scalar>::updateCoeffs();