CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Mixed BC - heat transfer - laplacianFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree60Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2012, 18:22
Default convective bc based on mixed
  #41
Member
 
,...
Join Date: Apr 2011
Posts: 92
Rep Power: 14
hawkeye321 is an unknown quantity at this point
Thanks for the comment.

Is the implementation of convective bc by mixed type in the following way?

refValue = Tinf
refGradient = 0
valueFraction = 1/(1+k/(h*mag(delta())))
value = ???
hawkeye321 is offline   Reply With Quote

Old   September 20, 2012, 18:25
Default
  #42
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
You can find the description here, just read more careful
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   September 21, 2012, 18:03
Default Problem when formulating the energy equation with enthalpy
  #43
Member
 
,...
Join Date: Apr 2011
Posts: 92
Rep Power: 14
hawkeye321 is an unknown quantity at this point
Hi Foamers
Following the discussions above, I implemented the groovyBC for simple 2D heat conduction problem. The problem is the cooling of plate by imposing a convective bc from one side. My results seem to be reasonable when I formulate the energy equation with temperature, I mean
Density*Cp*(dT/dt) = k(d2T/dx2)
But when I am formulating it vs enthalpy as
Density* (dh/dt) = k(d2T/dx2),
the temperature reach values less than Tinf, which is wrong. Any ideas?
hawkeye321 is offline   Reply With Quote

Old   September 21, 2012, 18:31
Default
  #44
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Do you make correction loops for each time step?
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   September 21, 2012, 19:06
Default
  #45
Member
 
,...
Join Date: Apr 2011
Posts: 92
Rep Power: 14
hawkeye321 is an unknown quantity at this point
makaveli_lcf thanks fro reply

Well this is the main part of the code
fvScalarMatrix TEqn
(
Density*fvm::ddt(h)
- Cond*(fvc::laplacian(T))
);
TEqn.solve();
forAll( T, celli)
{
T[celli] = (h[celli]-(gL.value()*Latent.value()))/(Cp.value());
}
is this what you ask for?
hawkeye321 is offline   Reply With Quote

Old   September 21, 2012, 19:13
Default
  #46
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Ok then you should put a coupling loop (like pimple e.g.) around it, because temperature values which you use in the energy equation for the enthalpy are from the previous iteration and do not meat the energy equation after you calculate them from enthalpy.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   September 21, 2012, 19:18
Default
  #47
Member
 
,...
Join Date: Apr 2011
Posts: 92
Rep Power: 14
hawkeye321 is an unknown quantity at this point
Do you mean previous time step? My formulation is explicit and I am not concerned about using the previous time step values for T in energy equation. By the way, with the same formulation, I get reasonable results when I use constant temperatures as the boundary condition. So I am almost sure that the problem is in the way I have applied the boundary conditions.
hawkeye321 is offline   Reply With Quote

Old   September 21, 2012, 19:44
Default
  #48
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
No I mean previus ITERATION:

Step #1: you take T from old time step (at least OpenFOAM does it for you in any case) and use them to solve dh(@_new_time_step)/dt=k*laplacian(T(@_old_time_step))

Step #2: update T from new calculated h values

Step #3: since T does not fullfil dh/dt = k*laplacian(T) calculate h using T from Step #2

a) If you pretend, that your solver is transient, you have to make coupling loops Step #1-#2 so many times, that T will correspond to the energy equation. Low temperature values can be explained (if you speak about some transient point in your calculation) by the fact that your system h-T is not converged for the current time step.

b) If you use transient way to get a steady state solution it is not necessary. But do not try to explain intermediate T values then
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at

Last edited by makaveli_lcf; September 21, 2012 at 19:48. Reason: Rearanged
makaveli_lcf is offline   Reply With Quote

Old   September 21, 2012, 19:48
Default
  #49
Member
 
,...
Join Date: Apr 2011
Posts: 92
Rep Power: 14
hawkeye321 is an unknown quantity at this point
Thanks for your comments, but I still think that there is a problem in implementing boundary conditions and not in the solver, because the solver gives good results with fixed value bc for temperature.
hawkeye321 is offline   Reply With Quote

