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

viewFactorModel debug Option and fvSolutions

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By GerhardHolzinger

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2020, 10:13
Default viewFactorModel debug Option and fvSolutions
  #1
New Member
 
Join Date: Feb 2020
Posts: 5
Rep Power: 6
SharpS is on a distinguished road
Hey Foamers,


currently I'm trying to handle the viewFactorModel. I adapted the hotRadiationRoomCase and luckily it is running.

But still I haven't understood two points.


Point 1:
In the viewFactor.C file the function initialise() is able to print out some information like "Total number of cluster : " or "Number of coarse faces:"... How do I set it up that they are printed out? It says if (debug), but i already turned debug in the viewFactorDict on so it has to be another one.


Point 2:

How do I set up the fvSolution file for qr? The only available Tutorial (MultiRegionHeater) has just defined a relaxation factor?




Best wishes
Nik
SharpS is offline   Reply With Quote

Old   March 2, 2020, 03:32
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Point 1: The debug-framework in OpenFOAM is controlled via controlDict. So, adding a debug keyword to the viewFactorDict does nothing. See The User Guide. OpenFOAM doesn't read files and interprets its contents; it merely reads specific data from its case-files.

Point 2: There is no need for any settings regarding qr in fvSolution. With the viewFactor model, qr is computed from the viewFactors, the surface temperatures and some material properties. As no governing equations are solved, there is no need for setting anything in fvSolution, with the exception of relaxation factors. This is the benefit of the viewFactor model: compute the viewFactors once in pre-processing, invert the viewFactor matrix in the first time step of the solver, and then compute qr with very little computational effort (compared to fvDOM or P1).
GerhardHolzinger is offline   Reply With Quote

Old   March 2, 2020, 05:19
Default
  #3
New Member
 
Join Date: Feb 2020
Posts: 5
Rep Power: 6
SharpS is on a distinguished road
Thanks for your reply Gerhard!
Can you tell me which debug switch I have to turn on? I already tried radiationModel but i didn't change anything. And there isn't a special viewFactor switch.



Best wishes
Nik
SharpS is offline   Reply With Quote

Old   March 5, 2020, 03:20
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Add this to your controlDict:

Code:
DebugSwitches
{
    viewFactor  1;
}

If a model defines its own debug-switch, and hot it is named is easy to find out. Check out these lines from the file viewFactor.C

Code:
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

namespace Foam
{
namespace radiationModels
{
    defineTypeNameAndDebug(viewFactor, 0);
    addToRadiationRunTimeSelectionTables(viewFactor);
}
}
Here, the relevant line is
Code:
defineTypeNameAndDebug(viewFactor, 0);
, which defines a debug-switch, which is conventiently named after the model; furthermore, the default value of the debug-switch is set to zero, i.e. it's off.

The debug-switches we specify in the controlDict, override the default values for the current case.
Yann and SharpS like this.
GerhardHolzinger is offline   Reply With Quote

Old   March 5, 2020, 05:43
Default
  #5
New Member
 
Join Date: Feb 2020
Posts: 5
Rep Power: 6
SharpS is on a distinguished road
Thanks, it's working!!
SharpS 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
Trying to Generalize fvSolutions file Focus00000 OpenFOAM Programming & Development 9 March 2, 2020 04:17


All times are GMT -4. The time now is 01:25.