Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions applications/solvers/additiveFoam/solutionControls.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ scalar nThermoCorr =
scalar thermoTol =
pimple.dict().lookupOrDefault<scalar>("thermoTolerance", 1e-6);

dimensionedScalar Tmax
(
"Tmax",
T.dimensions(),
pimple.dict().lookupOrDefault<scalar>("Tmax", vGreat)
);

// Integrate the total power input to domain
const scalar totalPower = fvc::domainIntegrate(sources.qDot()).value();

Expand Down
10 changes: 9 additions & 1 deletion applications/solvers/additiveFoam/thermo/TEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@
{
#include "thermo/thermoSource.H"

//- optional implicit limiting of temperature field
volScalarField A
(
"A",
dimensionedScalar(rho.dimensions()*Cp.dimensions(), 1e15)
*pos(T - Tmax)
);

//- solve the energy equation
solve
(
TEqn
TEqn + rDeltaT*(fvm::Sp(A, T) - A*Tmax)
==
(
(ddtScheme == "Euler")
Expand Down