CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

solarLoad openfoam 7

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 2 Post By olesen
  • 1 Post By lumpor
  • 1 Post By lumpor
  • 1 Post By Abs11

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2021, 03:29
Default solarLoad openfoam 7
  #1
Member
 
Yann Guyot
Join Date: Feb 2019
Posts: 37
Rep Power: 7
YannGuyot is on a distinguished road
Dear All,


I am wondering if some of you use openFoam 7 to solve a case involving solarLoad.
I am looking for some tutorials for such applications.
Thanks a lot in advance


Yann
YannGuyot is offline   Reply With Quote

Old   March 19, 2021, 14:27
Default
  #2
Member
 
Fabian Friberg
Join Date: Dec 2020
Posts: 31
Rep Power: 5
lumpor is on a distinguished road
As far as I know OF7 doesn't have a model for solar load, only OFv2012. I'm running a case using that model.
lumpor is offline   Reply With Quote

Old   March 20, 2021, 15:02
Default
  #3
Member
 
Yann Guyot
Join Date: Feb 2019
Posts: 37
Rep Power: 7
YannGuyot is on a distinguished road
Dear Lumpor,


Do you know why such solver as been removed from newest version of OpenFoam?
Do you mind sharing your case with us here?


Thanks a lot
YannGuyot is offline   Reply With Quote

Old   March 21, 2021, 16:06
Default
  #4
Member
 
Fabian Friberg
Join Date: Dec 2020
Posts: 31
Rep Power: 5
lumpor is on a distinguished road
Dear Yann,


I quickly searched on google and found a thread where you discussed the solarLoad model one year ago. The one you discussed is a part of the openfoam.com version (latest version openfoamv2012, which stands for december 2020, not year 2012), which is the same one that I'm using. It has never been a part of the openfoam.org architecture.


I'm new to CFD so I'm not entirely sure about everything but I'll try my best to not give any false information.


My case isn't really finished yet, I'm still trying to tune the parameters. But here are my 0/T, radiationProperties and boundaryRadiationPreperties files:


T:

Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 283;

boundaryField
{
    top
    {
        type            symmetryPlane;
    }
    ground
    {
    //    type            fixedValue;
    //    value            uniform 296;    
        //type            zeroGradient;
        type            externalWallHeatFluxTemperature;
        mode            coefficient;
        Ta              uniform 283;
    h               20;
        kappaMethod     fluidThermo;
        kappa           none;
    qr        qr;
        value           uniform 283;
    }
    front
    {
        type            empty;
    }
    back
    {
        type            empty;
    }
    left_in
    {
        type            cyclic;
    }
    right_out
    {
        type            cyclic;
    }
    upwindWall
    {
//        type            fixedValue;
//        value            uniform 296;
//    type            zeroGradient;    
        type            externalWallHeatFluxTemperature;
        mode            coefficient;
        Ta              uniform 294;
    h               20;
        thicknessLayers ( 0.15 );
        kappaLayers     ( 0.25 );
        kappaMethod     fluidThermo;
        kappa           none;
    qr        qr;
        value           uniform 283;
    }
    downwindWall
    {
//        type            fixedValue;
//        value            uniform 403;
//    type            zeroGradient;    
        type            externalWallHeatFluxTemperature;
        mode            coefficient;
        Ta              uniform 294;
    h               20;
        thicknessLayers ( 0.15 );
        kappaLayers     ( 0.25 );
        kappaMethod     fluidThermo;
        kappa           none;
    qr        qr;
        value           uniform 283;
    }
    upwindRoof
    {
//        type            fixedValue;
//        value            uniform 296;
    //type            zeroGradient;        
        type            externalWallHeatFluxTemperature;
        mode            coefficient;
        Ta              uniform 294;
    h               20;
        thicknessLayers ( 0.15 );
        kappaLayers     ( 0.25 );
        kappaMethod     fluidThermo;
        kappa           none;
    qr        qr;
        value           uniform 283;
    }
    downwindRoof
    {
//        type            fixedValue;
//        value            uniform 296;
    //type            zeroGradient;    
        type            externalWallHeatFluxTemperature;
        mode            coefficient;
        Ta              uniform 294;
    h               20;
        thicknessLayers ( 0.15 );
        kappaLayers     ( 0.25 );
        kappaMethod     fluidThermo;
        kappa           none;
    qr        qr;
        value           uniform 283;
    }
}
boundaryRadiationProperties

