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

BC for fvDOM radiation model

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By xuhuang
  • 2 Post By xuhuang

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2017, 09:30
Default BC for fvDOM radiation model
  #1
New Member
 
Xu Huang
Join Date: Apr 2015
Location: Netherlands
Posts: 23
Rep Power: 11
xuhuang is on a distinguished road
Hi foamers,

I hope you are all doing well.

I would like to solve radaition heat transfer in combustion. When I use P1 model, it works fine.
But when I set fvDOM in radiationProperties dictionary, there was an error when the code goes into greyDiffusiveRadiationMixedFvPatchScalarField.C.
Code:
    const scalarField& Tp =
        patch().lookupPatchField<volScalarField, scalar>(TName_);

    const radiationModel& radiation =
        db().lookupObject<radiationModel>("radiationProperties");

    const fvDOM& dom(refCast<const fvDOM>(radiation));
The error is from the red part. It reports
Code:
--> FOAM FATAL ERROR:

    lookup of radiationProperties from objectRegistry region0 successful
    but it is not a radiationModel, it is a dictionary

    From function objectRegistry::lookupObject<Type>(const word&) const
    in file /opt/OpenFOAM/OpenFOAM-2.3.1/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 181.
I have no idea why. I didn't change radaition codes and I have my own combustion model.

Any ideas?

Best regards,
Xu
labyrinth01 likes this.
xuhuang is offline   Reply With Quote

Old   June 5, 2017, 05:15
Default
  #2
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
Hi,

what application are you using? Is it chtMultiRegionFoam?
Could you post content of radiationProperties dictionary for the region0 and snippet of the BC dictionary that uses greyDiffusiveRadiation?

I have used fvDOM for several radiation problems and I've never encountered such error so I will need information to locate the source of the issue.
TomasDenk is offline   Reply With Quote

Old   June 6, 2017, 03:55
Default
  #3
New Member
 
Xu Huang
Join Date: Apr 2015
Location: Netherlands
Posts: 23
Rep Power: 11
xuhuang is on a distinguished road
Quote:
Originally Posted by TomasDenk View Post
Hi,

what application are you using? Is it chtMultiRegionFoam?
Could you post content of radiationProperties dictionary for the region0 and snippet of the BC dictionary that uses greyDiffusiveRadiation?

I have used fvDOM for several radiation problems and I've never encountered such error so I will need information to locate the source of the issue.
Hi Tomas,

Thanks very much for your reply.
I am not using chtMultiRegionFoam. I have my own solver and combustion model for comustion modelling. I have also implemented radiation model in reactingFoam, and fvDOM model is working fine. But for my own solver when using fvDOM it reports the error, but P1 is working properly.

Actually, in my BC I don't have region0. The below is my BC for radiation and radiationProperties settings.
IDefault BC:
Code:
boundaryField
{
    FUEL
    {
        type            greyDiffusiveRadiation;
        T               T;
        emissivityMode  lookup;
        emissivity      uniform 1.0;
        value           uniform 0.0;
    }
    AIR
    {
        type            greyDiffusiveRadiation;
        T               T;
        emissivityMode  lookup;
        emissivity      uniform 1.0;
        value           uniform 0.0;
    }
    WALL
    {
        type            greyDiffusiveRadiation;
        T               T;
        emissivityMode  lookup;
        emissivity      uniform 1.0;
        value           uniform 0.0;
    }    
    OUTLET
    {
        type            greyDiffusiveRadiation;
        T               T;
        emissivityMode  lookup;
        emissivity      uniform 1.0;
        value           uniform 0.0;
    }    
}
radiationProperties:
Code:
radiation on;

radiationModel  fvDOM;

fvDOMCoeffs
{
    nPhi        2;          // azimuthal angles in PI/2 on X-Y.(from Y to X)
    nTheta      4;          // polar angles in PI (from Z to X-Y plane)
    convergence 1e-3;   // convergence criteria for radiation iteration
    maxIter     10;         // maximum number of iterations
    cacheDiv    false;
}

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

absorptionEmissionModel constantAbsorptionEmission;

constantAbsorptionEmissionCoeffs
{
   absorptivity    absorptivity    [ m^-1 ]         0.5;
   emissivity      emissivity      [ m^-1 ]         0.5;
   E               E               [ kg m^-1 s^-3 ] 0;
}

scatterModel    none;

sootModel       none;
Thanks in advance.

Best regards,

Xu
xuhuang is offline   Reply With Quote

Old   June 6, 2017, 04:30
Default
  #4
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
Hi Xu,

I'm afraid I won't of much help here. It all seems pretty normal to me and I don't see any reason why it shouldn't work. You might have to wait for someone smarter to figure it out.

