Calculate BCs for thermDiff instead of specifying them separately.

This commit is contained in:
Thomas Lichtenegger
2016-06-03 10:37:44 +02:00
parent 59eb7962f4
commit f814cece09
5 changed files with 19 additions and 13 deletions

View File

@ -3,15 +3,16 @@
// solve temperature transport equation assuming const. density and heat capacity
thDiff=voidfraction*particleCloud.thermCondM().thermDiff();
thDiff.correctBoundaryConditions();
thDiff=particleCloud.thermCondM().thermDiff();
// BC for thDiff are calculated from its mathematical expression
// to enforce user-defined values, change thDiff to MUST_READ and do
// thDiff.correctBoundaryConditions();
fvScalarMatrix TEqn
(
fvm::ddt(voidfraction,T) + fvm::div(phi, T)
- fvm::Sp(fvc::ddt(voidfraction),T) - fvm::Sp(fvc::div(phi),T)
// - fvm::laplacian(voidfraction*particleCloud.thermCondM().thermDiff(), T)
- fvm::laplacian(thDiff, T)
- fvm::laplacian(voidfraction*thDiff, T)
==
Qsource/(rho*Cp)
);

View File

@ -127,10 +127,11 @@
"thDiff",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh
mesh,
dimensionedScalar("zero", dimensionSet(0,2,-1,0,0,0,0), 0.0)
);
Info<< "\nCreating temperature gradient field\n" << endl;

View File

@ -5,8 +5,10 @@
volScalarField& he = thermo.he();
particleCloud.energyContributions(Qsource);
thDiff=particleCloud.thermCondM().thermDiff();
thDiff.correctBoundaryConditions();
thDiff=particleCloud.thermCondM().thermDiff();
// BC for thDiff are calculated from its mathematical expression
// to enforce user-defined values, change thDiff to MUST_READ and do
// thDiff.correctBoundaryConditions();
fvScalarMatrix EEqn
(
@ -25,7 +27,7 @@
// net heat transfer from particles to fluid
- Qsource
// thermal conduction of the fluid with effective conductivity
- fvc::laplacian(rhoeps*thDiff,he)
- fvm::laplacian(rhoeps*thDiff,he)
// + particle-fluid energy transfer due to work
// + fluid energy dissipation due to shearing

View File

@ -106,10 +106,11 @@
"thDiff",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh
mesh,
dimensionedScalar("zero", dimensionSet(0,2,-1,0,0,0,0), 0.0)
);
#ifndef compressibleCreatePhi_H

View File

@ -76,10 +76,11 @@ Info<< "Reading thermophysical properties\n" << endl;
"thDiff",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh
mesh,
dimensionedScalar("zero", dimensionSet(0,2,-1,0,0,0,0), 0.0)
);
#ifndef compressibleCreatePhi_H