View Issue Details

IDProjectCategoryView StatusLast Update
0001704OpenFOAM[All Projects] Bugpublic2015-05-25 17:36
ReporterzfaradayAssigned Tohenry 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSOpenSuSEOS Version12.3
Product Version 
Fixed in Version 
Summary0001704: externalWallHeatFluxTemperature BC makes the solver crash when Qr is added to the balance
DescriptionAfter trying to solve some cases with buoyantSimpleFoam and chtMultiRegionSImpleFOam using this BC with the option of adding Qr to the balance I never got any other solution than a crash. After an intensive analysis (http://www.cfd-online.com/Forums/openfoam-solving/143632-problems-adding-qr-field-externalwallheatfluxtemperature-bc.html#post547223) I found out that the problem was that when Qr is added to the balance it makes refValue() get negative values in the first iterations.

In order to solve this problem I tried to implement a relaxation factor for Qr like it is done in thermalBaffle1D BC with hopeful results. The solver converged with a relaxation factor of 0.1.

I attached a case where the problem can be tested, it is a modified version of the tutorial case "circuitBoardCooling". Here (http://www.cfd-online.com/Forums/openfoam-bugs/153082-thermalbaffle1d-showing-bad-behavior.html#post546783) its changes are explained in order to see the crash.
Steps To Reproduceexecute ./Allrun script

The solver should hopefully crash after 16th timestep.
TagsNo tags attached.

Activities

zfaraday

2015-05-22 13:24

reporter  

circuitBoardCooling_rad.zip (36,617 bytes)

zfaraday

2015-05-22 13:25

reporter  

myExternalWallHeatFluxTemperatureFvPatchScalarField.C (11,979 bytes)

zfaraday

2015-05-22 13:31

reporter   ~0004785

I forgot to mention that Qr option is not activated by default in the case attached. It must be activated in the "0.org/T" file.

henry

2015-05-24 19:39

manager   ~0004792

I have added relaxation of the radiative contribution to the externalWallHeatFluxTemperature BC as requested but I am unable to run your case with or without this change:

Starting time loop

Time = 1

DILUPBiCG: Solving for h, Initial residual = nan, Final residual = nan, No Iterations 1001
Radiation solver iter: 0

Also your case has a lot of external dependencies which are not provided with OpenFOAM which makes it difficult to test.

Please test the change yourself to ensure the relaxation operates as you expect.

commit 24059d8139ef946984e7f262ba1272366e4daf5f in OpenFOAM-2.4.x

zfaraday

2015-05-24 21:31

reporter   ~0004794

Sorry Henry, but I don't understand what you mean with external dependencies, I only took a tutorial case and modified its boundary conditions using other ones provided with OpenFOAM. Besides that I just realized that I used some functions and libraries in controlDict that maybe are causing your troubles. This is the only thing I think that can cause a trouble... I apologize for that, I only added these functions to check the energy balance and I forgot to remove it when I uploaded here.

I see you only applied the change in OF v2.4.x , may you apply it to v2.3.x too? This the version I'm using at the moment and I'm not going to install 2.4.x for now.

Btw, I just checked the modifications and I think that some lines are wrong, these are lines 219-220 and this is how I think they should look:

     q_(tppsf.q_),
     h_(tppsf.h_),
     Ta_(tppsf.Ta_),
+ QrPrevious_(ptf.QrPrevious_), ---> QrPrevious_(tppsf.QrPrevious_), //219
+ QrRelaxation_(ptf.QrRelaxation_), ---> QrRelaxation_(tppsf.QrRelaxation_), //220
     QrName_(tppsf.QrName_),
     thicknessLayers_(tppsf.thicknessLayers_),
     kappaLayers_(tppsf.kappaLayers_)

Many thanks for applying the changes in order to solve this issue.

Best regards,

Alex

wyldckat

2015-05-24 21:36

updater   ~0004795

Just a quick note on how to apply the relevant commit on 2.3.x manually:

  foam

  wget https://github.com/OpenFOAM/OpenFOAM-2.4.x/commit/24059d8139ef946984e7f262ba1272366e4daf5f.patch

  patch -p1 < 24059d8139ef946984e7f262ba1272366e4daf5f.patch

  wmake src/turbulenceModels/compressible/turbulenceModel

henry

2015-05-24 22:21

manager   ~0004796

Sorry about the compilation error; juggling too many things. I have pushed the fix to OpenFOAM-2.4.x. I will make the same change to 2.3.x if it works as expected.

zfaraday

2015-05-25 17:28

reporter   ~0004808

Thanks for the tip Bruno!

Now I just tested the new patch specification and it works exactly as expected in the test case attached.

Bug resolved! Thanks Henry

henry

2015-05-25 17:36

manager   ~0004809

Resolved by commit 95a09ca08c5d5e1b9797893df72451d8a8d41317

Issue History

Date Modified Username Field Change
2015-05-22 13:24 zfaraday New Issue
2015-05-22 13:24 zfaraday File Added: circuitBoardCooling_rad.zip
2015-05-22 13:25 zfaraday File Added: myExternalWallHeatFluxTemperatureFvPatchScalarField.C
2015-05-22 13:31 zfaraday Note Added: 0004785
2015-05-24 19:39 henry Note Added: 0004792
2015-05-24 21:31 zfaraday Note Added: 0004794
2015-05-24 21:36 wyldckat Note Added: 0004795
2015-05-24 22:21 henry Note Added: 0004796
2015-05-25 17:28 zfaraday Note Added: 0004808
2015-05-25 17:36 henry Note Added: 0004809
2015-05-25 17:36 henry Status new => resolved
2015-05-25 17:36 henry Resolution open => fixed
2015-05-25 17:36 henry Assigned To => henry