|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Shailesh BG
Join Date: Aug 2017
Location: Bangalore
Posts: 39
Rep Power: 9 ![]() |
Hello Foamers,
I am trying to convert the temperature values from Kelvin to celsius, I read that paraview has no concept of units so we have to export temperatures out of OpenFOAM 5.x in Celsius-Format. I tried postprocessing with foamCalc utility but on openFoam 5 foamCalc has been superseded by the postProcess utility. One of the posts suggested a workaround " add a volScalarField Toffset with zeroGradient boundary conditions and an initial value of 273K in the time directories you want to export and then proceed with postProcess" because Code:
postProcess -fields "(T 273.15)" -func subtract Is there an easier way to convert temperature values from Kelvin to celsius. Thank you in advance for all your help. Regards, Shailesh |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Join Date: Mar 2016
Posts: 73
Rep Power: 10 ![]() |
I don't know if it works with OpenFoam but i had a similiar problem in Fluent. The solution data were vectors. You can load these vectors into Matlab and substract 273 to get Celsius. Afterwards you create a new data file with the new values for temperature. It is not very beautiful but it worked in fluent.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Shailesh BG
Join Date: Aug 2017
Location: Bangalore
Posts: 39
Rep Power: 9 ![]() |
Hi, thank you for your reply, but there is an easier way in fluent... go to Define > Units > temperature and change from kelvin to celsius.
In openFoam I am looking for an easier way probably by making use of some of its utilities, could anyone please help me out with this. Regards, Shailesh |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,169
Rep Power: 27 ![]() |
Hi Shailesh,
I'm not sure to understand your problem but why don't you just use the calculator in paraview to create a temperature field in Celsius ? |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Shailesh BG
Join Date: Aug 2017
Location: Bangalore
Posts: 39
Rep Power: 9 ![]() |
Hello Yann,
Thank you very much for your reply, I did try with calculator in paraview to create a temperature field in celsius but I do not know how to use that 'result array' while plotting lines using 'Plot over Line'. So when I plot a graph using 'Plot over Line' with temperature as y co-ordinate I still get the values in kelvins. So I thought I should import the values into paraview in celsius itself so that my graphs will be in celsius. Could you please help me with this or let me know how to use the resultant celsius array while plotting using plot over line. Thank you very much for your time, Shailesh |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,169
Rep Power: 27 ![]() |
Shailesh,
You can convert your temperature field from Kelvin to Celsius using the calculator filter in paraview. Be careful to apply your calculator filter on the whole internalMesh if you want to have the temperature field in the whole domain. In the calculator, select the "T" field in the list of scalar to perform your conversion (T-273.15). You can specify the result array name. Default is "Result" but you can go for anything you want, like Tcelsius for the sake of clarity. Then you can use the "plot over line" filter using you Calculator filter as source and you'll be able to select the field created with the calculator ("Result" or "Tcelsius") in your plot. Have fun! Yann |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Shailesh BG
Join Date: Aug 2017
Location: Bangalore
Posts: 39
Rep Power: 9 ![]() |
Thank you very much Yann, this is exactly what I was looking for, it is working fine now.
Thank you for your time and have a great day ahead. Regards, Shailesh |
|
![]() |
![]() |
![]() |
Tags |
openfoam 5.0, paraview 5.4.0, postprocessing |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Shadow Wall and temperature | norger | FLUENT | 10 | September 28, 2019 11:43 |
Inlet won't apply UDF and has temperature at 0K! | tccruise | Fluent UDF and Scheme Programming | 2 | September 14, 2012 06:08 |
difference of temperature | HKH | FLUENT | 0 | January 28, 2010 02:45 |
monitoring point of total temperature | rogbrito | FLUENT | 0 | June 21, 2009 17:31 |
Temperature in vessel during throttling process | Astrid | Main CFD Forum | 2 | January 31, 2001 02:34 |