CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Mixed boundary condition (http://www.cfd-online.com/Forums/openfoam-solving/83194-mixed-boundary-condition.html)

 NewFoamer December 19, 2010 06:05

Mixed boundary condition

Hello,

For a scalar field T, I want to implement a boundary condition which ensures following:

A*T + B*(dT/dn) = C

I'm having difficulties understanding how to translate this equation to expressions for valueInternalCoeffs, valueBoundaryCoeffs, gradientInternalCoeffs and gradientBoundaryCoeffs.

Any help would be appreciated.

 NewFoamer January 2, 2011 14:35

I can easily understand the fixedValue where:

VIC = 0;
VBC = value;
GIC = -1/delta;
GBC = value/delta;

with delta being the distance from centrum to face and value being the boundary value. The fixedGradient I can also understand:

VIC = 1;
VBC = gradient * delta;
GIC = 0;

but I can not see how to derive expressions for an equation where both the gradient and value occur, such as: A*T + B*(dT/dn) = C

Can anyone help?

 benk January 11, 2011 10:36

Are you trying to understand the implementation or are you just trying to implement it?

If you just need to implement it, I think the easiest way is to install groovyBC and then:

Quote:
 rightWall { type groovyBC; variables "Tinf=298;"; valueExpression "Tinf"; fractionExpression "1.0/(1.0 + K/(mag(delta())*h))"; }

or you can take a look at the wallHeatTransfer boundary condition which does the same thing.

This is for a convective heat transfer boundary condition which looks like:

Code:

```K*dT/dx = h(T-Tinf) or h/K*T - dT/dx = h/K*Tinf```
I really don't understand this implementation though and I'm hoping somebody can take the time to explain this to me too!

 argonaut February 17, 2011 11:35

I tried to explain this implementation here.

It took me several days of thinking and browsing the forum to understand this implementation. Hope this will help for others to find answers quicker.

 All times are GMT -4. The time now is 12:42.