Main Content

setupRadiation

Specify radiation parameters for surface-to-surface heat transfer

Since R2023b

    Description

    fem = setupRadiation(fem) 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 surfaceToSurfaceSettings object and returns the specified model, fem, with its ThermalRadiation property set to that object.

    example

    fem = setupRadiation(fem,Name=Value) 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.

    Examples

    collapse all

    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);

    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.2118    0.2115    0.2119    0.2113
        0.2020    0.0000    0.2117    0.2114    0.2117    0.2112
        0.2110    0.2110    0.0000    0.2115    0.2020    0.2112
        0.2112    0.2114    0.2113    0.0000    0.2115    0.2020
        0.2108    0.2111    0.2020    0.2113    0.0000    0.2116
        0.2114    0.2115    0.2115    0.2020    0.2111    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.2039    0.2005    0.1973    0.1996    0.2009
        0.2032         0    0.2050    0.1981    0.2015    0.2042
        0.1994    0.2029         0    0.2032    0.2014    0.2020
        0.2036    0.1994    0.1997         0    0.2038    0.2029
        0.1946    0.2009    0.2025    0.2027         0    0.2000
        0.2076    0.2015    0.2032    0.2080    0.2038         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

    collapse all

    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")

    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]}

    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

    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

    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 calling setupRadiation.

    • When calling setupRadiation, always use fem as the output argument to assign the resulting surfaceToSurfaceSettings object to the ThermalRadiation property of the model.

    Version History

    Introduced in R2023b

    expand all