Code:
".*"
{
    type            transparent;
    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        emissivity      (1 1);
        absorptivity    (0 0);
    };
}


////////////////////

upwindWall
{
    type   opaqueDiffusive;

    //fd          0.2; // 0: all specular 1: all diffusive
    wallAbsorptionEmissionModel
    {
         type            multiBandAbsorption;
        absorptivity    (0.2 0.3);
        emissivity      (0.2 0.3);
    };
}
downwindWall
{
    type   opaqueDiffusive;

    //fd          0.2; // 0: all specular 1: all diffusive
    wallAbsorptionEmissionModel
    {
         type            multiBandAbsorption;
        absorptivity    (0.2 0.3);
        emissivity      (0.2 0.3);
    };
}
upwindRoof
{
    type   opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
         type            multiBandAbsorption;
        absorptivity    (0.2 0.3);
        emissivity      (0.2 0.3);
    };
}
downwindRoof
{
    type   opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
         type            multiBandAbsorption;
        absorptivity    (0.2 0.3);
        emissivity      (0.2 0.3);
    };
}
ground
{
    type   opaqueDiffusive;
    wallAbsorptionEmissionModel
    {
         type            multiBandAbsorption;
        absorptivity    (0.2 0.3);
        emissivity      (0.2 0.3);
    };
}
radiationProperties

Code:
radiation       on;

radiationModel  solarLoad;

solarLoadCoeffs
{
    sunDirectionModel   sunDirTracking;
    
    sunTrackingUpdateInterval 500;
    skyCloudCoverFraction 0.01;


    localStandardMeridian   1;     // GMT offset (hours)
    startDay                180;     // day of the year
    startTime               14;     // time of the day (hours decimal)

    longitude               12.0;    // longitude (degrees)
    latitude                58.0;      // latitude (degrees)

    // Grid orientation
    gridUp                  (0 0 1);//001
    gridEast                (0.9 -0.1 0);//010

    // Energy spectrum
    spectralDistribution (2 1);

    sunLoadModel sunLoadFairWeatherConditions;

    // 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.142064516129;      // Atmospheric extinction coefficient


    // Ground reflectivity
    groundReflectivity 0.2;

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

    // Radiative flux coupling flags
    wallCoupled     true;  // Couple through Qr wall patches (default false)

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

    absorptionEmissionModel none;
    scatterModel            none;
    sootModel               none;

}

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

absorptionEmissionModel none;

scatterModel    none;

sootModel       none;
Like I said, the parameters aren't completely tuned, but it does give somewhat reasonable results at the moment.


I tried to combine the solarLoad with a view factor model, but couldn't get it to work.
If you have any specific questions I can try to answer them. I've done some modifying inside the solarLoad library so I know a bit how it works at a lower level.


Best regards,


Fabian

Last edited by lumpor; March 23, 2021 at 07:04.
lumpor is offline   Reply With Quote

Old   March 22, 2021, 03:14
Default
  #5
Member
 
Yann Guyot
Join Date: Feb 2019
Posts: 37
Rep Power: 7
YannGuyot is on a distinguished road
Thank you very much, I actually had no idea about this 2 versions (indeed, i thought 2012 was for the year). So there is two major release, the ESI release and the Foundation releas, both are up to date.
I will check about them both,
Thanks a lot
Yann
YannGuyot is offline   Reply With Quote

Old   March 22, 2021, 10:15
Default
  #6
Member
 
Fabian Friberg
Join Date: Dec 2020
Posts: 31
Rep Power: 5
lumpor is on a distinguished road
Yup, I myself was also very confused by it. Took me several days to figure out I was using the wrong OF version.
lumpor is offline   Reply With Quote

