surfaceToSurfaceSettings
Description
A surfaceToSurfaceSettings
object contains
information about the parameters for thermal radiation analysis between surfaces without
conductive media. The settings include all defined enclosures, names of enclosures currently
participating in radiation analysis, and computed view factors.
Creation
The setupRadiation
function creates a surfaceToSurfaceSettings
object stored in the
ThermalRadiation
property of an femodel
object.
When calling setupRadiation
, use fem
as both the
input and output argument to assign the resulting surfaceToSurfaceSettings
object to the ThermalRadiation
property of the specified model.
Properties
ViewFactors
— Computed view factors
numeric matrix
This property is read-only.
Computed view factors, stored as a numeric matrix. Computing view factors involves determining which mesh facet on the boundary sees which other facets, including the effect of shadowing. The toolbox uses ray tracing to determine shadowing, while it uses the double area integral method or the Monte Carlo method to compute the view factors themselves.
Data Types: double
ViewFactorMethod
— Method for computing view factors
"areaintegral"
(default) | "montecarlo"
Since R2024a
This property is read-only.
Method for computing view factors, stored as "areaintegral"
or
montecarlo"
.
Computing view factors involves determining which mesh facet on the boundary sees which other facets, including the effect of shadowing. The toolbox uses ray tracing to determine shadowing. By default, it uses the double area integral method to compute view factors. Using the Monte Carlo method instead improves results for enclosures with a shared edge, such as two orthogonal faces of a box, but it can take longer.
Data Types: string
Enclosures
— Enclosures for surface-to-surface radiation analysis
dictionary (string
⟼
enclosureDefinition
)
Enclosures for surface-to-surface radiation analysis, stored as a dictionary with
string
keys and enclosureDefinition
values. Each
enclosure is a group of surfaces between which heat transfer occurs due to radiation
without conductive media.
ParticipatingEnclosures
— Names of enclosures participating in radiation analysis
string | vector of strings
This property is read-only.
Names of enclosures participating in radiation analysis, stored as a string or a vector of strings.
Data Types: string
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
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. To support different view factor computation
methods, the surfaceToSurfaceSettings
object has a new
ViewFactorMethod
property.
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 (한국어)