diff --git a/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C index 95077df225..34f231850f 100644 --- a/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C +++ b/applications/utilities/postProcessing/miscellaneous/dsmcFieldsCalc/dsmcFieldsCalc.C @@ -113,7 +113,16 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) return; } - wordList extensiveVVFNames(IStringStream ("(momentumMean)")()); + wordList extensiveVVFNames + ( + IStringStream + ( + "( \ + momentumMean \ + fDMean \ + )" + )() + ); PtrList extensiveVVFs(extensiveVVFNames.size()); diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C index 8957dee17c..7056fba521 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C @@ -106,6 +106,7 @@ void Foam::dsmcFields::write() word linearKEMeanName = "linearKEMean"; word internalEMeanName = "internalEMean"; word iDofMeanName = "iDofMean"; + word fDMeanName = "fDMean"; const volScalarField& rhoNMean = obr_.lookupObject ( @@ -137,6 +138,11 @@ void Foam::dsmcFields::write() iDofMeanName ); + volVectorField fDMean = obr_.lookupObject + ( + fDMeanName + ); + if (min(mag(rhoNMean)).value() > VSMALL) { Info<< "Calculating dsmcFields." << endl; @@ -165,7 +171,7 @@ void Foam::dsmcFields::write() IOobject::NO_READ ), 2.0/(3.0*dsmcCloud::kb*rhoNMean) - *(linearKEMean - 0.5*rhoMMean*(UMean & UMean)) + *(linearKEMean - 0.5*rhoMMean*(UMean & UMean)) ); Info<< " Calculating internalT field." << endl; @@ -192,9 +198,36 @@ void Foam::dsmcFields::write() IOobject::NO_READ ), 2.0/(dsmcCloud::kb*(3.0*rhoNMean + iDofMean)) - *(linearKEMean - 0.5*rhoMMean*(UMean & UMean) + internalEMean) + *(linearKEMean - 0.5*rhoMMean*(UMean & UMean) + internalEMean) ); + Info<< " Calculating pressure field." << endl; + volScalarField p + ( + IOobject + ( + "p", + obr_.time().timeName(), + obr_, + IOobject::NO_READ + ), + dsmcCloud::kb*rhoNMean*translationalT + ); + + const fvMesh& mesh = fDMean.mesh(); + + forAll(mesh.boundaryMesh(), i) + { + const polyPatch& patch = mesh.boundaryMesh()[i]; + + if (isA(patch)) + { + p.boundaryField()[i] = + fDMean.boundaryField()[i] + & (patch.faceAreas()/mag(patch.faceAreas())); + } + } + Info<< " mag(UMean) max/min : " << max(mag(UMean)).value() << " " << min(mag(UMean)).value() << endl; @@ -211,6 +244,10 @@ void Foam::dsmcFields::write() << max(overallT).value() << " " << min(overallT).value() << endl; + Info<< " p max/min : " + << max(p).value() << " " + << min(p).value() << endl; + UMean.write(); translationalT.write(); @@ -219,6 +256,8 @@ void Foam::dsmcFields::write() overallT.write(); + p.write(); + Info<< "dsmcFields written." << nl << endl; } else