Mixed/Robin boundary condition
1 Attachment(s)
I am quite new to OpenFOAM and therefore am not entirely sure whether this is a bug or a feature, but results one obtains when selecting valueFraction in ]0,1[ when using 'mixed' boundary condition (i.e., a truly mixed/Robintype boundary condition, not a pure Dirichlet or a Neumann one) depend on the grid size, which seems quite startling to me. For example, I attach a small effectively onedimensional testcase (tared gziped test_bc.tar.gz) of a steadystate heat conduction problem on a unit square, where at the bottom boundary a mixed BC is prescribed with refValue=1.0, and refGradient=2.0. The solution to this problem varies linearly from top (where T=0 is prescribed) to bottom, so for a purely Dirichlet problem (valueFraction=1) T_Dir=1.0 at the "mixed" boundary, and for purely Neumann case (valueFraction=0) T_Neum=n*grad(T)=2.0 there. Therefore, say for valueFraction = 0.5 I would expect T=0.5*(T_Dir + T_Neum) = 0.5; however, one may easily check that this value depends on the number of elements in the mesh and in fact converges to T_Dir as the mesh is refined.
Such behaviour can be fixed if one uses newValueFraction_=valueFraction_/(valueFraction_ + (1.0valueFraction_)*this>patch().deltaCoeffs()); in place of valueFraction_ in the implementation of the mixed boundary condition (I can sketch a small note why, and I tried to write a comment about this in my amateurish C++ implementation of mixed1 boundary conditionalso in the attached archive), which now produces expected meshindependent results. You can try it out by building the corrected mixed1 boundary condition (wmake libso in mixed1BC.d); and then changing mixed>mixed1 in test_bc/0/T file and uncommenting the 'libs' line in test_bc/system/controlDict to load the mixed1 BC. Please let me know if I misunderstand the purpose or the expected behaviour of the original mixed boundary condition in OpenFOAM. Sincerely, Anton Evgrafov 
Thanks
Today I found that Robin BC give incorrect temperatures on the wall Twall>Tref.
Your post could be useful. Tomorrow I'll try It. А ещё, Вы говорите порусски?) 
Quote:

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