# [swak4Foam] Implementation of Robin BC by groovyBC : difference wrt. theoretic solution

 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 9, 2012, 11:24 Implementation of Robin BC by groovyBC : difference wrt. theoretic solution #1 New Member   Tianyi LI Join Date: Mar 2012 Posts: 4 Rep Power: 7 Hello everyone, we consider the following stationary heat equation: Laplacian(T)=0 Code: -----------T(x)---------- a bar with length L=0.4 m, mesh Delta x=1 mm x=0 x x=L (patch outlet) BC : At x=0 : T(0)=T0=273 K At x=L : kT'(x)=h*(T(L)-Tinf) with k=237 W/mK, h=-100 W/m^2K, Tinf=873 K We have implemented this BC using swak4Foam, in 0/T for the patch outlet: Code: type groovyBC; variables "k=237;h=-100;Tinf=873;"; valueExpression "Tinf"; fractionExpression "1/(1-k/(mag(delta())*h))"; value \$internalField; We are using the "steadylaplacianFoam" where we solve only the stationary heat equation. After about 5 iterations the solution OF has converged. However, the OF solution differs a little from the theoretic solution : CL.jpg

April 11, 2012, 16:20
#2
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,045
Rep Power: 43
Quote:
 Originally Posted by tianyikillua Hello everyone, we consider the following stationary heat equation: Laplacian(T)=0 Code: -----------T(x)---------- a bar with length L=0.4 m, mesh Delta x=1 mm x=0 x x=L (patch outlet) BC : At x=0 : T(0)=T0=273 K At x=L : kT'(x)=h*(T(L)-Tinf) with k=237 W/mK, h=-100 W/m^2K, Tinf=873 K We have implemented this BC using swak4Foam, in 0/T for the patch outlet: Code: type groovyBC; variables "k=237;h=-100;Tinf=873;"; valueExpression "Tinf"; fractionExpression "1/(1-k/(mag(delta())*h))"; value \$internalField; We are using the "steadylaplacianFoam" where we solve only the stationary heat equation. After about 5 iterations the solution OF has converged. However, the OF solution differs a little from the theoretic solution : Attachment 12409
Convergence is relative. Have you tried a stricter convergence criterion? Also try varying the mesh resolution to see if this is not just a discretization problem

 April 12, 2012, 10:33 #3 New Member   Tianyi LI Join Date: Mar 2012 Posts: 4 Rep Power: 7 After we changed the gradient scheme to leastSquares, everything is fine !! However we still don't know why...

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post immortality OpenFOAM Community Contributions 10 February 4, 2013 01:56 immortality OpenFOAM Community Contributions 2 January 28, 2013 08:34 msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58 liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07 Matt Umbel Main CFD Forum 14 January 12, 2001 15:34

All times are GMT -4. The time now is 22:36.