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

What is spectral distribution in radiation models of openfoam?

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 1 Post By JulioPieri
  • 1 Post By JulioPieri
  • 1 Post By JulioPieri
  • 1 Post By JulioPieri
  • 1 Post By JulioPieri
  • 1 Post By B_R_Khan
  • 2 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2021, 09:16
Default What is spectral distribution in radiation models of openfoam?
  #1
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Hi!

I have come across spectral distribution (2 1) as an input asked from user in almost all radiation models including solar load. I don't know what does it mean in the radiation models of openfoam..Is it related to number of bands? or is it power divided by wavelength? I'm lost. Please help!


Thanks
B_R_Khan is offline   Reply With Quote

Old   November 16, 2021, 13:54
Default
  #2
Senior Member
 
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9
JulioPieri is on a distinguished road
I'm not an expert, but from the source code solarLoad.C:

Code:
{
qprimaryBf[patchID][localFaceI] +=
    (qPrim & n[localFaceI])
    * spectralDistribution_[bandI]
    * absorptivity_[patchID][bandI]()[localFaceI];
}
Which gives power (q) for an specific band (bandI).

Also, from other sources I get that it is a way to weight the flux.

Lastly, from fvDOM.H:

HTML Code:
spectralDistribution is the energy spectral distribution of the collimated
     external beam.
Hope this helps
B_R_Khan likes this.
JulioPieri is offline   Reply With Quote

Old   November 17, 2021, 02:31
Default
  #3
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by JulioPieri View Post
I'm not an expert, but from the source code solarLoad.C:

Code:
{
qprimaryBf[patchID][localFaceI] +=
    (qPrim & n[localFaceI])
    * spectralDistribution_[bandI]
    * absorptivity_[patchID][bandI]()[localFaceI];
}
Which gives power (q) for an specific band (bandI).

Also, from other sources I get that it is a way to weight the flux.

Lastly, from fvDOM.H:

HTML Code:
spectralDistribution is the energy spectral distribution of the collimated
     external beam.
Hope this helps
Hi! Thanks for your reply

I have found the formula for calculating spectral distribution (screenshot attached).
So from the code, it looks like there are two bands ; band 1 has value of 2 W/m2.nm and band 2 has value of 1 W/m2.nm.
Do you know how bands are defined in radiation? like which wavelength range corresponds to which band?

Thanks
Attached Images
File Type: png spectral distribution .png (49.4 KB, 59 views)
B_R_Khan is offline   Reply With Quote

Old   November 17, 2021, 07:56
Default
  #4
Senior Member
 
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9
JulioPieri is on a distinguished road
As from the formula you posted, the spectral step is infinitesimal (del_lambda).

When you approximate it to a finite interval, you consider delta_lambda for you "integration" over the wavelength. So you calulate it for each interval o wavelength you want to consider.

Again, I'm no expert, but you might want to discretize your band (i.e. visible light spectrum) into, say, 10 steps. So you delta_lambda would be WholeBand/10. Each of this step will contribute differently to the flux
B_R_Khan likes this.
JulioPieri is offline   Reply With Quote

Old   November 22, 2021, 03:15
Default
  #5
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by JulioPieri View Post
As from the formula you posted, the spectral step is infinitesimal (del_lambda).

When you approximate it to a finite interval, you consider delta_lambda for you "integration" over the wavelength. So you calulate it for each interval o wavelength you want to consider.

Again, I'm no expert, but you might want to discretize your band (i.e. visible light spectrum) into, say, 10 steps. So you delta_lambda would be WholeBand/10. Each of this step will contribute differently to the flux
Do you know which entry will correspond to which wavelength interval?
I have made some observations:
When I increase spectral distribution from (2 1) to (5 2) to see it’s effect on results, qr becomes 840 W/m2. Changed it to (10 20) and got value of 1200 W/m2. Again changed it to it to (20 10) and got value of 880 W/m2.
I don't know the explanation for my findings. Can you explain this weird trend?
B_R_Khan is offline   Reply With Quote

Old   November 22, 2021, 09:18
Default
  #6
Senior Member
 
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9
JulioPieri is on a distinguished road
I'm not sure, but reading the solarLoad.C file, it seems it is weighting over bands

Code:
spectralDistribution_ =
        spectralDistribution_/sum(spectralDistribution_);
Two guesses here:
1- the first number is the number os bands and the second a weight factor.
2- the array is a distribution over the band in equal steps. For instance, you could write something like (1 2 3 2 1) so 10% would be on the first 1/6th, 20% on the second, etc. Try putting more numbers in the array to check this
B_R_Khan likes this.
JulioPieri is offline   Reply With Quote

