Skip to content
Permalink
Browse files

radiation: Removed the redundant "radiation off" switch from radiatio…

…nProperties

To switch-off radiation set

    radiationModel  none;

in radiationProperties which instantiates "null" model that does not read any
data or coefficients or evaluate any fields.
  • Loading branch information...
Henry Weller
Henry Weller committed Jul 25, 2018
1 parent 9cf8078 commit ab31777e9cd39dcbb94dbd9ea79fb7785a250ce1
Showing with 38 additions and 111 deletions.
  1. +1 −1 applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C
  2. +1 −1 applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C
  3. +1 −3 etc/templates/singleFluidCHT/templates/materials/air/radiationProperties
  4. +1 −3 etc/templates/singleFluidCHT/templates/materials/water/radiationProperties
  5. +1 −1 src/thermophysicalModels/radiation/include/createIncompressibleRadiationModel.H
  6. +8 −4 src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C
  7. +3 −0 src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.H
  8. +22 −39 src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.C
  9. +0 −9 src/thermophysicalModels/radiation/radiationModels/radiationModel/radiationModel.H
  10. +0 −4 tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/constant/air/radiationProperties
  11. +0 −3 tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/bottomWater/radiationProperties
  12. +0 −3 tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/constant/gas/radiationProperties
  13. +0 −3 tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner/constant/solid/radiationProperties
  14. +0 −3 ...ls/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/bottomAir/radiationProperties
  15. +0 −3 ...rials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/radiationProperties
  16. +0 −2 tutorials/lagrangian/reactingParcelFoam/counterFlowFlame2DLTS/constant/radiationProperties
  17. +0 −3 tutorials/lagrangian/reactingParcelFoam/cylinder/constant/radiationProperties
  18. +0 −4 tutorials/lagrangian/reactingParcelFoam/filter/constant/radiationProperties
  19. +0 −3 tutorials/lagrangian/reactingParcelFoam/hotBoxes/constant/radiationProperties
  20. +0 −2 tutorials/lagrangian/reactingParcelFoam/parcelInBox/constant/radiationProperties
  21. +0 −3 tutorials/lagrangian/reactingParcelFoam/rivuletPanel/constant/radiationProperties
  22. +0 −3 tutorials/lagrangian/reactingParcelFoam/splashPanel/constant/radiationProperties
  23. +0 −4 tutorials/lagrangian/reactingParcelFoam/verticalChannel/constant/radiationProperties
  24. +0 −2 tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/constant/radiationProperties
  25. +0 −2 tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/constant/radiationProperties
  26. +0 −3 tutorials/lagrangian/sprayFoam/aachenBomb/constant/radiationProperties
@@ -48,7 +48,7 @@ Description
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "radiationModel.H"
#include "noRadiation.H"
#include "fvOptions.H"
#include "pimpleControl.H"

@@ -48,7 +48,7 @@ Description
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "radiationModel.H"
#include "noRadiation.H"
#include "fvOptions.H"
#include "simpleControl.H"

@@ -15,9 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel P1;
radiationModel none; // P1;

solverFreq 1;

@@ -15,9 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel P1;
radiationModel none; // P1;

solverFreq 1;

@@ -10,7 +10,7 @@
1.0
);

