mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
Some experiments to get more stability.
This commit is contained in:
@ -39,7 +39,7 @@
|
||||
==
|
||||
fvOptions(rho, he)
|
||||
);
|
||||
|
||||
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
@ -52,4 +52,9 @@
|
||||
thermo.correct();
|
||||
|
||||
Info<< "T max/min : " << max(T).value() << " " << min(T).value() << endl;
|
||||
|
||||
particleCloud.clockM().start(31,"energySolve");
|
||||
particleCloud.solve();
|
||||
particleCloud.clockM().stop("energySolve");
|
||||
|
||||
}
|
||||
|
||||
@ -19,14 +19,21 @@ fvOptions.constrain(UEqn);
|
||||
if (modelType=="B" || modelType=="Bfull")
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p)+ Ksl*Us);
|
||||
|
||||
fvOptions.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
else
|
||||
{
|
||||
solve(UEqn == -voidfraction*fvc::grad(p)+ Ksl*Us);
|
||||
|
||||
fvOptions.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
|
||||
fvOptions.correct(U);
|
||||
|
||||
// limit vel
|
||||
|
||||
forAll(U,cellI)
|
||||
{
|
||||
scalar mU = mag(U[cellI]);
|
||||
if (mU > 200.0) U[cellI] *= 200.0/mU;
|
||||
}
|
||||
|
||||
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
@ -108,12 +108,14 @@ int main(int argc, char *argv[])
|
||||
// Pressure-velocity SIMPLE corrector
|
||||
|
||||
#include "UEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
|
||||
// besides this pEqn, OF offers a "simple consistent"-option
|
||||
#include "pEqn.H"
|
||||
rhoeps=rho*voidfraction;
|
||||
|
||||
#include "EEqn.H"
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
particleCloud.clockM().start(32,"postFlow");
|
||||
|
||||
@ -75,6 +75,16 @@ else
|
||||
{
|
||||
U = HbyA - rAU*(fvc::grad(p)-Ksl*Us);
|
||||
}
|
||||
|
||||
// limit vel
|
||||
|
||||
forAll(U,cellI)
|
||||
{
|
||||
scalar mU = mag(U[cellI]);
|
||||
if (mU > 200.0) U[cellI] *= 200.0/mU;
|
||||
}
|
||||
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
@ -81,6 +81,8 @@ heatTransferGunnPartField::heatTransferGunnPartField
|
||||
FatalError << "heatTransferGunnPartField: provide list of specific heat capacities." << abort(FatalError);
|
||||
}
|
||||
|
||||
partTempField_.writeOpt() = IOobject::AUTO_WRITE;
|
||||
|
||||
allocateMyArrays();
|
||||
}
|
||||
|
||||
@ -173,18 +175,29 @@ void heatTransferGunnPartField::postFlow()
|
||||
|
||||
void heatTransferGunnPartField::solve()
|
||||
{
|
||||
Info << "patch types of partTemp boundary: " << partTempField_.boundaryField().types() << endl;
|
||||
volScalarField Qsource = QPartFluidCoeff_*tempField_;
|
||||
// for some weird reason, the particle-fluid heat transfer fields were defined with a negative sign
|
||||
|
||||
volScalarField alphaP = 1.0 - voidfraction_;
|
||||
volScalarField correctedQPartFluidCoeff(QPartFluidCoeff_);
|
||||
// no heattransfer in empty cells -- for numerical stability, add small amount
|
||||
forAll(correctedQPartFluidCoeff,cellI)
|
||||
{
|
||||
if (-correctedQPartFluidCoeff[cellI] < SMALL) correctedQPartFluidCoeff[cellI] = -SMALL;
|
||||
}
|
||||
|
||||
volScalarField Qsource = correctedQPartFluidCoeff*tempField_;
|
||||
volScalarField partCpEff = alphaP*partRhoField_*partCpField_;
|
||||
volScalarField thCondEff = alphaP*thermCondModel_().thermCond();
|
||||
// thCondEff.correctBoundaryConditions();
|
||||
|
||||
|
||||
|
||||
fvScalarMatrix partTEqn
|
||||
(
|
||||
// fvm::ddt(partCpEff, partTempField_)
|
||||
// + Qsource
|
||||
Qsource
|
||||
- fvm::Sp(QPartFluidCoeff_, partTempField_)
|
||||
- fvm::Sp(correctedQPartFluidCoeff, partTempField_)
|
||||
- fvm::laplacian(thCondEff,partTempField_)
|
||||
==
|
||||
fvOptions(partCpEff, partTempField_)
|
||||
@ -199,8 +212,15 @@ void heatTransferGunnPartField::solve()
|
||||
|
||||
partTEqn.solve();
|
||||
|
||||
partTempField_.relax();
|
||||
|
||||
fvOptions.correct(partTempField_);
|
||||
|
||||
dimensionedScalar pTMin("pTMin",dimensionSet(0,0,0,1,0,0,0),293.0);
|
||||
dimensionedScalar pTMax("pTMin",dimensionSet(0,0,0,1,0,0,0),3000.0);
|
||||
partTempField_ = max(partTempField_, pTMin);
|
||||
partTempField_ = min(partTempField_, pTMax);
|
||||
|
||||
Info<< "partT max/min : " << max(partTempField_).value() << " " << min(partTempField_).value() << endl;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user