Old   September 21, 2012, 19:56
Default
  #50
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
You are trying to compare Dirichlet and Robin boundary conditions. First one is fixing your solution to some values, the second contains gradients and nonlinearity, so can couse oscilations around final solution and needs some iterative process if you treat it explicit way and not implicitly... But Ok, it is your choise how check it...
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   October 9, 2012, 09:35
Default limit of applicability of the 1st order approx.
  #51
Member
 
Elisabet Mas de les Valls
Join Date: Mar 2009
Location: Barcelona, Spain
Posts: 64
Rep Power: 17
elisabet is on a distinguished road
Dear all,

I'm now interested in such a boundary condition (applied to other phenomena). I first must thank you all for your work! I'm sure it will be very useful

I just want to mention that the 1D approach is valid for small enough values of Biot number. And NOTE THAT BIOT=1/C!!!!!

For planar surfaces, typically Bi<0.1 is enough. This means that wall tangential temperature gradients does not alter the heat flux (what in fact just states that the boundary and internal nodes are close enough to consider 1D conduction)

For 1D conduction in planar geometries, with no thermal production and constant thermal conductivity, the temperature difference that appears in Fourier's Law is, definitely, first order.
elisabet is offline   Reply With Quote

Old   January 27, 2013, 20:26
Default changing htot value did not affect the results
  #52
New Member
 
sorush ahmadian
Join Date: Jun 2012
Posts: 5
Rep Power: 13
sahmadian is on a distinguished road
Dear All,
Thanks for the good information provided here. I am solving the heat equation (enthalpy) for a food sphere with phase change. I implemented the groovyBC for my problem and in the first glance it seemed to work fine. But when I tried to change the convective heat transfer coefficient (htot) no change in the results occurred and I got the same results. I have tried all the suggestions in this post except the wallHeatTransfer which did not work for me. Any ideas?
best
SA
sahmadian is offline   Reply With Quote

Old   July 4, 2013, 12:17
Default Difference between parameter in groovyBC
  #53
New Member
 
Join Date: Feb 2012
Posts: 11
Rep Power: 14
franzi_ is on a distinguished road
Dear all, Thanks for the useful discussion, but I still did not understand the groovyBC completely.

1. What is the difference between the parameters? valueExpression to set Dirichlet-condition, gradientExpression to set Neumann and what is then fractionExpression? The explanation from http://openfoamwiki.net/index.php/Contrib_groovyBC doesn't help me...

2. Still I did not understand the derivation of:
type groovyBC; variables "htot=1000.0;Tinf=20.0;rho=800.0;cp=385.0;k=DT*rho *cp;"; valueExpression "Tinf"; fractionExpression "1.0/(1.0 + k/(mag(delta())*htot))";

, but it works in my case. So I want to know why


GroovyBC is such a powerful tool, so I finally want to understand the tool in detail. Any hints?

Thanks a lot in advance
franzi_ is offline   Reply With Quote

Old   October 6, 2013, 17:14
Default
  #54
New Member
 
eric
Join Date: Nov 2010
Location: Vancouver, Canada
Posts: 16
Rep Power: 15
armyou is on a distinguished road
This is a life saver!!!
armyou is offline   Reply With Quote

Old   March 28, 2014, 13:17
Default
  #55
New Member
 
Alfonso C
Join Date: Nov 2013
Posts: 2
Rep Power: 0
acubillosv is on a distinguished road
Thank you for the explanation. But, how can I use the 1/deltaCoeff() in the BC file T ??

Many thanks.

Alfonso C
acubillosv is offline   Reply With Quote

Old   May 4, 2014, 20:02
Default
  #56
New Member
 
Jonas
Join Date: Feb 2014
Location: Porto Alegre, Brazil
Posts: 1
Rep Power: 0
jnichel is on a distinguished road
I'm new in openfoam. I'm willing to implement this bc:

k (Tf - Tc)/x + h (Tf - Tinf) = 0

k, Tc, x, Tinf are given values.

I want to find Tf, but h is not constant, h should be calculated in each step based in the temperature gradient (-k dT/dy) / (Tf-Tinf).

Is it possible to be done? How could I implement it?

ps. I would give initial values for Tf and h.
jnichel is offline   Reply With Quote

Old   August 25, 2015, 02:18
Default Fixed Heat Flux In OpenFOAM
  #57
New Member
 