if (radiation->radiation())
if (!isType<radiation::noRadiation>(radiation()))
{
IOdictionary transportProperties
(
@@ -68,16 +68,20 @@ Foam::radiation::noRadiation::~noRadiation()

// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

bool Foam::radiation::noRadiation::read()
{
return radiationModel::read();
}
void Foam::radiation::noRadiation::correct()
{}


void Foam::radiation::noRadiation::calculate()
{}


bool Foam::radiation::noRadiation::read()
{
return radiationModel::read();
}


Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const
{
return tmp<volScalarField>
@@ -85,6 +85,9 @@ public:

// Edit

//- Main update/correction routine
void correct();

//- Solve radiation equation(s)
void calculate();

@@ -74,19 +74,16 @@ Foam::IOobject Foam::radiation::radiationModel::createIOobject

void Foam::radiation::radiationModel::initialise()
{
if (radiation_)
{
solverFreq_ = max(1, lookupOrDefault<label>("solverFreq", 1));
solverFreq_ = max(1, lookupOrDefault<label>("solverFreq", 1));

absorptionEmission_.reset
(
absorptionEmissionModel::New(*this, mesh_).ptr()
);
absorptionEmission_.reset
(
absorptionEmissionModel::New(*this, mesh_).ptr()
);

scatter_.reset(scatterModel::New(*this, mesh_).ptr());
scatter_.reset(scatterModel::New(*this, mesh_).ptr());

soot_.reset(sootModel::New(*this, mesh_).ptr());
}
soot_.reset(sootModel::New(*this, mesh_).ptr());
}


@@ -108,7 +105,6 @@ Foam::radiation::radiationModel::radiationModel(const volScalarField& T)
mesh_(T.mesh()),
time_(T.time()),
T_(T),
radiation_(false),
coeffs_(dictionary::null),
solverFreq_(0),
firstIter_(true),
@@ -128,19 +124,13 @@ Foam::radiation::radiationModel::radiationModel
mesh_(T.mesh()),
time_(T.time()),
T_(T),
radiation_(lookupOrDefault("radiation", true)),
coeffs_(subOrEmptyDict(type + "Coeffs")),
solverFreq_(1),
firstIter_(true),
absorptionEmission_(nullptr),
scatter_(nullptr),
soot_(nullptr)
{
if (readOpt() == IOobject::NO_READ)
{
radiation_ = false;
}

initialise();
}

@@ -167,7 +157,6 @@ Foam::radiation::radiationModel::radiationModel
mesh_(T.mesh()),
time_(T.time()),
T_(T),
radiation_(lookupOrDefault("radiation", true)),
coeffs_(subOrEmptyDict(type + "Coeffs")),
solverFreq_(1),
firstIter_(true),
@@ -187,11 +176,25 @@ Foam::radiation::radiationModel::~radiationModel()

// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

void Foam::radiation::radiationModel::correct()
{
if (firstIter_ || (time_.timeIndex() % solverFreq_ == 0))
{
calculate();
firstIter_ = false;
}

if (!soot_.empty())
{
soot_->correct();
}
}


bool Foam::radiation::radiationModel::read()
{
if (regIOobject::read())
{
lookup("radiation") >> radiation_;
coeffs_ = subOrEmptyDict(type() + "Coeffs");

solverFreq_ = lookupOrDefault<label>("solverFreq", 1);
@@ -206,26 +209,6 @@ bool Foam::radiation::radiationModel::read()
}


void Foam::radiation::radiationModel::correct()
{
if (!radiation_)
{
return;
}

if (firstIter_ || (time_.timeIndex() % solverFreq_ == 0))
{
calculate();
firstIter_ = false;
}

if (!soot_.empty())
{
soot_->correct();
}
}


Foam::tmp<Foam::fvScalarMatrix> Foam::radiation::radiationModel::Sh
(
const basicThermo& thermo,
@@ -86,9 +86,6 @@ protected:
//- Reference to the temperature field
const volScalarField& T_;

//- Radiation model on/off flag
Switch radiation_;

//- Radiation model dictionary
dictionary coeffs_;

@@ -211,12 +208,6 @@ public:

// Access

//- Radiation model on/off flag
const Switch radiation() const
{
return radiation_;
}

//- Source term component (for power of T^4)
virtual tmp<volScalarField> Rp() const = 0;

@@ -16,10 +16,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;



// ************************************************************************* //
@@ -14,9 +14,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -15,9 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -15,9 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -14,9 +14,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -16,9 +16,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -15,8 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;

// ************************************************************************* //
@@ -15,9 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -15,10 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;



// ************************************************************************* //
@@ -15,9 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -15,8 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;

// ************************************************************************* //
@@ -15,9 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -15,9 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //
@@ -15,10 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;

solverFreq 10;

// ************************************************************************* //
@@ -15,8 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;

// ************************************************************************* //
@@ -15,8 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;

// ************************************************************************* //
@@ -15,9 +15,6 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation off;

radiationModel none;


// ************************************************************************* //

0 comments on commit ab31777

Please sign in to comment.
You can’t perform that action at this time.