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/)
-   -   Robin BC for T (https://www.cfd-online.com/Forums/openfoam-programming-development/92882-robin-bc-t.html)

moritzhoefert September 28, 2011 07:57

Robin BC for T
 
Dear all,

one equation in my case is
Code:

solve
            (  fvm::ddt(T)
                + fvm::div(phi,T)
                - fvm::laplacian(lambda,T)
            );

with lambda being a function of space and time. In the BC I would like to specify a heat flux q_dot = alpha(T_inf - T_bc).

T_inf ...const. Far field temperature
alpha ...const. Heat transfer coefficient
T_bc ...Temperature at boundary

Energy conservation yields
q_dot = -lambda (del T)/(del n) = alpha(T_inf - T_bc)
which is my BC.

* Does such a BC exist?
* How should I proceed if I want to implement it?
* I know that it is similar to the BC "mixed" but I think mixed cannot account for non-constant lambda. Are there other BCs that might be useful templates?

Thank you for any comments!
Cheers

cosimobianchini September 29, 2011 04:19

I wrote such a BC few time ago (you find the code here) and it actually is a mixed boundary condition.
The idea is simple, just rewriting the equation you wrote (I also add a general thermal power to handle radiation Q) you end up with:
h/(h+k*deltaCoeff) * T_w + k*deltaCoeff/(h+k*deltaCoeff) * gradT_w = h/(h+k*deltaCoeff) * T_ref + Q*deltaCoeff/(h+k*deltaCoeff)
satisfying both the physical constraint and the form of the mixed boundary condition i.e. VF * T_w + (1-VF) * gradT_w =VF*T_ref + (1-VF) * gradT_ref.
So it just set:
VF = h/(h+k*deltaCoeff)
T_ref = T_ref
gradT_ref = Q*deltaCoeff*VF/(1-VF)/h

in order to make it work you just have to define in your solver a volScalarField kond to store values for the thermal conductivity (optionally you can define it inside the BC if you like).
It was compiled on 1.6.x but I guess you will not have troubles importing it in 1.6-ext or 1.7. Not sure about 2.0, drop me an email if you need a help.
Hope you find this useful.

moritzhoefert October 10, 2011 08:47

Hi Cosimo,

thanks so much for writing down your thoughts! You helped me a lot!

Regards,
Moritz


All times are GMT -4. The time now is 16:53.