Join Date: May 2015
Posts: 3
Rep Power: 10
AliMahmoodi is on a distinguished road
I have introduced Temperature equation in icofoam , finally it compiled successfully. Now i am going to solve laminar pipe flow, so i need to implement a constant heat flux on wall. i have heard fixedgradient boundary condition does not implement a constant heat flux.

has any one know how i can improve this problem?

do i need groovy Bc?

i dont know how to work whit groovy Bc?
AliMahmoodi is offline   Reply With Quote

Old   August 25, 2015, 21:14
Default Changing heat transfer coefficient
  #58
P_P
New Member
 
Join Date: Mar 2014
Posts: 11
Rep Power: 12
P_P is on a distinguished road
Hello,
due to your posts I was able to approximate the heat loss in a rectangular bubble column which consists of acrylic glass and is insulated with styropor. At t=0 the bubble column contains water with a temperature of 46°C. As time progresses, the bubble column is fed with air which has a temperature of 18°C. The direct consequence is that the water temperature drops. In order to simulate this heat loss I used groovybc:

Quote:
type groovyBC;
value uniform 319.15;
variables "k_1=0.597;htot=1/(0.03/0.035+0.01/0.19+1/0.021);Tinf=291.15;";
valueExpression "Tinf";
fractionExpression "1.0/(1.0+k_1/mag(delta())*1/htot)";
The number 0.021 represents the external heat transfer coefficient due to natural convection. In order to describe the heat loss more precisely, I would like to update the external heat transfer coefficient after each timestep. Therefore I need to determine the outer wall temperature. Has someone got an idea how this problem can be handled?

Greetings

P_P
P_P is offline   Reply With Quote

Old   November 17, 2015, 21:36
Default
  #59
Member
 
Saurabh Tandon
Join Date: Nov 2015
Location: Austin
Posts: 43
Rep Power: 10
STutexas is on a distinguished road
Quote:
Originally Posted by argonaut View Post
At last, I've got it. It seems that I am not so stupid as I thought

groovyBC is based on mixed BC. Algorithm in the function "evaluate" of the file mixedFvPatchField.C (src » finiteVolume » fields » fvPatchFields » basic » mixed) states that

Tface = f*refValue + (1-f)*(Tcenter + refGrad * delta)

where f is valueFraction, delta is distance between Tcenter and Tface (OpenFOAM's 1/deltaCoeffs() or groovyBC's mag(delta())). If we take boundary condition

k*dT/dn + h*(Tface-Tinf) = 0

linearize derivative

k*(Tface-Tcenter)/delta + h*(Tface-Tinf) = 0

divide by h and isolate Tface, we obtain

Tface = (1/(1+C))*Tinf + (1 - 1/(1+C))*Tcenter

where C=k/(h*delta). As you can see, comparison of this equation to the first one gives

f = 1/(1+C)
refValue = Tinf
refGrad = 0

Concerning approximation, it is the first order approximation if I understand it correctly. Does anybody knows if there are any 2nd order approximations in OpenFOAM for derivatives on the boundary. I know that it is possible to implement 2nd order approximation, but it would use values from previous timestep. Not sure if this possible with groovyBC, isn't it?
Hi

Thank you for your great explanation for the use of groovyBC. Could you explain the use of 'refGrad' term in the expression.
Thanks again.

Saurabh
STutexas is offline   Reply With Quote

Old   November 18, 2015, 10:31
Wink
  #60
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi Saurabh,

refGrad has a similar meaning than refValue and it is used depending on the Boundary Condition itself. In the case you mention proposed by argonaut its value is 0. However, if the same case had included an extra constant heat flux, for instance a known radiative heat flux, you should have used refGrad in the definition of the Tface expression.

To get a better understanding of what I am talking about, please, take a look at this document.

Hope it helps.

Best regards,

Alex
Kevin.H likes this.
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Heat transfer coefficient - what is waht Stan FLUENT 28 December 29, 2021 16:29
Convective / Conductive Heat Transfer in Hypersonic flows enigma Main CFD Forum 2 November 1, 2009 22:53
How can I increase Heat Transfer at Domain Interf? B.Simon CFX 3 October 28, 2008 18:53
CFX Heat Transfer RJamison CFX 0 July 24, 2008 12:11
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


All times are GMT -4. The time now is 08:15.