Old   March 22, 2021, 13:53
Default
  #7
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by YannGuyot View Post
Thank you very much, I actually had no idea about this 2 versions (indeed, i thought 2012 was for the year). So there is two major release, the ESI release and the Foundation releas, both are up to date.
I will check about them both,
Thanks a lot
Yann
At least when the v2106 comes out, there shouldn't be any confusion about its age.
Yann and lumpor like this.
olesen is offline   Reply With Quote

Old   March 22, 2021, 14:01
Default
  #8
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by lumpor View Post
Dear Yann,
The one you discussed is a part of openfoam+ (latest version openfoamv2012, which stands for december 2020, not year 2012), which is the same one that I'm using. It was originally implemented in 2016 on openfoam+, so it has never been present in the standard openfoam architecture.
I'm not particularly keen on calling the openfoam.org version standard, which implies that the openfoam.com is somehow non-standard or something. Also, the name "openfoam+" is not exactly a current moniker anymore.
olesen is offline   Reply With Quote

Old   March 23, 2021, 07:02
Default
  #9
Member
 
Fabian Friberg
Join Date: Dec 2020
Posts: 31
Rep Power: 5
lumpor is on a distinguished road
Ah I see. I'll edit it.
olesen likes this.
lumpor is offline   Reply With Quote

Old   May 4, 2022, 05:31
Default question about Solar Load in OF
  #10
New Member
 
Abbes
Join Date: Apr 2022
Posts: 5
Rep Power: 4
Abs11 is on a distinguished road
hello every one,
i'm a new OpenFoam User ( i actually use OpenFOAM-v2006 with a graphic user interface for my master thesis)

i want to do a natural ventilation simulation in a house exposed to solar radiation

i began with simulating an external flow over building with solar load ( with BuoyantSimpleFoam Solver) to get the external temperature but it gives very high temperature ( about 500 K) which is not reasonable. is this because there is no radiation model ?

then i switched to ChtMultiRegionSimpleFoam with two Region solid and fluid but it doesn't work it crashes from the start

my questions are:
- how to simulate this type of cases to get reasonable temperature.
- what a solver to use for this case
- did ChtMultiRegionSimpleFoam support Solar load on OpenFoam v2006 (june 2020).
- if you have any clue or tutorial that can help me for solarload application

please help i'm lost i can't find any tutorial or a paper for this.

please find attached some pictures of my case ( for BuoyantSimpleFoam)

Regards

Abbes
Attached Images
File Type: jpg modele 3D.jpg (21.6 KB, 25 views)
File Type: jpg TempSolBatiment.jpg (30.5 KB, 29 views)
File Type: jpg Qr_Sol_Batiment.jpg (24.4 KB, 20 views)
File Type: jpg Vitesse.jpg (29.4 KB, 21 views)
File Type: jpg TempERATURE YZ.jpg (28.1 KB, 16 views)
Abs11 is offline   Reply With Quote

Old   May 4, 2022, 17:59
Default
  #11
Member
 
Fabian Friberg
Join Date: Dec 2020
Posts: 31
Rep Power: 5
lumpor is on a distinguished road
Quote:
Originally Posted by Abs11 View Post
hello every one,
i'm a new OpenFoam User ( i actually use OpenFOAM-v2006 with a graphic user interface for my master thesis)

i want to do a natural ventilation simulation in a house exposed to solar radiation

i began with simulating an external flow over building with solar load ( with BuoyantSimpleFoam Solver) to get the external temperature but it gives very high temperature ( about 500 K) which is not reasonable. is this because there is no radiation model ?

then i switched to ChtMultiRegionSimpleFoam with two Region solid and fluid but it doesn't work it crashes from the start

my questions are:
- how to simulate this type of cases to get reasonable temperature.
- what a solver to use for this case
- did ChtMultiRegionSimpleFoam support Solar load on OpenFoam v2006 (june 2020).
- if you have any clue or tutorial that can help me for solarload application

please help i'm lost i can't find any tutorial or a paper for this.

please find attached some pictures of my case ( for BuoyantSimpleFoam)

Regards

Abbes
Hi Abbes

