Skip to content
Snippets Groups Projects
Commit f8539f8b authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

ENH: use default zero (opaque) "transmissivity" in radiation lookup

- improves input compatibility with existing setups
parent 836d3a84
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -82,7 +82,7 @@ Foam::scalar Foam::radiation::lookup::e
const scalar T
) const
{
return(dict_.get<scalar>("emissivity"));
return dict_.get<scalar>("emissivity");
}
......@@ -110,7 +110,7 @@ Foam::scalar Foam::radiation::lookup::a
const scalar T
) const
{
return(dict_.get<scalar>("absorptivity"));
return dict_.get<scalar>("absorptivity");
}
......@@ -124,7 +124,7 @@ Foam::tmp<Foam::scalarField> Foam::radiation::lookup::t
return tmp<scalarField>::New
(
pp_.size(),
dict_.get<scalar>("transmissivity")
dict_.getOrDefault<scalar>("transmissivity", 0)
);
}
......@@ -137,7 +137,7 @@ Foam::scalar Foam::radiation::lookup::t
const scalar T
) const
{
return(dict_.get<scalar>("transmissivity"));
return dict_.getOrDefault<scalar>("transmissivity", 0);
}
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -25,7 +25,7 @@ Class
Foam::radiation::lookup
Description
Look up type of boundary radiation properties.
Lookup type of boundary radiation properties.
Usage
\verbatim
......@@ -35,6 +35,7 @@ Usage
type lookup;
absorptivity 0.1;
emissivity 0.1;
transmissivity 0;
}
\endverbatim
......@@ -62,7 +63,6 @@ class lookup
:
public boundaryRadiationPropertiesPatch
{
protected:
// Protected data
......@@ -70,7 +70,7 @@ protected:
//- Reference to the polyPatch
const polyPatch& pp_;
//-Dictionary
//- Dictionary
const dictionary dict_;
......@@ -88,6 +88,7 @@ public:
//- Destructor
virtual ~lookup() = default;
// Member Functions
//- Return emissivity
......@@ -124,7 +125,7 @@ public:
const scalar T
) const;
//- Return transmissivity on patch
//- Return transmissivity on patch (default: 0)
virtual tmp<scalarField> t
(
const label bandI,
......@@ -132,7 +133,7 @@ public:
scalarField* T
) const;
//- Return transmissivity on face
//- Return transmissivity on face (default: 0)
virtual scalar t
(
const label faceI,
......@@ -162,7 +163,7 @@ public:
virtual tmp<scalarField> rDiff
(
const label bandI,
vectorField* incomingDirection ,
vectorField* incomingDirection,
scalarField* T
) const;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -53,7 +53,7 @@ Foam::radiation::opaqueReflective::opaqueReflective
:
boundaryRadiationPropertiesPatch(dict, pp),
pp_(pp),
fd_(dict.lookupOrDefault<scalar>("fd", 1))
fd_(dict.getOrDefault<scalar>("fd", 1))
{
const dictionary& absorptionDict =
dict.subDict("wallAbsorptionEmissionModel");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment