setupRadiation
Description
fem = setupRadiation(
enables
surface-to-surface radiation analysis using the enclosure formed by all faces of the
specified model. An enclosure is a group of surfaces between which heat transfer occurs due
to radiation without conductive media. The function creates a
fem
)surfaceToSurfaceSettings
object and returns the specified model,
fem
, with its ThermalRadiation
property set to that
object.
fem = setupRadiation(
specifies additional options using one or more name-value arguments. For example, you can
specify the faces to form enclosures, the enclosure names, and their perfectness.fem
,Name=Value
)
Examples
Specify Radiation Parameters
Specify radiation parameters for heat transfer between two parallel plates.
Create the geometry representing two parallel plates of the same dimensions. The distance between the plates is 0.4 m.
dist = 0.4; W = 0.05; L = 0.5; H = 0.5; R1 = [3 4 0 W W 0 0 0 L L]; R2 = [3 4 W+dist 2*W+dist 2*W+dist W+dist 0 0 L L]; geom2D = fegeometry(decsg([R1(:) R2(:)], ... 'R1+R2',[char('R1')' char('R2')'])); geom3D = extrude(geom2D,H); pdegplot(geom3D,FaceLabels="on",FaceAlpha=0.3)
Create a finite element model for thermal analysis and include the geometry.
fem = femodel(AnalysisType="thermalSteady",Geometry=geom3D);
Generate a mesh.
fem = generateMesh(fem,Hmax=H/4);
Account for surface-to-surface radiation in the enclosure formed by the plates by using the setupRadiation
function.
fem = setupRadiation(fem,EnclosureFaces=[5 6]); fem.ThermalRadiation
ans = surfaceToSurfaceSettings with properties: ViewFactors: [204x204 double] ViewFactorMethod: "areaintegral" Enclosures: dictionary (string --> enclosureDefinition) with 1 entry ParticipatingEnclosures: "Enclosure_1"
If you do not specify enclosure names, setupRadiation
uses the default names, such as "Enclosure_1"
. The function also sets the enclosure perfectness to true
, which means that the solver ignores ambient radiation. To change these settings, use the EnclosureNames
and PerfectEnclosure
name-value arguments.
fem = setupRadiation(fem,EnclosureFaces=[5 6], ... EnclosureNames="two_plates", ... PerfectEnclosure=false); fem.ThermalRadiation
ans = surfaceToSurfaceSettings with properties: ViewFactors: [204x204 double] ViewFactorMethod: "areaintegral" Enclosures: dictionary (string --> enclosureDefinition) with 1 entry ParticipatingEnclosures: "two_plates"
Specify ambient temperature and emissivity for the enclosure formed by the plates.
fem.FaceLoad([5 6]) = faceLoad(AmbientTemperature=0,Emissivity=0.5);
Compute View Factors
Since R2024a
Find view factors in a cubical cavity using the double area integral method and the Monte Carlo method.
Create and plot a geometry of a sphere with a cubical cavity.
L = 1;
g1 = multisphere(L*1.1);
g2 = multicuboid(L,L,L,Zoffset=-L/2);
g1 = addVoid(g1,g2);
pdegplot(g1,FaceAlpha=0.2,FaceLabels="on")
Create a finite element model for thermal analysis and include the geometry.
fem = femodel(AnalysisType="thermalSteady",Geometry=g1);
Generate a mesh.
fem = generateMesh(fem,Hmax=0.1*L);
Account for surface-to-surface radiation in the enclosure represented by the cubical cavity. By default, the setupRadiation
function uses the double area integral method to compute view factors.
fem = setupRadiation(fem,EnclosureFaces=2:7);
The toolbox computes view factors based on the finite element mesh. Use the extractGeometricAreaViewFactors
helper function to map the computed mesh view factors to the geometric face view factors. To view the code for this function, see Helper Function.
[~,ViewFactors] = extractGeometricAreaViewFactors(fem); ViewFactors
ViewFactors = 6×6
0.0000 0.2020 0.2114 0.2116 0.2110 0.2116
0.2020 0.0000 0.2106 0.2112 0.2109 0.2113
0.2113 0.2121 0.0000 0.2112 0.2019 0.2114
0.2111 0.2115 0.2114 0.0000 0.2112 0.2019
0.2117 0.2117 0.2019 0.2114 0.0000 0.2110
0.2110 0.2113 0.2112 0.2019 0.2115 0.0000
The view factors between each face must be 0.2, which means that all off-diagonal entries in ViewFactors
must be very close to 0.2. Now, compute the view factors using the Monte Carlo method and compare the results.
fem = setupRadiation(fem, ... EnclosureFaces=2:7, ... ViewFactorMethod="montecarlo");
The Monte Carlo method improves results for enclosures with a shared edge, but it can take longer to compute view factors.
[~,ViewFactors_MC] = extractGeometricAreaViewFactors(fem); ViewFactors_MC
ViewFactors_MC = 6×6
0 0.2023 0.2030 0.1988 0.2022 0.1980
0.2037 0 0.2029 0.2036 0.2020 0.2014
0.2009 0.2007 0 0.2028 0.2041 0.2012
0.2021 0.2035 0.1975 0 0.1993 0.2045
0.1974 0.1986 0.2012 0.2009 0 0.2047
0.2052 0.2063 0.2035 0.2036 0.2013 0
Helper Function
This code defines the extractGeometricAreaViewFactors
helper function, which maps view factors from a mesh to a geometry.
function [A,F] = extractGeometricAreaViewFactors(fem) map = []; for i = 1:length(fem.ThermalRadiation.ParticipatingEnclosures) map = [map, ... fem.ThermalRadiation.Enclosures( ... fem.ThermalRadiation.ParticipatingEnclosures(i) ... ).BoundaryFacetMapping]; end A = zeros(size(map,2),1); F = zeros(size(map,2)); for i = 1:size(map,2) FacetsIDi = map(2:3,i); FacetsIDi = FacetsIDi(1):FacetsIDi(end); FacetsAi = fem.ThermalRadiation.Area(FacetsIDi); Ai = sum(FacetsAi); A(i) = Ai; for j = 1:size(map,2) FacetsIDj = map(2:3,j); FacetsIDj = FacetsIDj(1):FacetsIDj(end); FacetsFij = ... fem.ThermalRadiation.ViewFactors(FacetsIDj, ... FacetsIDi); F(i,j) = sum(FacetsFij*FacetsAi)/sum(FacetsAi); end end end
Input Arguments
fem
— Finite element model
femodel
object
Finite element model, specified as an femodel
object.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: fem = setupRadiation(fem,EnclosureFaces=[5
6],EnclosureNames="two_plates")
EnclosureFaces
— Faces to form enclosures
vector of positive integers | cell array of vectors of positive integers
Faces to form enclosures, specified as a vector of positive integers for one enclosure in the model or a cell array of vectors of positive integers for multiple enclosures in the model.
Example: EnclosureFaces={[1 2 50],[68 97]}
EnclosureNames
— Names of enclosures
"Enclosure_1","Enclosure_2",...
(default) | string | character vector | vector of strings | cell array of character vectors
Names of enclosures, specified as a string or a character vector for a single enclosure or a vector of strings or cell array of character vectors for multiple enclosures.
Example: EnclosureNames=["groupA" "groupB"]
Data Types: string
| char
PerfectEnclosure
— Enclosure perfectness
true
(default) | false
| logical vector
Enclosure perfectness, specified as true
or
false
for a single enclosure or a vector of these values for
multiple enclosures. Setting perfectness to true
ignores ambient
radiation.
Example: PerfectEnclosure=[true false]
Data Types: logical
ViewFactorMethod
— Method for computing view factors
"areaintegral"
(default) | "montecarlo"
Since R2024a
Method for computing view factors, specified as "areaintegral"
or montecarlo"
. By default, the method uses the double area
integral method to compute view factors. The Monte Carlo method improves results for
enclosures with a shared edge, such as two orthogonal faces of a box, but it can take
longer to compute view factors.
Example: ViewFactorMethod="montecarlo"
Data Types: string
Tips
You must generate a mesh before specifying radiation parameters. Call
generateMesh
before callingsetupRadiation
.When calling
setupRadiation
, always usefem
as the output argument to assign the resultingsurfaceToSurfaceSettings
object to theThermalRadiation
property of the model.
Version History
Introduced in R2023bR2024a: Compute view factors using Monte Carlo method
In addition to the default double area integral method for computing view factors, the
toolbox now supports the Monte Carlo method. You can specify the view factor computation
method by using the ViewFactorMethod
name-value argument.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)