Skip to content
Permalink
Browse files

Merge pull request #13054 from snschune/radiative_bc_13053

Implement base class for radiative heat transfer bc
  • Loading branch information...
permcody committed Apr 2, 2019
2 parents faaf216 + 31481cd commit d79007adbd733c2f93da7337e4d1e5c91c74971a
@@ -0,0 +1,18 @@
# InfiniteCylinderRadiativeBC

!syntax description /BCs/InfiniteCylinderRadiativeBC

This boundary condition computes the radiative heat flux from the boundary to
an infinite cylinder completely surrounding it. The boundary itself is assumed
to be a cylinder that is concentric to the enclosing cylinder. Geometry information
is provided by boundary_radius and cylinder_radius parameters. The mesh is not queried for
geometric information.

!listing radiative_bc_cyl.i block=BCs/radiative_bc


!syntax parameters /BCs/InfiniteCylinderRadiativeBC

!syntax inputs /BCs/InfiniteCylinderRadiativeBC

!syntax children /BCs/InfiniteCylinderRadiativeBC
@@ -0,0 +1,45 @@
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#ifndef INFINITECYLINDERRADIATIVEBC_H
#define INFINITECYLINDERRADIATIVEBC_H

#include "RadiativeHeatFluxBCBase.h"

class InfiniteCylinderRadiativeBC;

template <>
InputParameters validParams<InfiniteCylinderRadiativeBC>();

/**
* Boundary condition for radiative heat exchange with a cylinder, the outer
* surface of the domain is assumed to be cylindrical as well
*/
class InfiniteCylinderRadiativeBC : public RadiativeHeatFluxBCBase
{
public:
InfiniteCylinderRadiativeBC(const InputParameters & parameters);

protected:
virtual Real coefficient() const override;

/// emissivity of the cylinder irht with the boundary
const Real _eps_cylinder;

/// radius of the boundary
const Real _boundary_radius;

/// radius of the cylinder around the boundary
const Real _cylinder_radius;

/// coefficients are constant and pre-computed
Real _coefficient;
};

#endif // INFINITECYLINDERRADIATIVEBC_H
@@ -0,0 +1,52 @@
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#ifndef RADIATIVEHEATFLUXBCBASE_H
#define RADIATIVEHEATFLUXBCBASE_H

#include "IntegratedBC.h"

class RadiativeHeatFluxBCBase;

template <>
InputParameters validParams<RadiativeHeatFluxBCBase>();

/**
* Boundary condition for radiative heat flux where temperature and the
* temperature of a body in radiative heat transfer are specified.
*/
class RadiativeHeatFluxBCBase : public IntegratedBC
{
public:
RadiativeHeatFluxBCBase(const InputParameters & parameters);

protected:
virtual Real computeQpResidual();
virtual Real computeQpJacobian();

/**
* qdot = sigma * coeff * (T^4 - Tinf^4 )
* sigma: _sigma_stefan_boltzmann
* coeff: coefficient()
* coefficientBody: cbody
* Tinf: temperature of the body irhs
*/
virtual Real coefficient() const = 0;

/// Stefan-Boltzmann constant
const Real _sigma_stefan_boltzmann;

/// Function describing the temperature of the body irhs
Function & _tinf;

/// Emissivity of the boundary
const Real _eps_boundary;
};

#endif // RADIATIVEHEATFLUXBCBASE_H
@@ -0,0 +1,47 @@
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#include "InfiniteCylinderRadiativeBC.h"
#include "MathUtils.h"

registerMooseObject("HeatConductionApp", InfiniteCylinderRadiativeBC);

template <>
InputParameters
validParams<InfiniteCylinderRadiativeBC>()
{
InputParameters params = validParams<RadiativeHeatFluxBCBase>();
params.addParam<Real>("cylinder_emissivity",
1,
"Emissivity of the cylinder in radiative heat transfer with the boundary.");
params.addRequiredParam<Real>("boundary_radius",
"Radius of the boundary approximated as cylinder.");
params.addRequiredParam<Real>("cylinder_radius",
"Radius of the cylinder on the outside of the boundary.");
params.addClassDescription("Boundary condition for radiative heat exchange with a cylinder"
"where the boundary is approximated as a cylinder as well.");
return params;
}