Good luck with your modelling,
Tomas
TomasDenk is offline   Reply With Quote

Old   June 6, 2017, 06:04
Default
  #5
New Member
 
Xu Huang
Join Date: Apr 2015
Location: Netherlands
Posts: 23
Rep Power: 11
xuhuang is on a distinguished road
Hi Tomas,

Thanks anyway.

Cheers,

Xu
xuhuang is offline   Reply With Quote

Old   June 14, 2017, 06:48
Default
  #6
New Member
 
Xu Huang
Join Date: Apr 2015
Location: Netherlands
Posts: 23
Rep Power: 11
xuhuang is on a distinguished road
Problem solved. It is a problem about objectRegistry in openfoam. In my solver, the radiationProperties dictionary is only registered as a dictionary type, but not a radiationModel type.

For more information about objectRegistry in openfoam, you may refer to https://openfoamwiki.net/index.php/O...objectRegistry.

Hope this help.

Cheers,

Xu
FDelic and TomasDenk like this.
xuhuang is offline   Reply With Quote

Old   June 14, 2017, 13:04
Default
  #7
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
Thanks for sharing the cause of the problem - I will read more about objectRegistry.

Bye,
Tom
TomasDenk is offline   Reply With Quote

Old   August 22, 2019, 03:11
Default
  #8
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Quote:
Originally Posted by TomasDenk View Post
Hi,

what application are you using? Is it chtMultiRegionFoam?
Could you post content of radiationProperties dictionary for the region0 and snippet of the BC dictionary that uses greyDiffusiveRadiation?

I have used fvDOM for several radiation problems and I've never encountered such error so I will need information to locate the source of the issue.

Hi Tomas,


I have a question related to this thread.



I am using chtMultiRegionSimpleFoam and my Openfoam version is 4.1.


In my geometry, I have two regions (solid and air).


On solid, I am putting, 500K of temperature, and Air is at 300K temperature.


Now, I want to see the heat transfer through radiation from solid to air.


Just like we have heaters in our home and they heat up the room.


I have put velocity of air equals to zero, so that there would be no convection.


Can you please tell me, which radiation model will work for my case?

what I did uptill now is that I put radiation model OpaqueSolid on the solid region, and viewFactor on the air region. but I didn't see any difference.


It was exactly the same, as it is when I don't use radiation.


I shall be very thankful, if you can help me out in this.


Thank you
Raza Javed is offline   Reply With Quote

Old   August 27, 2019, 09:59
Default
  #9
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
Dear Raza,


I have to admit that I don't have much experience with viewFactor radiation model. My understanding is that it is more effective than DOM on simple geometries. Most of my models are quite complex and viewFactor can lead to high memory demands.


However, based on what you wrote, I don't see any reason why viewFactor shouldn't work. Any radiation model (DOM, P1,...) should show at least some impact on the heat transfer so I suppose there's a glitch in BCs or numerics. Could you share setup of your case (e.g. link to a zip)? For now, I won't need mesh.


Have a nice day,
Tom
TomasDenk is offline   Reply With Quote

Old   December 26, 2019, 00:46
Default
  #10
New Member
 
Aarav
Join Date: Dec 2019
Posts: 4
Rep Power: 6
Aarav is on a distinguished road
Quote:
Originally Posted by TomasDenk View Post
Hi,

what application are you using? Is it chtMultiRegionFoam?
Could you post content of radiationProperties dictionary for the region0 and snippet of the BC dictionary that uses greyDiffusiveRadiation?

I have used fvDOM for several radiation problems and I've never encountered such error so I will need information to locate the source of the issue.

I am using chtMultiregionFoam and added fvDOM. I just copied the boundary condition given in multiRegionHeater tutorials for viewFactor model. Can you please suuggest the correct temperature coupling boundary condition for this case?
Aarav is offline   Reply With Quote

Old   January 6, 2020, 05:13
Default
  #11
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
Hi Aarav,


Please have a look at compressible::turbulentTemperatureRadCoupledMixed.


If you are not happy with the results, I would need more info about what you're trying to do. Ideal is simplified case with few boxes, which you can share with me (e.g. post download link to .zip file) including all setup files and mesh.
TomasDenk is offline   Reply With Quote

Old   January 6, 2020, 06:14
Default
  #12
New Member
 
Aarav
Join Date: Dec 2019
Posts: 4
Rep Power: 6
Aarav is on a distinguished road
Quote:
Originally Posted by TomasDenk View Post
Hi Aarav,


Please have a look at compressible::turbulentTemperatureRadCoupledMixed.


If you are not happy with the results, I would need more info about what you're trying to do. Ideal is simplified case with few boxes, which you can share with me (e.g. post download link to .zip file) including all setup files and mesh.

