Minor modifications for rcfdemSolverCoupledHeattransfer to improve stability.

This commit is contained in:
Thomas Lichtenegger
2022-08-02 09:52:51 +02:00
parent 507f24145e
commit 056b121f21
4 changed files with 37 additions and 4 deletions

View File

@ -1,4 +1,4 @@
volScalarField rhoeps = rhoRec*voidfractionRec;
rhoeps = rhoRec*voidfractionRec;
particleCloud.energyContributions(Qsource);
@ -23,10 +23,17 @@
fvOptions(rhoeps, T) // no fvOptions support yet
);
fvOptions.constrain(TEqn); // no fvOptions support yet
// fvOptions.constrain(TEqn); // no fvOptions support yet
TEqn.relax();
TEqn.solve();
T = max(T, TMin);
T = min(T, TMax);
Info<< "T max/min/ave : " << max(T).value() << " " << min(T).value() << " " << average(T).value() << endl;
particleCloud.clockM().start(31,"postFlow");
counter++;

View File

@ -73,6 +73,9 @@
dimensionedVector("zero", dimensionSet(0, 1, -1, 0, 0), vector::zero)
);
volScalarField rhoeps("rhoeps", rhoRec*voidfractionRec);
rhoeps.oldTime(); // switch on saving old time
// heat transfer fields
Info << "\nCreating heat transfer fields.\n" << endl;
@ -228,3 +231,25 @@
)
);
weightDict.add("weights",scalarList(1,1.0));
dimensionedScalar TMax
(
dimensionedScalar::lookupOrDefault
(
"TMax",
transportProps,
dimTemperature,
GREAT
)
);
dimensionedScalar TMin
(
dimensionedScalar::lookupOrDefault
(
"TMin",
transportProps,
dimTemperature,
0.0
)
);

View File

@ -98,7 +98,7 @@ int main(int argc, char *argv[])
particleCloud.clockM().start(26,"Flow");
#include "updateRho.H"
#include "TEqImp.H"
#include "TEqn.H"
particleCloud.clockM().stop("Flow");
stepCounter++;

View File

@ -1 +1,2 @@
rhoRec = pRec / (T * R);
dimensionedScalar Tave = T.weightedAverage(voidfractionRec);
rhoRec = pRec / (Tave * R);