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

Is it possible to add an intensity ray source term in fvDOM?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By dlahaye
  • 1 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 10, 2025, 07:29
Default Is it possible to add an intensity ray source term in fvDOM?
  #1
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 894
Rep Power: 19
Tobermory will become famous soon enough
I have a scenario where I want to bathe a target piece in thermal radiation from a distant source, without having to explicitly model the distant source.

I can do this with the fvDOM model by setting a fixedValue boundary condition for G and one of the ray directions on one side the domain, having orientated the target to be normal to the ray direction. This works fine (see attached snapshot for a simple plate), but is a bit messy.

Earlier, I had been looking for a way to simply add a source term to the chosen intensityRay equation ... but I couldn't for the life of me work out how to do it! Does anyone know how I can add a source term to say ILambda_15_0?

I am working in OF v13. Any thoughts, comments or observations would be welcomed.
Attached Images
File Type: png radiation16.png (67.7 KB, 6 views)
Tobermory is offline   Reply With Quote

Old   December 11, 2025, 04:31
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 884
Blog Entries: 1
Rep Power: 20
dlahaye is on a distinguished road
Apologies for not being of much help.

I wonder, however,

1/ why adding a source to a single ray? What motivates this approach? What are you trying to do (apologies for being lost in translation)

2/ to what extend does it help you to drill through the code and figure out how for instance the emission term is added to all rays together? Possibly I can assist here (likely not as you are at it for a longer time)

3/ to what extend does it help you to home-brew an implementation from scratch (using tools like FENICS or Gridap) and port it to OpenFoam is a second stage only?

Good luck. D.
dlahaye is offline   Reply With Quote

Old   December 11, 2025, 05:36
Default
  #3
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 894
Rep Power: 19
Tobermory will become famous soon enough
Thanks for the reply Domenico. I am just trying to set up a case where a target piece is irradiated at a given level (e.g. 100kW/m2) from a distant hot source ... without having to mesh the distant heat source itself (saves a lot of gridcells!). In this scenario, the incident radiation is approximately unidirectional, and so I only need to enter the radiation in a single ray.

I can do it perfectly with boundary conditions - as per my figure in my previous post, and the results for a simple shape validate extremely well with an analytical mode.

However, it struck me whilst setting up the boundary conditions that it should be possible to do the same with a source term in the ILambda equations ... but I just couldn't work out how to add a generic source to an equation in OF13 ... without cloning the source code and writing my own version.

If you're interested, the intensity ray equation is formulated and solved in radiativeIntensityRay::correct():
Code:
         fvScalarMatrix IiEq
         (
             fvm::div(Ji, ILambda_[lambdaI], "div(Ji,Ii_h)")
           + fvm::Sp(k*omega_, ILambda_[lambdaI])
         ==
             1.0/constant::mathematical::pi*omega_
            *(
                 // Remove aDisp from k
                 (k - absorptionEmission_.aDisp(lambdaI))
                *blackBody_.bLambda(lambdaI)
  
               + absorptionEmission_.E(lambdaI)/4
             )
         );
... this is the equation that I'd like to add a source term to, using something in fvOptions for example.

Don't waste too much time on this Domenico - the original post was just in case someone said "that's easy - you just do ... blah blah blah". As I said, I have a perfectly good work-around.

Last edited by Tobermory; December 11, 2025 at 10:23.
Tobermory is offline   Reply With Quote

Old   December 11, 2025, 10:37
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 884
Blog Entries: 1
Rep Power: 20
dlahaye is on a distinguished road
The code that you share clearly has no fvOptions() construct that allows to add terms.

Does a coded scalar transport equation for myIiq to be solved ?
Tobermory likes this.
dlahaye is offline   Reply With Quote

Old   December 11, 2025, 10:54
Default
  #5
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 894
Rep Power: 19
Tobermory will become famous soon enough
Yes, you're right - it was staring me in the face all the time. Digging deeper, I realise that in OF13 the source terms are defined in constant/fvModels ... and looking at
incompressibleFluid::momentumPredictor() or kEpsilon.C, I can see that there should indeed be a term like:

Code:
+ fvModels.source(blah blah)
in the fvm equation, to allow for source term inclusion. There isn't, so I can't. Anyway, specifying the source at the boundary is probably more appropriate anyway. Thanks again.
dlahaye likes this.
Tobermory is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 18:18
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 12:32
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08


All times are GMT -4. The time now is 05:39.