CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Implementation of Robin BC by groovyBC : difference wrt. theoretic solution

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 9, 2012, 11:24
Default Implementation of Robin BC by groovyBC : difference wrt. theoretic solution
  #1
New Member
 
Tianyi LI
Join Date: Mar 2012
Posts: 4
Rep Power: 5
tianyikillua is on a distinguished road
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
tianyikillua is offline   Reply With Quote

Old   April 11, 2012, 16:20
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by tianyikillua View Post
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
gschaider is offline   Reply With Quote

Old   April 12, 2012, 10:33
Default
  #3
New Member
 
Tianyi LI
Join Date: Mar 2012
Posts: 4
Rep Power: 5
tianyikillua is on a distinguished road
After we changed the gradient scheme to leastSquares, everything is fine !! However we still don't know why...
tianyikillua is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07
CFL Condition Matt Umbel Main CFD Forum 14 January 12, 2001 15:34


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