CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Odd results with solar load

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By me3840
  • 1 Post By me3840

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 4, 2020, 12:16
Default Odd results with solar load
  #1
Senior Member
 
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25
me3840 is on a distinguished road
Hello all,


I'm trying to make a case with solar loading. Only some of my surfaces are attached to solids, the rest are adiabatic. All surfaces (except for the outer domain walls) are opaqueDiffusive. This setup is very similar to the simpleCarSolarPanel tutorial.


That tutorial looks to have reasonable interactions with the surfaces; the opaque surfaces, even though they're adiabatic, provide shade for other surfaces behind them. This can be seen by looking at the qr field.


However my case (with a similar setup) has very strange shading interactions. Sometimes opaque surfaces provide shade, sometimes they don't, and qr is only nonzero on the surfaces which attach to solids; the other adiabatic surfaces always show qr=0, which doesn't make sense. Can anyone see errors in my setup here? Attached is an image from a test case with the sun pointing straight down (-z). From this perspective, only the cap and the top vane should see any direct sun at all, and the others should be almost completely shaded, but clearly that's not the case.


Images here:
https://imgur.com/a/Q3DbIYG


boundaryRadiationProperties:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      boundaryRadiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

"domain_inlet"
{
    type        transparent;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        emissivity      (1 1);
        absorptivity    (0 0);
    }
}

"domain_outlet"
{
    type        transparent;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        emissivity      (1 1);
        absorptivity    (0 0);
    }
}

"domain_left"
{
    type        transparent;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        emissivity      (1 1);
        absorptivity    (0 0);
    }
}

"domain_right"
{
    type        transparent;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        emissivity      (1 1);
        absorptivity    (0 0);
    }
}

"domain_top"
{
    type        transparent;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        emissivity      (1 1);
        absorptivity    (0 0);
    }
}

"domain_ground"
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.6 0.6);
        emissivity      (0.98 0.98);
    };
}

bottom_plate
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.3);
        emissivity      (0.8 0.8);
    };
}

chassis_poles
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.3);
        emissivity      (0.8 0.8);
    };
}

raspi_zero_w
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.7 0.7);
        emissivity      (0.8 0.8);
    };
}

sensor_mount
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.3);
        emissivity      (0.8 0.8);
    };
}

sensor_support
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.3);
        emissivity      (0.8 0.8);
    };
}

vanes
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.3);
        emissivity      (0.8 0.8);
    };
}

cap
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.3);
        emissivity      (0.8 0.8);
    };
}

hardware_plate
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.3);
        emissivity      (0.8 0.8);
    };
}

sensor
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.7 0.7);
        emissivity      (0.8 0.8);
    };
}

top_plate
{
    type       opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.3);
        emissivity      (0.8 0.8);
    };
}
// ************************************************************************* //

radiationProperties:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      radiationProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

radiation       on;

radiationModel  solarLoad;

solarLoadCoeffs
{

    // Sun direction ray model. Give the sunDirection or calculated using the
    // (solar calculator)
    sunDirectionModel   sunDirConstant; //sunDirTracking

        // Time interval to update Sun position (sec)
        sunTrackingUpdateInterval 800;

        sunDirection        (0 0 -1);

        localStandardMeridian   -5;      // GMT offset (hours)
        startDay                204;    // day of the year
        startTime               15.0;     // time of the day (hours decimal)
        longitude               -80.917; // longitude (degrees)
        latitude                28.453; // latitude (degrees)


        // Grid orientation
        gridUp                  (0 0 1);
        gridEast                (1 0 0);

    // Energy spectrum
    spectralDistribution (2 1);

    // Solar model:

        // sunLoadConstant-sunLoadFairWeatherConditions-SunLoadTheoreticalMaximum;
        sunLoadModel sunLoadConstant;

        // Sun load constant model
        directSolarRad  500;    // [w/m2]
        diffuseSolarRad 0;     // [w/m2]

        // Fair Weather Conditions Model Constants.
        // Calculate beta from the Solar calculator or input
        A       500;        // Apparent solar irradiation at air mass m = 0
        B       0.142;      // Atmospheric extinction coefficient
        //beta    45;         // Solar altitude (in degrees) above the horizontal

        // Theoretical maximum model constants
        Setrn       10;
        SunPrime    1;

        // Ground reflectivity
        groundReflectivity 0.2;

        // Solar diffusivity constants
        C   0.058;  // Model constant

    // Radiative flux coupling flags
    solidCoupled    true;  //Couple through qr the solid regions (default true)
    wallCoupled     false; //Couple through qr wall patches (default false)

    // Reflecting rays
        useReflectedRays true;
        reflecting
        {
            nPhi        10;
            nTheta      10;
        }

    absorptionEmissionModel none;
    scatterModel            none;
    sootModel               none;

}


viewFactorCoeffs
{
    smoothing true; //Smooth view factor matrix (use when in a close surface
                    //to force Sum(Fij = 1)
    constantEmissivity true; //constant emissivity on surfaces.

    nBands    2;

    useSolarLoad       true;
}

// Number of flow iterations per radiation iteration
solverFreq 1;

absorptionEmissionModel none;

scatterModel    none;

sootModel       none;

// ************************************************************************* //
Alex Lee and B_R_Khan like this.
me3840 is offline   Reply With Quote

Old   October 12, 2020, 23:25
Default
  #2
Senior Member
 
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25
me3840 is on a distinguished road
I may have found the solution to this.


In faceShading.C, the start and end points of the rays used to calculate face intersections are computed using the face center of a given face and a vector d.


Vector d is calculated as:
Code:
scalar maxBounding = 5.0*mag(mesh_.bounds().max() - mesh_.bounds().min());

const vector d(direction_*maxBounding);

where direction_ is the direction specified in the solar load. So essentially we scale the direction_ by a geometric size which is proportional to the length of the diagonal of the bounding box of the mesh.

The start and end points used for mesh intersection are calculated:
Code:
start.append(fc - 0.001*d);
end.append(fc - d);

This means that the start point, depending on a given face having proximity to a different face, may not be very close to the (original) face that the line intersection is being calculated on. In my case, since I have a lot of fins close together, this occurred.

One can sidestep this problem by just making the direction multiplication very small, i.e.
Code:
start.append(fc - 0.00001*d);
end.append(fc - d);
Or, you could just remove it all together, I suppose. Anyway, when I did this, I appear to at least get shading that makes sense. I have not computed any solutions using it however, yet.
lumpor likes this.
me3840 is offline   Reply With Quote

Old   January 11, 2022, 06:07
Default
  #3
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 6
B_R_Khan is on a distinguished road
Hi!

I'm not getting non zero qr on any surface when I trun on view factor with solar load. I do not have multiple regions, just a domain with a wall inside. I'm going to try the solution you mentioned but have one confusion: Is it necessary to have multiple regions for view factor ?
B_R_Khan is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solar Load and fvDOM Radiation Modeling Shadab_Ilahi OpenFOAM Running, Solving & CFD 14 August 28, 2024 08:11
ray-tracing solar load vs DO radiation model nima_nz FLUENT 5 June 26, 2024 01:32
Turned on solar load model, but solar heat flux in the counter plot still remain 0? szhang FLUENT 0 December 1, 2018 12:43
Problem with Solar Ray Tracing apply - please help anna9 FLUENT 1 January 22, 2017 07:01
Impact of Solar Load model on wall temperature vadvadim FLUENT 1 July 14, 2016 18:03


All times are GMT -4. The time now is 06:34.