Problem with Radiation Model

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Mita Sarkar

Problem with Radiation Model

Post by Mita Sarkar »

I am trying to model natural convection inside a square cavity with radiation effect using Saturne-2.0-rc1. When I added radiation the model is not running and giving some error at calculation stage but same case is running with out radiation. I am not able to find where I am wrong. There may be some problem with radiation model but I am not sure. The error message and case file is attached here. Please help to resolve this problem.
Attachments
05051531.tar.gz
(3.33 KiB) Downloaded 165 times
David Monfort

Re: Problem with Radiation Model

Post by David Monfort »

Dear Mita,
This is a bug in the development version recently found by one of our users. You'll find the description of the problem, as well as a patch, in the following thread: https://code-saturne.info/products/code-saturne/forums/general-usage/778113953
Feel free to come back to us in you encounter any difficulty !
David
Mita Sarkar

Re: Problem with Radiation Model

Post by Mita Sarkar »

Dear David,

Thank you for your help. I downloaded the patch and kept it in SRC  directory as suggested by Alexandre in the mentioned thread but still I am getting error with radiation. I do not know French and unfortunately the error message in listing file is in French. Anyway I am attaching the listing file here again. Please suggest me how to resolve it. I have another concern, in the above mentioned thread Jonathan said DOM works for him but DOM did not work for my case. It is also giving similar kind of error. Both listing files are attached here.

Regards Mita
Attachments
listing-05060839.txt
(95.42 KiB) Downloaded 163 times
listing-05060837.txt
(95.42 KiB) Downloaded 174 times
David Monfort

Re: Problem with Radiation Model

Post by David Monfort »

Hi Mita,
It seems you have some incoherency in the boundary conditions setup for the radiative part. Could you post your XML file or usray2.f90 routine (if any) so that I can have a look at them ?
David
Mita Sarkar

Re: Problem with Radiation Model

Post by Mita Sarkar »

Hello David,

The xml file is attached here. Please let me know what is wrong there.
 
Thanks
Mita
Attachments
case1.xml
(9.56 KiB) Downloaded 171 times
Mita Sarkar

Re: Problem with Radiation Model

Post by Mita Sarkar »

Hello David,
 
I downloaded the Code_Saturne-2.0-rc1 from the forum again and reinstall it on my machine. I also used the patch for radiation what you suggested before and now it works. At least now the model is running. 

I am trying to simulate natural convection inside a square cavity with radiation effects. Though the model ran, the results does not look correct. There is no pressure and velocity variation within the domain and results no convection heat transfer which is not correct. I used variable density and usphyv.f90 inside SRC directory but I think something is wrong there. Could you please guide me to simulate natural convection using saturne? The case file and usphyv files are attached here. You may find out what is wrong there.
 
Thank you for your help!
 
Regards
Mita
Attachments
usphyv.f90
(31 KiB) Downloaded 171 times
case1.xml
(9.46 KiB) Downloaded 179 times
David Monfort

Re: Problem with Radiation Model

Post by David Monfort »

Hello Mita,

If you installed MEI library (provided with Code_Saturne) together with the associated Python bindings (automatic if swig is installed on your system), then I would advise you to directly use the interface to set up a density law (select user law for the density, then click on the green button on the right hand side and follow the examples).

If you don't or if you want to use the Fortran subroutine (usphyv.f90) then you should set the iutile variable to 1 for each variable law you want to define (density, viscosity, ...). Otherwise, the examples given in the subroutine won't be taken into account! See e.g. the test, lines 308/309. Note that these are only examples of how to use the subroutine, and obviously not relevant for your test case! You will have to provide your own density law there. Side note: utile means useful in French ;-)

David
Mita Sarkar

Re: Problem with Radiation Model

Post by Mita Sarkar »

Hi David,
 
Thank you very much for your help. I installed MEI library but swig is not installed on my machine. I think due to that I don't have any option to define user law using GUI. So, I have to use Fortran subroutine to define density law. I will try to define it using usphyv.f90.
 
Once again thank you!
 
Mita
Mita Sarkar

Re: Problem with Radiation Model

Post by Mita Sarkar »

Hi David,
 
I am able to define the density using suer subroutine but it is not running properly, giving floating point exception error. The listing file and case file are attached here. I would appreciate very much if you can guide me to tackle this error.
 
Thanks
Mita
Attachments
listing-05171514.txt
(660.39 KiB) Downloaded 174 times
case1.xml
(9.46 KiB) Downloaded 165 times
David Monfort

Re: Problem with Radiation Model

Post by David Monfort »

Strange...

You have a Floating Point Exception, meaning there has been a problem with a float calculation (division by zero, overflow, ...). I would say that you simulation is diverging (look at the value of the friction velocity at the end of the simulation: u* = 10e13... quite high !). To check easily, set the listing output frequency to 10, or so, instead of 500. Especially, keep it lower than the graphical output frequency, as the error happens during the graphical output.

David
Post Reply