Old   November 24, 2021, 04:04
Default
  #7
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by JulioPieri View Post
I'm not sure, but reading the solarLoad.C file, it seems it is weighting over bands

Code:
spectralDistribution_ =
        spectralDistribution_/sum(spectralDistribution_);
I changed the spectral distribution from two entries to 5 entries as you mentioned but I got the following errors:

[2] --> FOAM FATAL ERROR: (openfoam-2106)
[2] Radiation bands : 5
Bands on patch : 0 is 2

I guess this means that the entries in spectral distribution are weights for each band

Last edited by B_R_Khan; November 24, 2021 at 05:07.
B_R_Khan is offline   Reply With Quote

Old   November 24, 2021, 08:18
Default
  #8
Senior Member
 
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9
JulioPieri is on a distinguished road
Thanks! I was expecting to be the whole spectrum actually... Because it's weird that we limit the inputs in just two scalars. I'd expect more versatility

Let's see, isn't there any other file where you specify the number of bands?

Edit: try exploring the boundaryRad file. Take a look at the error:

Code:
// Model number of bands
         label nBands = radiation.nBands();
  
         const IOdictionary radiationDict(boundaryIO);
  
         forAll(mesh.boundary(), patchi)
         {
             const polyPatch& pp = mesh.boundaryMesh()[patchi];
  
             if (radiationDict.isDict(pp.name()))
             {
                 const dictionary& dict = radiationDict.subDict(pp.name());
  
                 radBoundaryPropertiesPtrList_[patchi].reset
                 (
                     boundaryRadiationPropertiesPatch::New(dict, pp)
                 );
  
                 if (nBands != radBoundaryPropertiesPtrList_[patchi]->nBands())
                 {
                     FatalErrorInFunction
                         << "Radiation bands : " <<  nBands << nl
                         << "Bands on patch : " << patchi << " is "
                         << radBoundaryPropertiesPtrList_[patchi]->nBands()
                         << abort(FatalError);
                 }
             }
So the "nBands" must be equal to "radBoundaryPropertiesPtrList" which is a subDict inside a radiation properties file.

Is your mesh heavy? Send me you case file (preferebly in zip format) and I'll have a look
B_R_Khan likes this.
JulioPieri is offline   Reply With Quote

Old   November 25, 2021, 03:48
Default
  #9
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by JulioPieri View Post
Thanks! I was expecting to be the whole spectrum actually... Because it's weird that we limit the inputs in just two scalars. I'd expect more versatility

Let's see, isn't there any other file where you specify the number of bands?

Edit: try exploring the boundaryRad file. Take a look at the error:

Code:
// Model number of bands
         label nBands = radiation.nBands();
  
         const IOdictionary radiationDict(boundaryIO);
  
         forAll(mesh.boundary(), patchi)
         {
             const polyPatch& pp = mesh.boundaryMesh()[patchi];
  
             if (radiationDict.isDict(pp.name()))
             {
                 const dictionary& dict = radiationDict.subDict(pp.name());
  
                 radBoundaryPropertiesPtrList_[patchi].reset
                 (
                     boundaryRadiationPropertiesPatch::New(dict, pp)
                 );
  
                 if (nBands != radBoundaryPropertiesPtrList_[patchi]->nBands())
                 {
                     FatalErrorInFunction
                         << "Radiation bands : " <<  nBands << nl
                         << "Bands on patch : " << patchi << " is "
                         << radBoundaryPropertiesPtrList_[patchi]->nBands()
                         << abort(FatalError);
                 }
             }
So the "nBands" must be equal to "radBoundaryPropertiesPtrList" which is a subDict inside a radiation properties file.

Is your mesh heavy? Send me you case file (preferebly in zip format) and I'll have a look
I think the number of bands can be increased by changing the number of entries in absorption emission coefficients in boundary radiation properties file as well as spectral distribution elements in radiation properties file.

I did not change number of entries in absopritvity and emissivity arrays in radiation boundaries before and hence got the error:


Code:
panel
{
    type        opaqueReflective;

    // Fraction of the reflected is diffussive
    fd          0; // 0: all specular 1: all diffusive

    wallAbsorptionEmissionModel
    {
        type            multiBandAbsorption;
        absorptivity    (0.3 0.7);
        emissivity      (0.3 0.7);
    };
}
I have not used any other radiation model like viewfactor or fvDOM along with solarLoad as simpleSolarCar tutorial too doesn't include any other radiation model. Viewfactor model gives option of nbands in its usage. Solar load does not ask for any nbands input though

I will try it with 5 entries of spectral distribution & 5 absorptivity/ emissitivity entries and let you know about the results. But the question still stands that which band interval ( UV, visible etc?)will correspond to which value of spectral power.

Sorry I can't send the case files right now without asking my supervisor Let me ask him and I will get back to you. I used simpleSolarCar tutorial from openfoam.com as the base files.

Thanks!!
Bushra
B_R_Khan is offline   Reply With Quote

Old   November 25, 2021, 08:23
Default
  #10
Senior Member
 
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9
JulioPieri is on a distinguished road
Well, that I don't know for sure. I'd expect to be just infrared, since we're interested in heat transfer, but I just read that Fluent uses a parameter to weight between visible and infrared. Try digging into the OF code, or looking at Fluent's manual! Let me know if you figure out.
B_R_Khan likes this.
JulioPieri is offline   Reply With Quote

Old   November 26, 2021, 05:02
Default
  #11
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by JulioPieri View Post
Well, that I don't know for sure. I'd expect to be just infrared, since we're interested in heat transfer, but I just read that Fluent uses a parameter to weight between visible and infrared. Try digging into the OF code, or looking at Fluent's manual! Let me know if you figure out.

So I changed the absorptivity and emissivity of panel in radiation boundary condition to (0.3 0.7 0.3 0.3 0.3) and spectral distribution to (2 1 3 2 1) and the simulation gave no error! The maximum irradiance on panel surface decreased from 880 w/m2 with (2 1) spectral distribution to 550 W/m2 with the current five band spectral distribution.

I have skimmed through Fluent manual and yes you are right, it considers two bands for diffuse light i-e visible and infrared. If openfoam is accepting 5 bands in solar Load then maybe it is dividing the infrared, visible and UV range into 5 equal wavelength intervals with each interval having it's own flux value defined in spectral distribution.

I will look more into it. Thanks!
JulioPieri likes this.
B_R_Khan is offline   Reply With Quote

Old   November 26, 2021, 07:44
Default
  #12
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Guys,

I am far from a radiation expert, but I tried to play around the radiation models in OpenFOAM and bumped into pretty much the same questions than you do.

From what I have seen in the code, I think there not any notion of wavelength anywhere because it is not relevant for the code. You can split your spectrum in N bands, give weights to each band thanks to the spectral distribution parameter, and adjust your material properties giving the emissivity and absorptivity on each band.

The code doesn't need to know whether it is UV, visible or whatever, as long as it has the information to compute the proper spectral distribution and the proper wall behavior.

This is up to the user to know which band he is defining, and correctly adjust the spectral distribution and wall emissivity/absorptivity to be physically correct.

Does that make sense to you?

Cheers,
Yann
B_R_Khan and TianJoshua like this.
Yann is offline   Reply With Quote

Old   November 29, 2021, 01:25
Default
  #13
Member
 
Bushra Rasheed
Join Date: Dec 2020
Posts: 97
Rep Power: 5
B_R_Khan is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi Guys,

I am far from a radiation expert, but I tried to play around the radiation models in OpenFOAM and bumped into pretty much the same questions than you do.

From what I have seen in the code, I think there not any notion of wavelength anywhere because it is not relevant for the code. You can split your spectrum in N bands, give weights to each band thanks to the spectral distribution parameter, and adjust your material properties giving the emissivity and absorptivity on each band.

The code doesn't need to know whether it is UV, visible or whatever, as long as it has the information to compute the proper spectral distribution and the proper wall behavior.

This is up to the user to know which band he is defining, and correctly adjust the spectral distribution and wall emissivity/absorptivity to be physically correct.

Does that make sense to you?

Cheers,
Yann
yes you are right, I have come across the same conclusion after playing around different radiation models. So far, I have seen option of defining wavelength range in wideBandAbsoprtionEmission model only but there is no tutorial that uses this model and I had no success in using this model correctly
B_R_Khan is offline   Reply With Quote

Reply

Tags
radiation modelling, solar load model, solarcalculator


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
Size Distribution Models - Spray Modelling Azanulbizar OpenFOAM Running, Solving & CFD 18 January 26, 2022 12:32
LES scale similarity and mixedSmagorinsky models for OpenFOAM v4.x or above eddykendo OpenFOAM 0 August 9, 2018 03:59
Radiation boundary conditions for flow through boundaries in openFoam DustExplosion OpenFOAM 6 June 27, 2018 12:49
Using radiation models for plasmas chriss85 OpenFOAM Running, Solving & CFD 2 February 10, 2014 12:17
Radiation P1 Model with Spectral Model: Multigray A. Thellmann CFX 0 October 25, 2008 13:44


All times are GMT -4. The time now is 20:02.