View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002182||OpenFOAM||Bug||public||2016-08-08 15:33||2016-08-17 17:14|
|Platform||Unix||OS||Other||OS Version||(please specify)|
|Fixed in Version||dev|
|Summary||0002182: fvDom: wrong results when cacheDiv = false|
|Description||1) When setting cacheDiv in the radiationProperties file to false, the fvDoM model returns false results.|
I have tested this with the square enclosure case, no conduction and no convection. A more extensive description of the case is in the first post of:
In my case specifically, the bottom and top walls are not taking part in the radiation procedure (0 emissivity and absorption), but this should not matter.
The left and right walls are called Inlet and Outlet in this case.
Running sh postProcess.sh shows the radiation balance and input for the relevant surfaces. What is to be expected (and true in case of cacheDiv = false)(see CFD online post for the calculation)
Qr from the left wall/Inlet: 5.67 W/m2
Qr into right wall/Outlet: 2.3474 W/m2
2) Another relevant issue is that the note on cacheDiv says that an upwind scheme has to be used, but schemes like Gauss linear simply don't work (returns an error), even when cacheDiv is false
|Steps To Reproduce||chtMultiRegionFoam|
|Tags||No tags attached.|
radiationTest.zip (421,913 bytes)
||Can you provide a patch to correct this problem?|
||No, that is beyond my coding capabilities.|
I have a couple of comments related to this bug and the other bug with time-dependent BCs.
1.) Actually the results with "cacheDiv = false" are correct (or at least more correct) and with "cacheDiv = true" are wrong. In your test case, with fully reflecting top and bottom walls, some of the radiation will get reflected back to the inlet (the boundary conditions are diffusive, so the reflected rays are radiated to every direction, some back to the inlet) and for that reason the Qr values are not the same as in a case where the top and bottom walls are fully absorbing. The Qr value for inlet will be slightly lower than in the other case and also the Qr for outlet will be slightly larger.
With "cacheDiv = true" the calculation goes wrong. As seen from running the postProcess.sh, 5.67 W/m2 is radiated in but only 2.3474 W/m2 out. The missing power goes to the top and bottom walls even though they are fully reflective. If you run the case several times repeatedly with "cacheDiv = true", the results will change every time. The same problem also causes your issues with time dependent BCs.
What "cacheDiv = true" does:
If "cacheDiv = true", the divergence term in the RTE is only calculated once at the very beginning and cached. Caching the div term may reduce the calculation time of the radiation iterations, because it is just retrieved from memory and not recomputed. However, in order for this to work, the div term should be constant throughout the simulation as it is not updated. Theoretically, since the Ji in fvm::div(Ji, ILambda_[lambdaI]) is always constant this may work ok, but in practice I have never had any success with this and have always set cacheDiv=false.
fvm::div(Ji, ILambda_[lambdaI]) can be cached provided interpolation coefficients for ILambda_[lambdaI] do not depend on ILambda_[lambdaI], i.e. pure geometric schemes or pure upwind. Given that pure geometric schemes are rarely appropriate this leaves pure upwind which is rarely accurate enough.
So one option would be to remove the 'cacheDiv' option altogether and the other to check that it is used only with 'upwind'.
||Yes, checking for upwind might be good. However, even with upwind the results are not correct, if cacheDiv is used. I don't know what is the exact reason for it, but somehow it doesn't seem to notice when the BC values change.|
Right, the 'inflow' values would be encoded in the matrix explicitly and hence not updated with changes in ILambda_[lambdaI].
I will remove the 'cacheDiv' option; it is unlikely to be very useful even if it worked correctly and would take too much effort to fix.
||That is ok for me. I have not seen big performance benefits from using it anyway.|
||Resolved in OpenFOAM-dev by commit 15621678fa5e232622152768840978e21a8bae8c|
|2016-08-08 15:33||Joris.C||New Issue|
|2016-08-08 15:33||Joris.C||File Added: radiationTest.zip|
|2016-08-08 15:45||henry||Note Added: 0006656|
|2016-08-08 16:12||Joris.C||Note Added: 0006658|
|2016-08-17 14:06||tniemi||Note Added: 0006688|
|2016-08-17 14:38||henry||Note Added: 0006689|
|2016-08-17 14:42||tniemi||Note Added: 0006690|
|2016-08-17 14:46||henry||Note Added: 0006692|
|2016-08-17 14:48||tniemi||Note Added: 0006693|
|2016-08-17 17:14||henry||Note Added: 0006697|
|2016-08-17 17:14||henry||Status||new => resolved|
|2016-08-17 17:14||henry||Fixed in Version||=> dev|
|2016-08-17 17:14||henry||Resolution||open => fixed|
|2016-08-17 17:14||henry||Assigned To||=> henry|