InfiniteCylinderRadiativeBC::InfiniteCylinderRadiativeBC(const InputParameters & parameters)
: RadiativeHeatFluxBCBase(parameters),
_eps_cylinder(getParam<Real>("cylinder_emissivity")),
_boundary_radius(getParam<Real>("boundary_radius")),
_cylinder_radius(getParam<Real>("cylinder_radius"))
{
_coefficient =
_eps_boundary * _eps_cylinder * _cylinder_radius /
(_eps_cylinder * _cylinder_radius + _eps_boundary * _boundary_radius * (1 - _eps_cylinder));
}

Real
InfiniteCylinderRadiativeBC::coefficient() const
{
return _coefficient;
}
@@ -0,0 +1,49 @@
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#include "RadiativeHeatFluxBCBase.h"
#include "Function.h"
#include "MathUtils.h"

template <>
InputParameters
validParams<RadiativeHeatFluxBCBase>()
{
InputParameters params = validParams<IntegratedBC>();
params.addParam<Real>("stefan_boltzmann_constant", 5.670367e-8, "The Stefan-Boltzmann constant.");
params.addParam<FunctionName>(
"Tinfinity", "0", "Temperature of the body in radiative heat transfer.");
params.addParam<Real>("boundary_emissivity", 1, "Emissivity of the boundary.");
params.addClassDescription("Boundary condition for radiative heat flux where temperature and the"
"temperature of a body in radiative heat transfer are specified.");
return params;
}

RadiativeHeatFluxBCBase::RadiativeHeatFluxBCBase(const InputParameters & parameters)
: IntegratedBC(parameters),
_sigma_stefan_boltzmann(getParam<Real>("stefan_boltzmann_constant")),
_tinf(getFunction("Tinfinity")),
_eps_boundary(getParam<Real>("boundary_emissivity"))
{
}

Real
RadiativeHeatFluxBCBase::computeQpResidual()
{
Real T4 = MathUtils::pow(_u[_qp], 4);
Real T4inf = MathUtils::pow(_tinf.value(_t, _q_point[_qp]), 4);
return _test[_i][_qp] * _sigma_stefan_boltzmann * coefficient() * (T4 - T4inf);
}

Real
RadiativeHeatFluxBCBase::computeQpJacobian()
{
Real T3 = MathUtils::pow(_u[_qp], 3);
return 4 * _sigma_stefan_boltzmann * _test[_i][_qp] * coefficient() * T3 * _phi[_j][_qp];
}
@@ -0,0 +1,3 @@
time,max_temp,min_temp,right
0,0,0,0
1,799.9985016226,799.94922579502,3817.9066012844
@@ -0,0 +1,120 @@
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#

[MeshGenerators]
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
ix = '1 10'
dy = '1 1'
subdomain_id = '1 2 1 2'
[../]

[./remove_1]
type = BlockDeletionGenerator
block_id = 1
input = cartesian
[../]

[./readd_left]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(x - 1) < 1e-4'
new_sideset_name = left
input = remove_1
[../]
[]

[Mesh]
type = MeshGeneratorMesh
[]

[Problem]
coord_type = RZ
[]

[Variables]
[./temp]
initial_condition = 800.0
[../]
[]

[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]

[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 800
[../]

[./radiative_bc]
type = InfiniteCylinderRadiativeBC
boundary = right
variable = temp
boundary_radius = 2
boundary_emissivity = 0.2
cylinder_radius = 3
cylinder_emissivity = 0.7
Tinfinity = 500
[../]
[]

[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '1 1.0e5'
[../]
[]

[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]

[Executioner]
type = Steady
petsc_options = '-snes_converged_reason'
line_search = none
nl_rel_tol = 1e-6
nl_abs_tol = 1e-7
[]

[Postprocessors]
[./right]
type = SideFluxAverage
variable = temp
boundary = right
diffusivity = thermal_conductivity
[../]

[./min_temp]
type = ElementExtremeValue
variable = temp
value_type = min
[../]

[./max_temp]
type = ElementExtremeValue
variable = temp
value_type = max
[../]
[]

[Outputs]
csv = true
[]
@@ -0,0 +1,10 @@
[Tests]
[./radiative_bc_cyl]
type = CSVDiff
input = 'radiative_bc_cyl.i'
csvdiff = 'radiative_bc_cyl_out.csv'
requirement = "Moose shall be able to model radiative transfer from a cylindrical surface as boundary condition."
design = 'source/bcs/InfiniteCylinderRadiativeBC.md'
issues = "#13053"
[../]
[]

0 comments on commit d79007a

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