
[Sponsors] 
May 7, 2013, 01:28 
OpenFoam 2.2 fvOptions temperature limits

#1 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 10 
Dear all,
As some of you know, OF 2.2 introduce a new system of "fvOptions" files where we can set the porosity and so on... There is another interesting command that is "temperatureLimitsConstraint". As its name says, it is used to constraint the temperature to a minimum and maximum value. Because I didn't find any example online, here is my file: You have to put it into the "fvOptions" file located in system Code:
source1 { type temperatureLimitsConstraint; selectionMode all; active true; temperatureLimitsConstraintCoeffs { Tmin 220; Tmax 270; } } Edit: the page description come from here: http://www.openfoam.org/version2.2.0/fvOptions.php 

July 11, 2013, 14:39 

#2 
New Member
Hann Mao
Join Date: Jul 2013
Posts: 2
Rep Power: 0 
Thanks for the tip!
Does this work for all compressible solvers? I tried adding this to sonicFoam and it seems to get ignored. 

July 11, 2013, 17:49 

#3 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 10 
As I remember, sonic foam is mostly hard coded so it might not work.
To check, find the thermo equation in the source code and check if you can find a line with "+ fvoptions" or something similar. 

July 11, 2013, 21:10 

#4 
New Member
ksv
Join Date: Feb 2011
Posts: 13
Rep Power: 8 
Hi Fredo,
Thanks for your tip. May i know whether there exists similar options to control turbulent kinetic energy k and epsilon? ksv 

July 12, 2013, 04:11 

#5 
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 237
Rep Power: 10 
For k, omega et epsilon, you can add a simple code such as:
Code:
k= max(k, kMin); k= min(k, kMax); We must use fOption for T because T is not a variable used by OpenFoam. The function "fOption" actually modify the thermo equation (enthalpy) to correct the temperature. 

April 30, 2014, 06:19 

#6 
Senior Member
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 13 
Hi all,
sorry for reopening this thread but I'm using the temperatureLimitsConstraint in conjunction with chtMultiRegionFoam (OF2.2.x, latest available update) and it actually doesn't seem to me it's working as it is supposed to. The fvOptions dict appears to be read properly, but when the enthalpy equation is solved the temperature violates the imposed bounds, even if all the discretization schemes should be bounded/limited. Here there are my fvSchemes and fvOptions dictionaries (there is only one fluid region at this stage), together with an extract of runtime output log. fvSchemes: Code:
ddtSchemes { default Euler; } gradSchemes { default cellMDLimited Gauss linear 1; grad(U) cellMDLimited Gauss linear 0.5; //grad(h) faceLimited Gauss linear 1; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwindV grad(U); div(phi,K) bounded Gauss linear; div(phi,h) bounded Gauss limitedGamma 1 264157 294289; div(phi,k) bounded Gauss upwind; div(phi,epsilon) bounded Gauss upwind; div(R) Gauss linear; div((muEff*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear limited 0.333; laplacian(Dp,p_rgh) Gauss linear limited 0.333; laplacian(alphaEff,h) Gauss linear limited 0.333; laplacian(DkEff,k) Gauss linear limited 0.333; laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333; } interpolationSchemes { default linear; } snGradSchemes { default limited 0.333; } fluxRequired { default no; p_rgh; } Code:
temperature_constraints { type temperatureLimitsConstraint; active yes; selectionMode cellZone; cellZone fluid; temperatureLimitsConstraintCoeffs { Tmin 263; Tmax 293; } } Code:
Region: fluid Courant Number mean: 1.4132369e05 max: 0.98128545 deltaT = 2.381967e05 Time = 0.000100306 Solving for fluid region fluid diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 DILUPBiCG: Solving for Ux, Initial residual = 0.00081227894, Final residual = 1.6049071e07, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.07792845, Final residual = 1.8250737e05, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.0014009406, Final residual = 3.9984243e07, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.000399081, Final residual = 8.990734e08, No Iterations 1 Min/max T:262.29196 299.81974 Min/max rho:1.1716795 1.347332 GAMG: Solving for p_rgh, Initial residual = 0.0007644805, Final residual = 1.345729e05, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 6.2938682e05, Final residual = 1.757067e06, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (fluid): sum local = 3.6194871e09, global = 1.1723455e09, cumulative = 9.1079573e09 Min/max rho:1.1709893 1.3499513 GAMG: Solving for p_rgh, Initial residual = 1.1436979e05, Final residual = 3.3044886e07, No Iterations 2 GAMG: Solving for p_rgh, Initial residual = 2.5426255e06, Final residual = 4.4810886e08, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (fluid): sum local = 9.2017652e11, global = 1.1644798e11, cumulative = 9.0963125e09 DILUPBiCG: Solving for epsilon, Initial residual = 4.9736441e05, Final residual = 2.2259148e08, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 8.5244714e13, Final residual = 1.2977543e16, No Iterations 1 bounding k, min: 4.9998752e16 max: 1.15 average: 0.0022126182 V. 

July 15, 2014, 15:08 

#7 
New Member
Charles McCreary
Join Date: Jun 2010
Posts: 10
Rep Power: 9 
Typically in a CHT analysis, the system directory will have subdirectories for each region. Did you put the fvOptions file in the relevant subdirectory? Also, at the top of the log file, OpenFOAM will tell you what it has read from the fvOptions file.
*UPDATE* Same behavior here. Doesn't seem to limit the temperature at all. Last edited by crmccreary; July 15, 2014 at 15:25. Reason: update 

July 15, 2014, 15:57 

#8  
Senior Member
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 13 
Yes.
Quote:
Best V. 

July 15, 2014, 16:33 

#9 
New Member
Charles McCreary
Join Date: Jun 2010
Posts: 10
Rep Power: 9 
I was using the 2.3.x branch. Temperature in the solid blows up, not obeying the fvOptions limit. I suspect that, for some reason, diffusion at the boundary becomes zero thus zero heat flux at the boundary and the applied heat flux (fixed gradient on the solid) yields a near infinite temperature on the solid. Just a guess.


December 30, 2014, 09:27 

#10 
Senior Member
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 145
Rep Power: 6 
THis does work in chtMultiRegionSimpleFoam in V2.3.1
in conjunction with scalarSemiImplicitSource to construct a heat source limited by temperature the comment in header file gives the wrong names for the coeffs it is Tmin and Tmax not maximum and minimum. Code:
Temperaturelimit1 { type temperatureLimitsConstraint; active true; selectionMode all; temperatureLimitsConstraintCoeffs { Tmin 200; Tmax 340; } } energySource1 { type scalarSemiImplicitSource; active true; selectionMode all; scalarSemiImplicitSourceCoeffs { volumeMode specific; injectionRateSuSp { h ( 20000 0 ); // 2e4 = 20w/litre } } }
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Is wall ajacent temperature equal to conservative temperature of the wall?  shenying0710  CFX  8  January 4, 2013 05:03 
Free stream temperature in tube wall  saharesobh  FLUENT  2  November 19, 2012 08:32 
Modified OpenFOAM Forum Structure and New MailingList  pete  Site News & Announcements  0  June 29, 2009 05:56 
The OpenFOAM extensions project  mbeaudoin  OpenFOAM  16  October 9, 2007 09:33 
chemical reaction  decompostition  La S. Hyuck  CFX  1  May 23, 2001 00:07 