1. While it's more realistic to simulate heat loss using radiation, I ended up simply utilizing boundary conditions to keep the temperature low. Here's are two excerpts from my thesis:
Quote:
The building roof and wall boundary condition, as well as the ground’s boundary
condition, were set as the externalWallHeatFluxTemperature type. This boundary
condition specifies an ambient temperature and thermal conductivity for a patch. It
has the following parameters:
46 Chapter 7. Methodology
FIGURE 7.7: Coefficients for the externalWallHeatFluxTemperature
boundary condition. Source: Boundary Conditions - OpenFOAM 4.1,
NEXTFOAM
The heat flux q is calculated depending on the mode of the boundary conditions. If
mode is set to flux, it is supplied by the user using the q parameter. If mode is set to
coefficient, it is calculated with the following equation:
q = (Ta_ − T p) ∗ (1.0/h_ + totalSolidRes) (7.1)
Where Tp is the temperature of the outside cell, and totalSolidRes can be interpreted
as the wall’s thermal resistance, determined by the thicknessLayers and kappaLay-
ers coefficients. This boundary condition therefore regulates the temperature of the
wall to converge towards the specified ambient temperature Ta, with a convergence
speed depending on the thermal conductivity h and the thickness/conductivity lay-
ers of the wall (NEXTFOAM, 2017). We set Ta_ to 283K and modelled thickness
layers and thermal conductivity according to typical building walls in Gothenburg,
Sweden
Quote:
When performing our first test simulations using an A value of 1360 W/m2 and
setting our wall Ta_ coefficients to that of room temperature (294K), we were getting
temperature values much higher than what was physically possible. We therefore
performed parallel experimental simulations with different boundary conditions,
A, and Ta_ values in order to calibrate our case as to better match the experimental
data available. After multiple rounds of simulations, the final values were set as A
= 45 and Ta_ = 283
Please take note that like I was a beginner to OpenFOAM, and haven't used it since I finished my thesis, so I highly doubt this is best practice. If you're interested you'll find my full thesis here:
https://www.overleaf.com/read/mtntmznmtrqv

2. I made solar radiation work using rhoReactingFoam (which I used due to my case including chemical reactions). I think ChtMultiRegionSimpleFoam is a good choice for you, if you can make it work. The multiregion ones are quite difficult though.

3. One of the solarload tutorials uses it doesn't it? I think the one with trees. Then there was one in a car that was quite useful to me, and then there's one using ChtMultiRegionFoam with a cube in the middle.

4. Recalling from memory there were 3 or so tutorials utilizing solar radiation. The grep command is your friend. Other than that, the files posted earlier in this thread and my thesis, I don't know of any resources, sorry :/

