CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Overwriting Temperature in OpenFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/118980-overwriting-temperature-openfoam.html)

IvanaS June 7, 2013 09:20

Overwriting Temperature in OpenFoam
 
Hi,

I coupled reactingFoam with the combustion in-house code that provides me density and temperature. I send temperature and density to OpenFoam in order to update flow field. OpenFoam uses density from combustion code properly but I have problems with temperature. OpenFoam doesn't use the temperature from the separate combustion code but one from basicThermo.

Does someone has any suggestion how to overwrite temperature in OpenFoam and make OpenFoam to use temperature calculated in the other code?
Is there a way to do it without modifying basicThermo files?

Thank you very much.

Regards,

Ivana

fredo490 June 8, 2013 06:18

I made somthing similar few weeks ago, here is the solution:
http://www.cfd-online.com/Forums/ope...implefoam.html

IvanaS June 10, 2013 08:17

Hi,

Thank you for your reply.

But would it be possible that I copy basicThermo to my own implementation of reactingFoam and modify it and use it from there? I am not sure how to do that? Would I also need to have "turbulenceModels/compressible/turbulenceModel" in the same directory?

I am asking this because if I change basicThermo in the top-level solver that might also influence other users of OpenFoam...

Thank you!

Regards,
Ivana

fredo490 June 10, 2013 10:57

If you do the modification I made in the other topic (add a member to get a variable T and not a constant T), there is no problem with the other solvers. I currently use it on my OpenFoam and everything runs fine. It simply "add" an extra function/possibility, it doesn't change anything.

But you can make it local if you want. I had this topic few weeks ago: http://www.cfd-online.com/Forums/ope...ion-2-2-a.html
I haven't got time to write a "tutorial" yet.

IvanaS June 25, 2013 05:17

It is working! Thank you!

Regards,

Ivana

fredo490 June 25, 2013 07:32

You are welcome. It seems that the last update from OF 2.2 includes a code similar to the one I've showed you. So, if you don't want to change everything next time, just update OF.

IvanaS June 25, 2013 07:34

That's good to know. Thanks once more!


All times are GMT -4. The time now is 19:13.