|
[Sponsors] |
May 7, 2013, 02:28 |
OpenFoam 2.2 fvOptions temperature limits
|
#1 |
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 17 |
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, 15: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, 18:49 |
|
#3 |
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 17 |
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, 22:10 |
|
#4 |
New Member
ksv
Join Date: Feb 2011
Posts: 16
Rep Power: 15 |
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, 05:11 |
|
#5 |
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 17 |
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, 07:19 |
|
#6 |
Senior Member
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20 |
Hi all,
sorry for re-opening this thread but I'm using the temperatureLimitsConstraint in conjunction with chtMultiRegionFoam (OF-2.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.4132369e-05 max: 0.98128545 deltaT = 2.381967e-05 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.6049071e-07, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.07792845, Final residual = 1.8250737e-05, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.0014009406, Final residual = 3.9984243e-07, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.000399081, Final residual = 8.990734e-08, 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.345729e-05, No Iterations 3 GAMG: Solving for p_rgh, Initial residual = 6.2938682e-05, Final residual = 1.757067e-06, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (fluid): sum local = 3.6194871e-09, global = -1.1723455e-09, cumulative = 9.1079573e-09 Min/max rho:1.1709893 1.3499513 GAMG: Solving for p_rgh, Initial residual = 1.1436979e-05, Final residual = 3.3044886e-07, No Iterations 2 GAMG: Solving for p_rgh, Initial residual = 2.5426255e-06, Final residual = 4.4810886e-08, No Iterations 2 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors (fluid): sum local = 9.2017652e-11, global = -1.1644798e-11, cumulative = 9.0963125e-09 DILUPBiCG: Solving for epsilon, Initial residual = 4.9736441e-05, Final residual = 2.2259148e-08, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 8.5244714e-13, Final residual = 1.2977543e-16, No Iterations 1 bounding k, min: 4.9998752e-16 max: 1.15 average: 0.0022126182 V. |
|
July 15, 2014, 16:08 |
|
#7 |
New Member
Charles McCreary
Join Date: Jun 2010
Posts: 12
Rep Power: 16 |
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 16:25. Reason: update |
|
July 15, 2014, 16:57 |
|
#8 | |
Senior Member
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 368
Rep Power: 20 |
Yes.
Quote:
Best V. |
||
July 15, 2014, 17:33 |
|
#9 |
New Member
Charles McCreary
Join Date: Jun 2010
Posts: 12
Rep Power: 16 |
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: 172
Rep Power: 13 |
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 |
|
August 27, 2018, 05:56 |
|
#11 |
Member
Foad
Join Date: Aug 2017
Posts: 58
Rep Power: 9 |
Adding a fvOptions file in system folder with :
Code:
temperatureLimit { type limitTemperature; active true; limitTemperatureCoeffs { selectionMode all; min <Tmin>; max <Tmax>; } } |
|
December 16, 2019, 16:07 |
|
#12 |
Member
Thomas
Join Date: Nov 2017
Posts: 37
Rep Power: 9 |
Hi everyone
My simulation in OF v1806 using rhoSimpleFoam crashed after very few iterations due to divergence in temperature. After limiting the temperature the solver runs very well. Now the same simulation has a very similar behaviour in foam-extend 4.0 when using dbnsTurbFoam. When I tried to apply limits I realised that fvOptions is not available in the foam-extend version. Does anyone know a work around or how I can apply limits? Many thanks. |
|
January 17, 2020, 00:59 |
Limit temperature within the inner loop?
|
#13 |
Member
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 8 |
Is there a way to limit temperature within the inner loop?
My temparature blows up within a loop? I am also interested in limiting the temperature for another variable interface temperature Tf? Anybody having any ideas? I am using interfacecomposition model in reactingTwoPhaseEulerFoam? Thanks Stanley |
|
Thread Tools | Search this Thread |
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 Mailing-List | pete | Site News & Announcements | 0 | June 29, 2009 06:56 |
The OpenFOAM extensions project | mbeaudoin | OpenFOAM | 16 | October 9, 2007 10:33 |
chemical reaction - decompostition | La S. Hyuck | CFX | 1 | May 23, 2001 01:07 |