(For boundary conditions, the book Boundary Conditions - OpenFOAM-4.1 by NEXTFOAM ain't bad)
lumpor is offline   Reply With Quote

Old   May 5, 2022, 10:30
Default
  #12
New Member
 
Abbes
Join Date: Apr 2022
Posts: 5
Rep Power: 4
Abs11 is on a distinguished road
Quote:
Originally Posted by lumpor View Post
Hi Abbes

1. While it's more realistic to simulate heat loss using radiation, I ended up simply utilizing boundary conditions to keep the temperature low. Here's are two excerpts from my thesis:




Please take note that like I was a beginner to OpenFOAM, and haven't used it since I finished my thesis, so I highly doubt this is best practice. If you're interested you'll find my full thesis here:
https://www.overleaf.com/read/mtntmznmtrqv

2. I made solar radiation work using rhoReactingFoam (which I used due to my case including chemical reactions). I think ChtMultiRegionSimpleFoam is a good choice for you, if you can make it work. The multiregion ones are quite difficult though.

3. One of the solarload tutorials uses it doesn't it? I think the one with trees. Then there was one in a car that was quite useful to me, and then there's one using ChtMultiRegionFoam with a cube in the middle.

4. Recalling from memory there were 3 or so tutorials utilizing solar radiation. The grep command is your friend. Other than that, the files posted earlier in this thread and my thesis, I don't know of any resources, sorry :/

(For boundary conditions, the book Boundary Conditions - OpenFOAM-4.1 by NEXTFOAM ain't bad)
hi Fabian, thank you so much for your reply

i'm a beginner user of OF, i will see your thesis for more information.
i just find the tutorials that you talk about i will chek it to understand how they did for such kind a case, it will help me for sure.

-if i understood well, you didn't use radiation model
and A is it the incident solar radiation ( from Radiation properties) ?
Ta is the ambiant temperature defined in BC 0/T e

- for my case the q is set to flux, i will try to set it to coefficient and see the difference.

-for me i didn't define a wall tickness ( left at 0) maybe because of this i got high temperature ( there is a part of flux that can be conducted through the walls), i assume that you considered the wall thickness. is it the kappaLayers and thicknessLayers. that give condictivity and thickness for every layers?


and also because the surfaces emissivity and absortivity=1 of all, that makes them absorb all the solar radiation ( i actually tried to reduce emissivity and absortivity to 0.5, the temperature had decreased about 100K to 200K.

thank you again, you really gave me some clues, i'll read your thesis, I'll come back to you, if I have questions

please find joined T, U, Radiations and boundaryRadiationProperties which explain if you will have any observations.

please,excuse me for my english.

Ragards

Abbes
Attached Files
File Type: txt U.txt (1.4 KB, 5 views)
File Type: txt T.txt (2.0 KB, 11 views)
File Type: txt radiationProperties.txt (1.9 KB, 9 views)
File Type: txt boundaryRadiationProperties.txt (1.8 KB, 13 views)
Abs11 is offline   Reply With Quote

Old   May 8, 2022, 03:51
Default
  #13
Member
 
Fabian Friberg
Join Date: Dec 2020
Posts: 31
Rep Power: 5
lumpor is on a distinguished road
Hi, sorry for the late reply

Quote:
Originally Posted by Abs11 View Post
-if i understood well, you didn't use radiation model
and A is it the incident solar radiation ( from Radiation properties) ?
Ta is the ambiant temperature defined in BC 0/T e
Yup, I tried to use solar radiation together with one of the other models, but after a few days of trying to get it to work I gave up and used only solar radiation.

Quote:
- for my case the q is set to flux, i will try to set it to coefficient and see the difference.
I don't really remember my reasoning there, I think I just chose coefficient because it was simpler.

Quote:
-for me i didn't define a wall tickness ( left at 0) maybe because of this i got high temperature ( there is a part of flux that can be conducted through the walls), i assume that you considered the wall thickness. is it the kappaLayers and thicknessLayers. that give condictivity and thickness for every layers?
If I remember it correctly, there's one composite "wall conductivity" (my own name) value, that's calculated by 1/(1 + thickness1/kappa1 + thickness2/kappa2 + thickness3/kappa3 ... thicknessn/kappan), and the speed of temperature convergence towards Ta is proportional to that value.

If you don't have any walls, it would then be 1/1=1.

Quote:
and also because the surfaces emissivity and absortivity=1 of all, that makes them absorb all the solar radiation ( i actually tried to reduce emissivity and absortivity to 0.5, the temperature had decreased about 100K to 200K.
Just make sure to check so that temperature is stable, and that it doesn't just happen to have normal temperature at the specific timestep you're looking at.

thank you again, you really gave me some clues, i'll read your thesis, I'll come back to you, if I have questions

please find joined T, U, Radiations and boundaryRadiationProperties which explain if you will have any observations.

Abbes[/QUOTE]

I had a quick check and didn't see anything that looked too bad. But once again I'm far from an expert, sorry :P

I'll attach the final version of my files if you're interested, some of the values should be updated from my earlier post.

Good luck! I know how hard it can be with limited documentation on the resources you're using.

boundaryRadiationProperties.txt

radiationProperties.txt

T.txt
Abs11 likes this.
lumpor is offline   Reply With Quote

Old   May 10, 2022, 12:36
Default
  #14
New Member
 
Abbes
Join Date: Apr 2022
Posts: 5
Rep Power: 4
Abs11 is on a distinguished road
thank you so much, i really appreciate your help
lumpor likes this.
Abs11 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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36
OpenFOAM Foundation Releases OpenFOAM v2.3.0 opencfd OpenFOAM Announcements from OpenFOAM Foundation 3 December 23, 2014 03:43
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07


All times are GMT -4. The time now is 19:59.