CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Temperature gradient (

tsherk86 August 1, 2008 13:54

Hello, I am wondering how t

I am wondering how to set an initial temperature to be a linear (in radius r) temperature profile from, say, T_A at r_a (inside wall) to T_b at r_b (outside wall) for, in this case, a cylindrical annulus.

As my boundary conditions, I have the inside and outside walls of the annulus two different temperatures, and I want my inside temperature to go from the one temperature to the other temperature linearly. Is there a utility that can do this or some way of coding this?


mattijs August 1, 2008 16:56

potentialFoam -writep Set p
potentialFoam -writep

Set p like T so fixed value on your annuli, zeroGradient on front and back.

Copy (by hand) resulting internal field of pressure back into T.

tsherk86 August 5, 2008 14:42

Works great!! Thank you very m
Works great!! Thank you very much for the help!


All times are GMT -4. The time now is 15:39.