
[Sponsors] 
March 27, 2009, 04:56 
Using mixedFvPatchField for convection BC

#1 
Senior Member
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 10 
Ok, so there are a few threads around the forums that make vague inferences to using mixedFvPatchFields for the convective BC. There are various explanations, stating that it mixes a reference value and a reference gradient to form... well, the mix. None of them are kind enough to actually supply a solution to using the boundary condition for this sort of problem. S. Radl went ahead and wrote a separate BC just for this problem, which worked under 1.4.1, though I'm trying to sort out why it's not compiling in 1.5dev.
Even so, I've been bugged by the seeming insistence that the mixedFvPatchFields can solve the problem. I gave it a go, but I find reading OF code obtuse because I'm not much of a coder (my C++ is pretty weak) and I haven't been able to wade into it. So, if someone can actually check my basics in this, I'd very much appreciate it. So, the mixedFvPatchFields file has the following line inside the evaluate function: Code:
Field<Type>::operator= ( valueFraction_*refValue_ + (1.0  valueFraction_)* ( this>patchInternalField() + refGrad_/this>patch().deltaCoeffs() ) ); Second assumption is that this>patchInternalfield() refers then, to the cell Value (cV) and that the final portion of rV / this>patch().deltaCoeffs() is a method for extrapolating from the cV to the patch surface using the refGrad only. I'll call the deltaCoeffs term D. So, pV = vf * rV + (1vf)*(cV + rG*D) eq. 1 Now, if those assumptions are correct, algebra shall ensue as follows: pV = vf * rV + cV + rG*D  vf* cV  vf*rG*D eq. 2 pV = vf * rV + (1vf)*rV  (1vf)*rV + cV vf * cV + (1vf)*rG*D eq. 3 pV = rV  (1vf)*rV + (1vf)*cV + (1vf)*rG*D eq. 4 pV  rV = (1vf)*(rG*D + cV  rV) eq. 5 So, using statements by Hrv that setting vf = 1 is equivalent to a fixedValue BC, this is seen that eq. 5 reduces to pV = rV. So far so good. Setting vf = 0 results in the following: pV  rV + rV = rG*D + cV eq. 6 pV = rG*D + cV eq. 7 So, at least the behavior makes sense to me and is consistent with what the smarter coder types say. How to turn this into a convective BC for something like laplacianFoam? if one sets the refGradient term to 0, then eq. 5 becomes: pV  rV = (1vf)*(cV  rV) eq. 8 numerically, the patch value gets set to some interpolation between the reference and the cell value. However, the (cV  rV) term was grouped in with the gradient term, which suggests to me that the RHS of eq. 8 is equivalent to a grad( value ) term. If this is the case, then: 1/(1vf) * (pV  rV) = (cV  rV) can be rewritten in slightly more familiar terms with h = heat transfer coefficient, k = thermal conductivity and "value" being the temperature: h / k * (T_{surf}  T_{ref} ) = grad ( T ) so 1 / (1vf) = h / k and refGrad should be set to zero to obtain a convective boundary condition. Is this correct or have I just wasted 30 minutes of typing?? Regards, Mike J. 

March 28, 2009, 01:22 

#2 
Senior Member
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 10 
So, that was a waste of time. If one is restricted to values of 0 < valueFraction < 1, the arbitrary heat transfer coefficients and conductivities easily surpass this. At the same time, a solver will still run using values outside 0 < vF < 1.
However, it's not the right result. A simple 1D case wound up with a temperature below the reference value. So much for this attempt. 

September 24, 2009, 21:43 

#3 
Member
Jitao Liu
Join Date: Mar 2009
Location: Jinan , China
Posts: 64
Rep Power: 10 
Dear Mike J.
I am interested in the convection BC too: h / k * (T_{surf}  T_{ref} ) = grad ( T ) Have you got this convection BC I am study the heating process of a solid, which has several heating channels for hot gas or hot oil flowing through. So the boundary condition at the channel wall belongs to the thirdclass, just as you mentioned above. Please give me some tips. Thanks in advance. Regards, Jitao 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Boundary condition of the third kind or Danckwertz boundary condition  plage  OpenFOAM Running, Solving & CFD  4  October 3, 2006 12:21 