Thank you sir for responding. I also used this one. The cases are running successfully. But the problem is I don't know what it is meant by qrNbr and qr in interface boundary condition. I am using FvDOM. Also Iam confused with G and Idefault BCs
Aarav is offline   Reply With Quote

Old   January 6, 2020, 07:09
Default
  #13
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
If you want to understand the variables, the best way is to look into the source code and analyze deeply definitions and operations performed on them.


It has been a while since I've done some programming in that direction, but I'll try to provide couple hints. The treatment of the boundary should be consistent from both sides. Therefore, you often need to access fields from the other domain/side, which usually has "Nbr" suffix.


Code:
valueFraction() = KDeltaNbr/(KDeltaNbr + KDelta);
refValue() = TcNbr;
refGrad() = (qr + qrNbr)/kappa(Tp);

In the code above, you need conductivity (KDelta) and incident radiation (qr) from both, your and neighbor sides to ensure consistency oftotal heat flux through the boundary.


As for G and IDefault BCs, you would need to start with basic thermodynamic laws and use lots of complex math (and some dirty tricks too) to develop the formulas. However, you should be fine understanding that IDefault defines BC for arbitrary number of ordinates (directions) and G is sum of radiative intensities from all ordinates (directions).


Code:
IRay_[rayI].addIntensity();
G_ += IRay_[rayI].I()*IRay_[rayI].omega();

The first line of the code above adds up intensities from all spectral bands, and the second line adds these "per ray" intensities into G. Note that IRay only denotes intensity in one ordinate and has nothing to do with radiation model casting rays based on Monte Carlo method.
TomasDenk is offline   Reply With Quote

Old   January 6, 2020, 07:16
Smile
  #14
New Member
 
Aarav
Join Date: Dec 2019
Posts: 4
Rep Power: 6
Aarav is on a distinguished road
Quote:
Originally Posted by TomasDenk View Post
If you want to understand the variables, the best way is to look into the source code and analyze deeply definitions and operations performed on them.


It has been a while since I've done some programming in that direction, but I'll try to provide couple hints. The treatment of the boundary should be consistent from both sides. Therefore, you often need to access fields from the other domain/side, which usually has "Nbr" suffix.


Code:
valueFraction() = KDeltaNbr/(KDeltaNbr + KDelta);
refValue() = TcNbr;
refGrad() = (qr + qrNbr)/kappa(Tp);
In the code above, you need conductivity (KDelta) and incident radiation (qr) from both, your and neighbor sides to ensure consistency oftotal heat flux through the boundary.


As for G and IDefault BCs, you would need to start with basic thermodynamic laws and use lots of complex math (and some dirty tricks too) to develop the formulas. However, you should be fine understanding that IDefault defines BC for arbitrary number of ordinates (directions) and G is sum of radiative intensities from all ordinates (directions).


Code:
IRay_[rayI].addIntensity();
G_ += IRay_[rayI].I()*IRay_[rayI].omega();
The first line of the code above adds up intensities from all spectral bands, and the second line adds these "per ray" intensities into G. Note that IRay only denotes intensity in one ordinate and has nothing to do with radiation model casting rays based on Monte Carlo method.





Thank you sir. In viewFactor model we are defining Qr. But in fvDOM model we have to define IDefault. So my problem is that is the neighbouring field is Qr ?
Aarav is offline   Reply With Quote

Old   January 6, 2020, 07:22
Default
  #15
Member
 
Tomas Denk
Join Date: May 2017
Posts: 30
Rep Power: 9
TomasDenk is on a distinguished road
I'm not sure if I understand your question correctly, but I'll try with this...


Qr = sum_all_ordinates(incident_radiation * cos(incident_angle, surface_normal) * surface_area
TomasDenk is offline   Reply With Quote

Old   January 6, 2020, 23:18
Default
  #16
New Member
 
Aarav
Join Date: Dec 2019
Posts: 4
Rep Power: 6
Aarav is on a distinguished road
Quote:
Originally Posted by TomasDenk View Post
I'm not sure if I understand your question correctly, but I'll try with this...


Qr = sum_all_ordinates(incident_radiation * cos(incident_angle, surface_normal) * surface_area



Thank you sir
Aarav 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
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 14:32
How model radiation of both solid wall and fluid£¿ Harry Qiu FLUENT 2 February 3, 2013 23:04
problem in glass radiation model (DO model) wunan805 FLUENT 0 October 10, 2012 05:06
heat transfer with s2s radiation model in fluent D. L. FLUENT 3 July 31, 2008 07:40
Help: Radiation model MANOJKUMAR FLUENT 4 November 24, 2005 02:45


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