http://www.cfd-online.com/W/index.php?title=Special:Contributions/Si&feed=atom&limit=50&target=Si&year=&month=CFD-Wiki - User contributions [en]2016-12-04T16:35:16ZFrom CFD-WikiMediaWiki 1.16.5http://www.cfd-online.com/Wiki/Two_equation_turbulence_modelsTwo equation turbulence models2007-06-13T12:37:29Z<p>Si: /* Boussinesq eddy viscosity assumption */ included k term in eqn for reynolds stress for incomp flows</p>
<hr />
<div>{{Turbulence modeling}}<br />
Two equation turbulence models are one of the most common type of turbulence models. Models like the [[K-epsilon models|k-epsilon model]] and the [[K-omega models|k-omega model]] have become industry standard models and are commonly used for most types of engineering problems. Two equation turbulence models are also very much still an active area of research and new refined two-equation models are still being developed.<br />
<br />
By definition, two equation models include two extra transport equations to represent the turbulent properties of the flow. This allows a two equation model to account for history effects like convection and diffusion of turbulent energy. <br />
<br />
Most often one of the transported variables is the [[Turbulent kinetic energy|turbulent kinetic energy]], <math>k</math>. The second transported variable varies depending on what type of two-equation model it is. Common choices are the turbulent [[Dissipation|dissipation]], <math>\epsilon</math>, or the [[Specific dissipation|specific dissipation]], <math>\omega</math>. The second variable can be thought of as the variable that determines the scale of the turbulence (length-scale or time-scale), whereas the first variable, <math>k</math>, determines the energy in the turbulence.<br />
<br />
==Boussinesq eddy viscosity assumption==<br />
<br />
The basis for all two equation models is the [[Boussinesq eddy viscosity assumption]], which postulates that the [[Reynolds stress tensor]], <math>\tau_{ij}</math>, is proportional to the mean strain rate tensor, <math>S_{ij}</math>, and can be written in the following way:<br />
<br />
:<math>\tau_{ij} = 2 \, \mu_t \, S_{ij} + \frac{2}{3}\rho k \delta_{ij}</math><br />
<br />
Where <math>\mu_t</math> is a scalar property called the [[Eddy viscosity|eddy viscosity]] which is normally computed from the two transported variables. The last term is included for modelling incompressible flow to ensure that the definition of turbulence kinetic energy is obeyed:<br />
<br />
:<math>k=\frac{\overline{u'_i u'_i}}{2}</math><br />
<br />
The same equation can be written more explicitly as:<br />
<br />
:<math> -\overline{\rho u'_i u'_j} = \mu_t \, \left( \frac{\partial U_i}{\partial x_j} + \frac{\partial U_j}{\partial x_i} \right) + \frac{2}{3}\rho k \delta_{ij}</math><br />
<br />
The Boussinesq assumption is both the strength and the weakness of two equation models. This assumption is a huge simplification which allows one to think of the effect of turbulence on the mean flow in the same way as molecular viscosity affects a laminar flow. The assumption also makes it possible to introduce intuitive scalar turbulence variables like the turbulent energy and dissipation and to relate these variables to even more intuitive variables like [[Turbulence intensity|turbulence intensity]] and [[Turbulence length scale|turbulence length scale]]. <br />
<br />
The weakness of the Boussinesq assumption is that it is not in general valid. There is nothing which says that the Reynolds stress tensor must be proportional to the strain rate tensor. It is true in simple flows like straight boundary layers and wakes, but in complex flows, like flows with strong curvature, or strongly accelerated or decellerated flows the Boussinesq assumption is simply not valid. This give two equation models inherent problems to predict strongly rotating flows and other flows where curvature effects are significant. Two equation models also often have problems to predict strongly decellerated flows like stagnation flows.<br />
<br />
[[Category: Turbulence models]]<br />
<br />
{{stub}}</div>Sihttp://www.cfd-online.com/Wiki/Template:Turbulence_modelingTemplate:Turbulence modeling2007-06-12T12:33:11Z<p>Si: </p>
<hr />
<div>{| class="infobox bordered" style="vertical-align: top; text-align: left;"<br />
|+ style="background: #ccf; font-size: larger;" align="center" | '''[[Turbulence modeling]]'''<br />
|-<br />
| '''[[Turbulence]]'''<br />
|-<br />
|<br />
* [[What is turbulence%3F|Introduction]]<br />
* [[Elements of statistical analysis|Statistical analysis]]<br />
* [[Reynolds averaged equations and the turbulence closure problem|Reynolds averaging]]<br />
|-<br />
| '''[[Algebraic turbulence models|Algebraic models]]'''<br />
|-<br />
|<br />
* [[Cebeci-Smith model]]<br />
* [[Baldwin-Lomax model]]<br />
* [[Johnson-King model]]<br />
|-<br />
| '''[[One equation turbulence models|One equation models]]'''<br />
|-<br />
|<br />
* [[Prandtl's one-equation model]]<br />
* [[Baldwin-Barth model]]<br />
* [[Spalart-Allmaras model]]<br />
|-<br />
| '''[[Two equation models]]'''<br />
|-<br />
|<br />
* [[k-epsilon models]]<br />
:[[Standard k-epsilon model]]<br />
:[[Realisable k-epsilon model]]<br />
:[[RNG k-epsilon model]]<br />
:[[Near-wall treatment for k-epsilon models|Near-wall treatment]]<br />
*[[k-omega models]]<br />
:[[Wilcox's k-omega model]]<br />
:[[Wilcox's modified k-omega model]]<br />
:[[SST k-omega model]]<br />
:[[Near-wall treatment for k-omega models|Near-wall treatment]]<br />
* [[Two equation turbulence model constraints and limiters|Contraints and limiters]]<br />
:[[Kato-Launder modification]]<br />
:[[Durbin's realizability constraint]]<br />
:[[Yap correction]]<br />
:[[Realisability and Schwarz' Inequality]]<br />
|}</div>Sihttp://www.cfd-online.com/Wiki/Template:Turbulence_modelingTemplate:Turbulence modeling2007-06-12T12:32:53Z<p>Si: </p>
<hr />
<div>{| class="infobox bordered" style="vertical-align: top; text-align: left;"<br />
|+ style="background: #ccf; font-size: larger;" align="center" | '''[[Turbulence modeling]]'''<br />
|-<br />
| '''[[Turbulence]]'''<br />
|-<br />
|<br />
* [[What is turbulence%3F|Introduction]]<br />
* [[Elements of statistical analysis|Statistical analysis]]<br />
* [[Reynolds averaged equations and the turbulence closure problem|Reynolds averaging]]<br />
|-<br />
| '''[[Algebraic turbulence models|Algebraic models]]'''<br />
|-<br />
|<br />
* [[Cebeci-Smith model]]<br />
* [[Baldwin-Lomax model]]<br />
* [[Johnson-King model]]<br />
|-<br />
| '''[[One equation turbulence models|One equation models]]'''<br />
|-<br />
|<br />
* [[Prandtl's one-equation model]]<br />
* [[Baldwin-Barth model]]<br />
* [[Spalart-Allmaras model]]<br />
|-<br />
| '''[[Two equation models]]'''<br />
|-<br />
|<br />
* [[k-epsilon models]]<br />
:[[Standard k-epsilon model]]<br />
:[[Realisable k-epsilon model]]<br />
:[[RNG k-epsilon model]]<br />
:[[Near-wall treatment for k-epsilon models|Near-wall treatment]]<br />
*[[k-omega models]]<br />
:[[Wilcox's k-omega model]]<br />
:[[Wilcox's modified k-omega model]]<br />
:[[SST k-omega model]]<br />
:[[Near-wall treatment for k-omega models|Near-wall treatment]]<br />
* [[Two equation turbulence model constraints and limiters|Contraints and limiters]]<br />
:[[Kato-Launder modification]]<br />
:[[Durbin's realizability constraint]]<br />
:[[Yap correction]]<br />
:[[Realisability and Schwarz' Inequality]<br />
|}</div>Sihttp://www.cfd-online.com/Wiki/Realisability_and_Schwarz%27_inequalityRealisability and Schwarz' inequality2007-06-12T12:32:04Z<p>Si: </p>
<hr />
<div>{{Turbulence modeling}}Realisability is the minimum requirement to prevent a turbulence model generating non-physical results. For a model to be realisable the normal Reynolds stresses must be non-negative and the Schwarz' inequality must be satisfied between fluctuating quantities:<br />
<br />
:<math><br />
\left\langle{u^'_\alpha u^'_\alpha}\right\rangle \geq 0<br />
</math><br />
<br />
:<math><br />
\frac{\left\langle{u^'_\alpha u^'_\beta}\right\rangle}{ \left\langle{u^'_\alpha u^'_\beta}\right\rangle \left\langle{u^'_\alpha u^'_\beta}\right\rangle} \leq 1<br />
</math><br />
<br />
where there is no summation over the indices. Some workers only apply the first inequality to satisfy realisability, or maintain non-negative vales of k and epsilon. This "weak" form of realisability is satisfied in non-linear models by setting <math>C_\mu=0.09</math>.<br />
<br />
==References==<br />
{{reference-paper|author=Speziale, C.G.|year=1991|title=Analytical methods for the development of Reynolds-stress closures in turbulence|rest=Ann. Rev. Fluid Mechanics, Vol. 23, pp107-157}}</div>Sihttp://www.cfd-online.com/Wiki/Turbulence_modelingTurbulence modeling2007-06-12T12:28:52Z<p>Si: </p>
<hr />
<div>Turbulence modeling is a key issue in most CFD simulations. Virtually all engineering applications are turbulent and hence require a turbulence model.<br />
<br />
==Classes of turbulence models==<br />
<br />
*Algebraic models<br />
*Eddy viscosity transport models, one and two equation models<br />
*Non-linear eddy viscosity models and algebraic stress models<br />
*Reynolds stress transport models<br />
*Detached eddy simulations and other hybrid models<br />
*Large eddy simulations<br />
*Direct numerical simulations<br />
<br />
==Content of turbulence modeling section==<br />
<br />
# [[Turbulence]] <br />
# [[Algebraic turbulence models|Algebraic models]]<br />
##[[Cebeci-Smith model]]<br />
##[[Baldwin-Lomax model]]<br />
## [[Johnson-King model]]<br />
# [[One equation turbulence models|One equation models]]<br />
## [[Prandtl's one-equation model]]<br />
## [[Baldwin-Barth model]]<br />
## [[Spalart-Allmaras model]]<br />
# [[Two equation models]]<br />
## [[k-epsilon models]]<br />
### [[Standard k-epsilon model]]<br />
### [[Realisable k-epsilon model]]<br />
### [[RNG k-epsilon model]]<br />
### [[Near-wall treatment for k-epsilon models]]<br />
## [[k-omega models]]<br />
### [[Wilcox's k-omega model]]<br />
### [[Wilcox's modified k-omega model]]<br />
### [[SST k-omega model]]<br />
### [[Near-wall treatment for k-omega models]]<br />
## [[Two equation turbulence model constraints and limiters]]<br />
### [[Kato-Launder modification]]<br />
### [[Durbin's realizability constraint]]<br />
### [[Yap correction]]<br />
### [[Realisability and Schwarz' Inequality]]<br />
# [[v2-f models]]<br />
## <math>\overline{\upsilon^2}-f</math> model<br />
## <math>\zeta-f</math> model<br />
# [[Reynolds stress model (RSM) ]]<br />
# [[Large eddy simulation (LES) ]]<br />
## [[Smagorinsky-Lilly model]]<br />
## [[Dynamic subgrid-scale model]]<br />
## [[RNG-LES model]]<br />
## [[Wall-adapting local eddy-viscosity (WALE) model]]<br />
## [[Kinetic energy subgrid-scale model]]<br />
## [[Near-wall treatment for LES models]]<br />
# [[Detached eddy simulation (DES) ]]<br />
# [[Direct numerical simulation (DNS) ]]<br />
# [[Turbulence near-wall modeling]]<br />
# [[Turbulence free-stream boundary conditions]]<br />
## [[Turbulence intensity]]<br />
## [[Turbulent length scale]]<br />
<br />
[[Category:Turbulence models]]</div>Sihttp://www.cfd-online.com/Wiki/Realisability_and_Schwarz%27_inequalityRealisability and Schwarz' inequality2007-06-12T12:27:26Z<p>Si: New page: Realisability is the minimum requirement to prevent a turbulence model generating non-physical results. For a model to be realisable the normal Reynolds stresses must be non-negative and t...</p>
<hr />
<div>Realisability is the minimum requirement to prevent a turbulence model generating non-physical results. For a model to be realisable the normal Reynolds stresses must be non-negative and the Schwarz' inequality must be satisfied between fluctuating quantities:<br />
<br />
:<math><br />
\left\langle{u^'_\alpha u^'_\alpha}\right\rangle \geq 0<br />
</math><br />
<br />
:<math><br />
\frac{\left\langle{u^'_\alpha u^'_\beta}\right\rangle}{ \left\langle{u^'_\alpha u^'_\beta}\right\rangle \left\langle{u^'_\alpha u^'_\beta}\right\rangle} \leq 1<br />
</math><br />
<br />
where there is no summation over the indices. Some workers only apply the first inequality to satisfy realisability, or maintain non-negative vales of k and epsilon. This "weak" form of realisability is satisfied in non-linear models by setting <math>C_\mu=0.09</math>.<br />
<br />
==References==<br />
{{reference-paper|author=Speziale, C.G.|year=1991|title=Analytical methods for the development of Reynolds-stress closures in turbulence|rest=Ann. Rev. Fluid Mechanics, Vol. 23, pp107-157}}</div>Sihttp://www.cfd-online.com/Wiki/RNG_k-epsilon_modelRNG k-epsilon model2007-06-12T07:42:33Z<p>Si: </p>
<hr />
<div>{| class="infobox bordered" style="vertical-align: top; text-align: left;"<br />
|+ style="background: #ccf; font-size: larger;" align="center" | '''[[Turbulence modeling]]'''<br />
|-<br />
| '''[[Turbulence]]'''<br />
|-<br />
|<br />
* [[What is turbulence%3F|Introduction]]<br />
* [[Elements of statistical analysis|Statistical analysis]]<br />
* [[Reynolds averaged equations and the turbulence closure problem|Reynolds averaging]]<br />
|-<br />
| '''[[Algebraic turbulence models|Algebraic models]]'''<br />
|-<br />
|<br />
* [[Cebeci-Smith model]]<br />
* [[Baldwin-Lomax model]]<br />
* [[Johnson-King model]]<br />
|-<br />
| '''[[One equation turbulence models|One equation models]]'''<br />
|-<br />
|<br />
* [[Prandtl's one-equation model]]<br />
* [[Baldwin-Barth model]]<br />
* [[Spalart-Allmaras model]]<br />
|-<br />
| '''[[Two equation models]]'''<br />
|-<br />
|<br />
* [[k-epsilon models]]<br />
:[[Standard k-epsilon model]]<br />
:[[Realisable k-epsilon model]]<br />
:[[RNG k-epsilon model]]<br />
:[[Near-wall treatment for k-epsilon models|Near-wall treatment]]<br />
*[[k-omega models]]<br />
:[[Wilcox's k-omega model]]<br />
:[[Wilcox's modified k-omega model]]<br />
:[[SST k-omega model]]<br />
:[[Near-wall treatment for k-omega models|Near-wall treatment]]<br />
* [[Two equation turbulence model constraints and limiters|Contraints and limiters]]<br />
:[[Kato-Launder modification]]<br />
:[[Durbin's realizability constraint]]<br />
:[[Yap correction]]<br />
|}<br />
<br />
==Background==<br />
The RNG model was developed using Re-Normalisation Group (RNG) methods by [[#References|Yakhot et al]] to renormalise the Navier-Stokes equations, to account for the effects of smaller scales of motion. In the standard k-epsilon model the eddy viscosity is determined from a single turbulence length scale, so the calculated turbulent diffusion is that which occurs only at the specified scale, whereas in reality all scales of motion will contribute to the turbulent diffusion. The RNG approach, which is a mathematical technique that can be used to derive a turbulence model similar to the k-epsilon, results in a modified form of the epsilon equation which attempts to account for the different scales of motion through changes to the production term. <br />
<br />
== Transport Equations==<br />
There are a number of ways to write the transport equations for k and <math>\epsilon</math>, a simple interpretation where bouyancy is neglected is<br />
:<math><br />
\frac{\partial}{\partial t} (\rho k) + \frac{\partial}{\partial x_i} (\rho k u_i) = \frac{\partial}{\partial x_j} \left[\left(\mu+\frac{\mu_t}{\sigma_k}\right) \frac{\partial k}{\partial x_j}\right] + P_k - \rho \epsilon <br />
</math><br />
<br />
:<math><br />
\frac{\partial}{\partial t} (\rho \epsilon) + \frac{\partial}{\partial x_i} (\rho \epsilon u_i) = \frac{\partial}{\partial x_j} \left[\left(\mu+\frac{\mu_t}{\sigma_{\epsilon}}\right) \frac{\partial \epsilon}{\partial x_j}\right] + C_{1 \epsilon}^*\frac{\epsilon}{k} P_k - C_{2\epsilon} \rho \frac{\epsilon^2}{k}<br />
</math><br />
<br />
where<br />
<math><br />
C_{1\epsilon}^* = C_{1\epsilon} - {C_\mu \eta^3 (1-\eta/\eta_0)\over 1+\beta\eta^3}<br />
</math><br />
<br />
and<br />
<math><br />
\eta = S k / \epsilon<br />
</math><br />
and<br />
<math><br />
S=2(S_{ij}S_{ij})^{1/2}<br />
</math><br />
<br />
With the turbulent viscosity being calculated in the same manner as with the standard k-epsilon model.<br />
==Constants==<br />
It is interesting to note that the values of all of the constants (except <math> \beta</math>) are derived explicitly in the RNG procedure. They are given below with the commonly used values in the standard k-epsilon equation in brackets for comparison:<br />
<br />
:<math> C_\mu=0.0845</math> (0.09)<br />
:<math> \sigma_k=0.7194</math> (1.0)<br />
:<math> \sigma_\epsilon=0.7194</math> (1.30)<br />
:<math> C_{\epsilon 1}=1.42</math> (1.44)<br />
:<math> C_{\epsilon 2}=1.68</math> (1.92)<br />
:<math> \eta_0=4.38</math> <br />
:<math> \beta=0.012</math> (derived from experiment)<br />
<br />
<br />
<br />
==Applicability and Use==<br />
Although the technique for deriving the RNG equations was quite revolutionary at the time, it's use has been more low key. Some workers claim it offers improved accuracy in rotating flows, although there are mixed results in this regard: It has shown improved results for modelling rotating cavities, but shown no improvements over the standard model for predicting vortex evolution (both these examples from individual experience). It is favoured for indoor air simulations. <br />
<br />
==References==<br />
{{reference-paper|author=Yakhot, V., Orszag, S.A., Thangam, S., Gatski, T.B. & Speziale, C.G.|year=1992|title=Development of turbulence models for shear flows by a double expansion technique|rest=Physics of Fluids A, Vol. 4, No. 7, pp1510-1520}}<br />
<br />
[[Category:Turbulence models]]</div>Sihttp://www.cfd-online.com/Wiki/Talk:RNG_k-epsilon_modelTalk:RNG k-epsilon model2007-06-11T13:42:16Z<p>Si: </p>
<hr />
<div>Hello I'm quite new in CFD<br />
<br />
I'm reading about turbulence models and y+...<br />
<br />
What does RNG mean?<br />
<br />
I know that the difference between K-epsilon and RNG k-epsilon models are the constants in the transport equations but what is the purpose to change these variables and when we used each model?<br />
<br />
<br />
Thanks<br />
<br />
:RNG means Renormalization Group Theory. It is a mathematical theory which can be used to derive a turbulence model which is similar to the k-epsilon model. When this was first done it was a kind of revolution that a mathematical theory could be used to derive this kind of turbulence model. It was done by Yakhot and Orzag. The exact formulation and constants in the RNG k-epsilon model is not the same as in the old k-epsilon models though. The RNG models have not been that much of a revolution though and they are not that frequently used today. Some people claim that for rotating flows RNG models are superior. I have tested a RNG k-epsilon model a few times and the only application where I noticed better results with it was in rotating cavities, but then it turned out to be more interesting to run transient and even DES/LES simulations. --[[User:Jola|Jola]] 03:33, 7 June 2007 (MDT)<br />
<br />
The RNG model was developed using Re-Normalisation Group (RNG) methods to renormalise the N-S equations, to account for the effects of smaller scales of motion - in the stadard k-e model the eddy viscosity is determined from a single turbulence length scale, so the calculated turbulent diffusion is that which occurs only at the specified scale, whereas in reality all scales of motion will contribute to the turbulent diffusion. The modified production of the dissipation rate attempts to account for the contribution from other scales of motion. For a reference see {{reference-paper|author=Yakhot, V., Orszag, S.A., Thangam, S., Gatski, T.B. & Speziale, C.G.|year=1992|title=Development of turbulence models for shear flows by a double expansion technique|rest=Physics of Fluids A, Vol. 4, No. 7, pp1510-1520}}. I think the RNG model gave better results for turb flow over a backward facing step - discussed in the paper. I've tried it for modelling vortex evolution which is quite tricky due to the strong rotation and didnt see any better performance than with the standard k-e model. --[[User:Si|Si]] 03:47, 7 June 2007 (MDT)<br />
<br />
::This may be a little late in coming, but isn't this (the above two paragraphs) exactly what the main article needs? Could someone reformat this and move it to the main article? Incidentally, the RNG k-epsilon model is apparently favored for indoor air simulations - just found that out recently (have a ref if there is interest). --[[User:Jasond|Jasond]] 11:00, 8 June 2007 (MDT)<br />
<br />
I've done quite a major edit to the article, using the above paragraphs and some other details I'm familiar with. I've got a few thoughts on what the turbulence modelling section should be - see the item in the discussion forum. I'm quite interested in the section that said "turbulent viscosity is modelled as" and had the following in (the section that I've taken out!)<br />
:<math><br />
d \left(\frac{\rho^2 k}{\sqrt{\epsilon \mu}} \right) = 1.72 \frac{\hat{\nu}}{\sqrt{{\hat{\nu}}^3-1+C_\nu}} d{\hat{\nu}}<br />
</math><br />
<br />
<br />
:<math><br />
\hat{\nu} = \mu_{\rm eff}/\mu <br />
</math><br />
and <br />
:<math><br />
C_\nu \approx 100<br />
</math><br />
<br />
and the <math> R_{\epsilon}</math> term as I've not seen either of those before. Anyone got any pointers?<br />
--[[User:Si|Si]] 07:42, 11 June 2007 (MDT)</div>Sihttp://www.cfd-online.com/Wiki/RNG_k-epsilon_modelRNG k-epsilon model2007-06-11T13:31:47Z<p>Si: </p>
<hr />
<div>==Background==<br />
The RNG model was developed using Re-Normalisation Group (RNG) methods by [[#References|Yakhot et al]] to renormalise the Navier-Stokes equations, to account for the effects of smaller scales of motion. In the standard k-epsilon model the eddy viscosity is determined from a single turbulence length scale, so the calculated turbulent diffusion is that which occurs only at the specified scale, whereas in reality all scales of motion will contribute to the turbulent diffusion. The RNG approach, which is a mathematical technique that can be used to derive a turbulence model similar to the k-epsilon, results in a modified form of the epsilon equation which attempts to account for the different scales of motion through changes to the production term. <br />
<br />
== Transport Equations==<br />
There are a number of ways to write the transport equations for k and <math>\epsilon</math>, a simple interpretation where bouyancy is neglected is<br />
:<math><br />
\frac{\partial}{\partial t} (\rho k) + \frac{\partial}{\partial x_i} (\rho k u_i) = \frac{\partial}{\partial x_j} \left[\left(\mu+\frac{\mu_t}{\sigma_k}\right) \frac{\partial k}{\partial x_j}\right] + P_k - \rho \epsilon <br />
</math><br />
<br />
:<math><br />
\frac{\partial}{\partial t} (\rho \epsilon) + \frac{\partial}{\partial x_i} (\rho \epsilon u_i) = \frac{\partial}{\partial x_j} \left[\left(\mu+\frac{\mu_t}{\sigma_{\epsilon}}\right) \frac{\partial \epsilon}{\partial x_j}\right] + C_{1 \epsilon}^*\frac{\epsilon}{k} P_k - C_{2\epsilon} \rho \frac{\epsilon^2}{k}<br />
</math><br />
<br />
where<br />
<math><br />
C_{1\epsilon}^* = C_{1\epsilon} - {C_\mu \eta^3 (1-\eta/\eta_0)\over 1+\beta\eta^3}<br />
</math><br />
<br />
and<br />
<math><br />
\eta = S k / \epsilon<br />
</math><br />
and<br />
<math><br />
S=2(S_{ij}S_{ij})^{1/2}<br />
</math><br />
<br />
With the turbulent viscosity being calculated in the same manner as with the standard k-epsilon model.<br />
==Constants==<br />
It is interesting to note that the values of all of the constants (except <math> \beta</math>) are derived explicitly in the RNG procedure. They are given below with the commonly used values in the standard k-epsilon equation in brackets for comparison:<br />
<br />
:<math> C_\mu=0.0845</math> (0.09)<br />
:<math> \sigma_k=0.7194</math> (1.0)<br />
:<math> \sigma_\epsilon=0.7194</math> (1.30)<br />
:<math> C_{\epsilon 1}=1.42</math> (1.44)<br />
:<math> C_{\epsilon 2}=1.68</math> (1.92)<br />
:<math> \eta_0=4.38</math> <br />
:<math> \beta=0.012</math> (derived from experiment)<br />
<br />
<br />
<br />
==Applicability and Use==<br />
Although the technique for deriving the RNG equations was quite revolutionary at the time, it's use has been more low key. Some workers claim it offers improved accuracy in rotating flows, although there are mixed results in this regard: It has shown improved results for modelling rotating cavities, but shown no improvements over the standard model for predicting vortex evolution (both these examples from individual experience). It is favoured for indoor air simulations. <br />
<br />
==References==<br />
{{reference-paper|author=Yakhot, V., Orszag, S.A., Thangam, S., Gatski, T.B. & Speziale, C.G.|year=1992|title=Development of turbulence models for shear flows by a double expansion technique|rest=Physics of Fluids A, Vol. 4, No. 7, pp1510-1520}}<br />
<br />
[[Category:Turbulence models]]</div>Sihttp://www.cfd-online.com/Wiki/User:SiUser:Si2007-06-07T15:10:28Z<p>Si: </p>
<hr />
<div>I am a Senior CFD Engineer working for Digital Flow Solutions Ltd., a CFD consultancy company based in Northants, England. I have worked in the CFD industry for 3 years after completing a PhD in the field.</div>Sihttp://www.cfd-online.com/Wiki/Talk:RNG_k-epsilon_modelTalk:RNG k-epsilon model2007-06-07T09:47:04Z<p>Si: </p>
<hr />
<div>Hello I'm quite new in CFD<br />
<br />
I'm reading about turbulence models and y+...<br />
<br />
What does RNG mean?<br />
<br />
I know that the difference between K-epsilon and RNG k-epsilon models are the constants in the transport equations but what is the purpose to change these variables and when we used each model?<br />
<br />
<br />
Thanks<br />
<br />
:RNG means Renormalization Group Theory. It is a mathematical theory which can be used to derive a turbulence model which is similar to the k-epsilon model. When this was first done it was a kind of revolution that a mathematical theory could be used to derive this kind of turbulence model. It was done by Yakhot and Orzag. The exact formulation and constants in the RNG k-epsilon model is not the same as in the old k-epsilon models though. The RNG models have not been that much of a revolution though and they are not that frequently used today. Some people claim that for rotating flows RNG models are superior. I have tested a RNG k-epsilon model a few times and the only application where I noticed better results with it was in rotating cavities, but then it turned out to be more interesting to run transient and even DES/LES simulations. --[[User:Jola|Jola]] 03:33, 7 June 2007 (MDT)<br />
<br />
The RNG model was developed using Re-Normalisation Group (RNG) methods to renormalise the N-S equations, to account for the effects of smaller scales of motion - in the stadard k-e model the eddy viscosity is determined from a single turbulence length scale, so the calculated turbulent diffusion is that which occurs only at the specified scale, whereas in reality all scales of motion will contribute to the turbulent diffusion. The modified production of the dissipation rate attempts to account for the contribution from other scales of motion. For a reference see {{reference-paper|author=Yakhot, V., Orszag, S.A., Thangam, S., Gatski, T.B. & Speziale, C.G.|year=1992|title=Development of turbulence models for shear flows by a double expansion technique|rest=Physics of Fluids A, Vol. 4, No. 7, pp1510-1520}}. I think the RNG model gave better results for turb flow over a backward facing step - discussed in the paper. I've tried it for modelling vortex evolution which is quite tricky due to the strong rotation and didnt see any better performance than with the standard k-e model. --[[User:Si|Si]] 03:47, 7 June 2007 (MDT)</div>Sihttp://www.cfd-online.com/Wiki/CFD-Wiki:Community_portalCFD-Wiki:Community portal2007-06-05T16:57:22Z<p>Si: /* CFD-Wikians - Who we are */</p>
<hr />
<div>This section is intended for people who work on adding content to the Wiki. So fellow CFD-Wikians, this is your page, private hideout, coffee room, coordination center, after-hours bar or whatever you want to use it for. If you still haven't contributed to the Wiki [[CFD-Wiki:Contribute something today|please do so today]]! We need your help and everyone is welcome to join our team of Wiki authors. <br />
<br />
==What's in the works==<br />
<br />
You who do significant additions to the Wiki, please add some information about your work, plans and progress here so that others can see what you are working on and perhaps help, monitor, come with suggestions and most importantly, be inspired by.<br />
<br />
* On May 21, 2007 we sent out a marketing email to all users of CFD Online. Hopefully this will make CFD-Wiki more well known and increase the number of additions --[[User:Jola|Jola]] 07:32, 21 May 2007 (MDT) <br />
== What needs to be done ==<br />
<br />
''Anything that you want!'' Be bold and just pick something that you feel that you can improve! If you need some help with good ideas on things to work on here are a few suggestions:<br />
<br />
* We have many turbulence models listed in the [[turbulence modeling]] section which still lack any description. Feel free to pick a model that you are familiar with and write a description of it. --[[User:Jola|Jola]] 01:50, 13 September 2005 (MDT)<br />
<br />
* The [[FAQ's | FAQ]] section is still very thin. If you are familiar with one of the larger CFD codes please consider adding a few questions and answers to the FAQ. --[[User:Jola|Jola]] 08:28, 13 September 2005 (MDT)<br />
<br />
* If you are an experienced CFD engineer and an expert in a special application area you are very welcome to start a [[Best practise guidelines|best practise guideline]] for your speciality. --[[User:Jola|Jola]] 10:44, 18 September 2005 (MDT)<br />
<br />
* ''... add your suggestions on what should be done here''<br />
<br />
* As commercial CFD codes become more and more capable, CFD design agencies are more and more pressed to reconsider the cost vs. benefit of developing and maintaing in house codes. I have had many conversations on this topic with other CFD managers and practitioners - there is a lot to think about: We should have a discussion forum on this topic.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
==Other resources of interest==<br />
<br />
Here are a few links to pages that are of special interest for us CFD-Wikians:<br />
<br />
*[http://www.cfd-online.com/Forum/wiki.cgi Wiki Discussion Forum]<br />
*[[CFD-Wiki:FAQ| CFD-Wiki FAQ]]<br />
<br />
== CFD-Wikians - Who we are ==<br />
<br />
Add your name here if you make contributions to the wiki. The order is alphabetical based on the last name.<br />
<br />
* [[User:ABeevers]] - Adam Beevers<br />
* [[User:praveen]] - Praveen. C<br />
* [[User:Ben]] - Ben D.<br />
* [[User:Aerodeepak]] - Deepak Thirumurthy<br />
* [[User:jasond]] - Jason D.<br />
* [[User:Pavitran]] - Pavitran. D<br />
* [[User:ForMat]] - Matej Forman<br />
* [[User:ganesh]] - Ganesh N<br />
* [[User:harish]] - Harish Gopalan<br />
* [[User:Si]] - Simon Hubbard<br />
* [[User:Michail]] - Michail Kirichkov<br />
* [[User:Discoganya]] - Sujit Kirpekar<br />
* [[User:Robkunz]] - Rob Kunz<br />
* [[User:kiranc]] - Kiran Chutkey<br />
* [[User:jola]] - Jonas Larsson<br />
* [[User:mirzapopovac]] - Mirza Popovac<br />
* [[User:bajjal]] - Bajjal Raghavendra<br />
* [[User:anurag]] - Anurag Sharma<br />
* [[User:Suneesh]] - Suneesh S.S.<br />
* [[User:snegan]] - Suriyanarayanan P<br />
* [[User:zxaar]] - Arjun Yadav<br />
* [[User:Toschi]] - Federico Toschi<br />
* [[User:Tsaad]] - [http://jedi.knows.it Tony Saad]<br />
* [[user:Sachinshendge]] - Sachin Shendge<br />
* [[User:s2vivek]] - vivekanandu.sakilam<br />
* [[User:Anand]] - www.iitm.ac.in<br />
* [[User:prokol]] - www.my-area.net</div>Sihttp://www.cfd-online.com/Wiki/CFD-Wiki:Community_portalCFD-Wiki:Community portal2007-06-05T16:56:40Z<p>Si: /* CFD-Wikians - Who we are */</p>
<hr />
<div>This section is intended for people who work on adding content to the Wiki. So fellow CFD-Wikians, this is your page, private hideout, coffee room, coordination center, after-hours bar or whatever you want to use it for. If you still haven't contributed to the Wiki [[CFD-Wiki:Contribute something today|please do so today]]! We need your help and everyone is welcome to join our team of Wiki authors. <br />
<br />
==What's in the works==<br />
<br />
You who do significant additions to the Wiki, please add some information about your work, plans and progress here so that others can see what you are working on and perhaps help, monitor, come with suggestions and most importantly, be inspired by.<br />
<br />
* On May 21, 2007 we sent out a marketing email to all users of CFD Online. Hopefully this will make CFD-Wiki more well known and increase the number of additions --[[User:Jola|Jola]] 07:32, 21 May 2007 (MDT) <br />
== What needs to be done ==<br />
<br />
''Anything that you want!'' Be bold and just pick something that you feel that you can improve! If you need some help with good ideas on things to work on here are a few suggestions:<br />
<br />
* We have many turbulence models listed in the [[turbulence modeling]] section which still lack any description. Feel free to pick a model that you are familiar with and write a description of it. --[[User:Jola|Jola]] 01:50, 13 September 2005 (MDT)<br />
<br />
* The [[FAQ's | FAQ]] section is still very thin. If you are familiar with one of the larger CFD codes please consider adding a few questions and answers to the FAQ. --[[User:Jola|Jola]] 08:28, 13 September 2005 (MDT)<br />
<br />
* If you are an experienced CFD engineer and an expert in a special application area you are very welcome to start a [[Best practise guidelines|best practise guideline]] for your speciality. --[[User:Jola|Jola]] 10:44, 18 September 2005 (MDT)<br />
<br />
* ''... add your suggestions on what should be done here''<br />
<br />
* As commercial CFD codes become more and more capable, CFD design agencies are more and more pressed to reconsider the cost vs. benefit of developing and maintaing in house codes. I have had many conversations on this topic with other CFD managers and practitioners - there is a lot to think about: We should have a discussion forum on this topic.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
==Other resources of interest==<br />
<br />
Here are a few links to pages that are of special interest for us CFD-Wikians:<br />
<br />
*[http://www.cfd-online.com/Forum/wiki.cgi Wiki Discussion Forum]<br />
*[[CFD-Wiki:FAQ| CFD-Wiki FAQ]]<br />
<br />
== CFD-Wikians - Who we are ==<br />
<br />
Add your name here if you make contributions to the wiki. The order is alphabetical based on the last name.<br />
<br />
* [[User:ABeevers]] - Adam Beevers<br />
* [[User:praveen]] - Praveen. C<br />
* [[User:Ben]] - Ben D.<br />
* [[User:Aerodeepak]] - Deepak Thirumurthy<br />
* [[User:jasond]] - Jason D.<br />
* [[User:Pavitran]] - Pavitran. D<br />
* [[User:ForMat]] - Matej Forman<br />
* [[User:ganesh]] - Ganesh N<br />
* [[User:harish]] - Harish Gopalan<br />
* [[User:Michail]] - Michail Kirichkov<br />
* [[User:Discoganya]] - Sujit Kirpekar<br />
* [[User:Robkunz]] - Rob Kunz<br />
* [[User:kiranc]] - Kiran Chutkey<br />
* [[User:jola]] - Jonas Larsson<br />
* [[User:mirzapopovac]] - Mirza Popovac<br />
* [[User:bajjal]] - Bajjal Raghavendra<br />
* [[User:anurag]] - Anurag Sharma<br />
* [[User:Suneesh]] - Suneesh S.S.<br />
* [[User:snegan]] - Suriyanarayanan P<br />
* [[User:zxaar]] - Arjun Yadav<br />
* [[User:Toschi]] - Federico Toschi<br />
* [[User:Tsaad]] - [http://jedi.knows.it Tony Saad]<br />
* [[user:Sachinshendge]] - Sachin Shendge<br />
* [[User:s2vivek]] - vivekanandu.sakilam<br />
* [[User:Anand]] - www.iitm.ac.in<br />
* [[User:prokol]] - www.my-area.net<br />
* [[User:Si]] - Simon Hubbard</div>Sihttp://www.cfd-online.com/Wiki/User:SiUser:Si2007-06-05T16:54:38Z<p>Si: New page: I am a Senior CFD Engineer working for Digital Flow Solutions Ltd., a CFD consultancy company based in Northants, England. I have worked in CFD industry for 3 years after completing a PhD ...</p>
<hr />
<div>I am a Senior CFD Engineer working for Digital Flow Solutions Ltd., a CFD consultancy company based in Northants, England. I have worked in CFD industry for 3 years after completing a PhD in the field.</div>Sihttp://www.cfd-online.com/Wiki/Fluent_FAQFluent FAQ2007-06-05T16:46:04Z<p>Si: /* How can I determine the inputs for a porous media or porous jump from flow versus pressure drop data? */</p>
<hr />
<div>This section is empty. This is just a suggestion on how to structure it. Please feel free to add questions and answers here!<br />
<br />
== Information ==<br />
<br />
=== Learning Material ===<br />
<br />
====How can I learn Fluent and Gambit?====<br />
<br />
The documentation provided by Fluent is actually quite good, so it is a very good place to start. Fluent also provides tutorials and documentation<br />
on the [http://www.fluentusers.com fluentusers] site, which is open to everyone with a<br />
(full) license. Without a full commercial license, it is possible to use the tutorials given at [http://www.studentfluent.com/ studentfluent], or you may be able to register to use the user services center through other channels (e.g. through the university program). There are also some good tutorials available at [http://instruct1.cit.cornell.edu/courses/fluent/index.htm Cornell].<br />
<br />
== FLUENT ==<br />
=== Solver Related ===<br />
==== What does "floating point error" mean? How can I avoid it? ====<br />
<br />
The floating point error has been reported many times and discussed a lot. Here are some of the answers found in the Fluent Forum:<br />
<br />
From numerical computation view point , the basic operations performed by computer are represented inside computer in what is called floating point numbers. The errors that are either because of invalid numeric computation initiated by user or limitation of machine that is used are floating point errors.<br />
<br />
1)Invalid Operations:- Simplest example is if one uses Newton Raphson root finding method to solve f(x)=0 and for some Nth iteration if we get x = x(N) such that derivative of function f(x), f'(x(N))=0 then formula for calculating next iterate x(N+1) = x(N) - f(x(N))/f'(x(N)) requires division by f'(x(N)) which is zero. Here you get divide by zero type of floating point error.<br />
<br />
2) Over or Underflow:- Another type is having data with either too large or too small magnitude called 'overflow' or 'underflow' respectively.Such data cannot be physically represented on computer for direct processing by arithmetic processing part of Processor. <br />
<br />
3) Rounding off errors :- While rounding off a decimal number , some significant digits are lost which cannot be recovered .<br />
e.g. if we round off 0.1 to integer (not greater than it called 'floor' of the given no.) then it is zero. If this value if further used for computation then it may lead to several errors.<br />
<br />
'''SOLVER AND ITERATION''' -----I think if you set shorter time step, it may be good. Or changing little Under-Relaxiation-Factors, it may be good. In my experience, I set 1/3 Under-Relaxiation-Factors as default.� -----�also lower the values of under relaxation factor and use the coupled implicit solver� -----�Try to change under-relaxation factors and if it is unsteady problem maybe time step is to large.� -----�you can improve the ratio in the solve--control--limits, maybe that can help.� -----�you will need to decrease the Courant number� -----�If you still get the error, initialize the domain with nothing to 'Compute from...' Then click 'init'. Again select the surface from which you want to compute the initial values & iterate. This should work.� -----�Another reason could be a to high courant number - that means, that the steps between two iterations are too large and the change in the results is too large as well (high residuals)�<br />
<br />
'''GRID PROBLEMS''' -----�this error comes when I start scaling grid. in gambit, all my dimension is in mm, when in fluent i convert it in meter using buttone SCALE. after it, when i iterate, about hundred iteration, this error appeared. but when i not scale my drawing to m...and let it be as in gambit..then the iteration is success. -----�hi I think you should check your mesh grid mesh is very high. your problem solve by selection a low mesh.� -----�Your mesh is so heavy that your computers resources are not enough. try to use coarser mesh.�<br />
<br />
'''BOUNDARY CONDITIONS''' -----�In my case I had set a wall boundary condition instead of an axis boundary condition and then FLuent refuses to calculate telling me 'floating point error'.� -----�Your Boudary Conditions do not represent real physis.� -----�wrong boundary condition definition might cause the floating point error. For example setting an internal boundary as interior� -----�Once I had the problem, simulating a 2D chamber with a symmetry BC. I set the symmetry somewhere as �axe symmetric� and the floating point error occur� -----�check the turbulence parameter you set. reduce the turbulence intensity to less that one for first, say 50 iterations.<br />
<br />
'''MULTI PROCESSOR ISSUES''' -----"I've had similar problems recently with floating point errors on a multi processor simulation. The solution for my problem seems to be to run on a single processor, where it runs fine....?�<br />
<br />
'''WRONG INITIATION''' ----- Initiating the case with wrong conditions may lead to floating point error when the iterations start.<br />
<br />
==== What is the difference between the coupled and the segregated solver? ====<br />
In the latest Fluent release,6.3.26 these are referred as density based and pressure based solvers.<br />
<br />
The coupled solver will solve all equations (conservation equations for mass, momentum and energy) simultaneously instead of sequentially (the equations are segregated from one another). You should use the coupled solver when the velocity and pressure are strongly coupled (high pressures and high velocities), but very long calculation times may be required when you use the coupled solver.<br />
<br />
In the coupled solvers, the Species Diffusion Term is always included in the energy equation.<br />
<br />
When you use the segregated solver, FLUENT allows you to specify anisotropic conductivity for solid materials<br />
<br />
From the [http://www.cfd-online.com/Forum/fluent_archive.cgi?read=40127 Fluent forum]:<br />
<br />
Choice of solvers depends heavily on the model being solved. The segregated solver solution is based on the pressure, while the coupled solver solution is based on density. This makes the segregated solver better at low speed flows and the coupled solver better at solving transonic / supersonic cases. I wouldn't recommend the coupled solver at any flows below Mach .4 (until the pressure based coupled solver comes out in the next release of Fluent). I've used the Segregated solver up to Mach 1.5 with great results, but the higher speed, the more mesh dependent you become (because the segregated solver tends to "smooth out" shocks), so you have to pay a lot of attention to your meshing.<br />
<br />
The coupled solver tends to be more stable with the defaults settings. The segregated solver tends to be very sensitive to the allowable limits. When trying to get a solution with the segregated solver, DO NOT increase the turbulent viscosity ratio limit (unless you have a great reason to based on past experience or the physics of your current model truly exceeding that limit, but I've never even heard of that being realistic). Instead limit the pressure and temperature limits to reasonable limits (i.e. Plimits = Pstatic +/- (2 * dynamic pressure), and calculate the appropriate temps). You need to give the solution "room to move" while it reaches a solution, but you don't want to give it enough room where it goes out to some totally impossible numbers, and the limits help prevent this.<br />
<br />
=== Model Related ===<br />
==== What is the turbulent viscosity ratio warning and how can I handle it? ====<br />
The problem can be caused by improper values for the boundary condition turbulence parameters. Check the fluent manual (which is kind of more like a textbook), about modeling turbulence.<br />
<br />
For the case of internal flow, you basically have to consider the physical state of the fluid upon entrance to your control volume. If the fluid is coming into your volume from a fully developed turbulent pipe flow, it will have more turbulent energy than from a stagnant fluid. Think of lots of little vortices, which mostly mix things up, and those all have kinetic energy associated). This energy can be expressed as a nondimensional Intensity (a percentage is used). In addition, a Length parameter is specified.<br />
<br />
==== How can I determine the inputs for a porous media or porous jump from flow versus pressure drop data? ====<br />
If you have pressure drop versus velocity data, you can fit the following equation through the data:<br />
<br />
<math>\Delta P = Av^2 + Bv</math><br />
<br />
where <math>\Delta P</math> is the pressure drop and <math>v</math> is the velocity. The coefficients <math>A</math> and <math>B</math> are related to the Fluent variables for the permeability <math>\alpha</math>, and the pressure coefficient <math>C_2</math> by<br />
<br />
<math>A = \frac{C_2 \rho \Delta n}{2}</math> and <math>B=\frac{\mu}{\alpha}\Delta n</math><br />
<br />
where <math>\Delta n</math> is the thicknes of the medium.<br />
<br />
==== How do I model heat conduction in a composite wall? ====<br />
<br />
==== What pressures should be specified at inlets and outlets for buoyancy flow problems? ====<br />
<br />
what pressures at inlet and outlet should specified in natural convection?<br />
<br />
==== Are there any general guidelines on selecting a turbulence model? ====<br />
<br />
==== How can both turbulent and laminar flow be included in one model? ====<br />
<br />
Depends. Fluent cannot presently compute boundary layer instability and subsequent transition to turbulence using a RANS approach (ke, SST, RSM etc). CFX has a new feature to do this, so perhaps it will be incorporated into Fluent soon as they are both owned by ANSYS.<br />
<br />
You therefore have two options : <br />
<br />
1. If you know the point of transition (like on an aircraft wing) from experimental data or DNS simulations, you can impose laminar flow in some regions by meshing a separate fluid region, and enabling "laminar zone" for this region in boundary settings. That is also useful in heat transfer cases, if for example you have turbulent flow one side of a thermal wall, and natural convection on the other side.<br />
<br />
2. A "near-wall" turbulence approach : Either k-omega, SST, or Low Reynolds k-E (which you have to select from the "Turbulence modelling/expert" menu), will damp turbulence near to the wall, either by empirical damping of turbulent "k" (Low Reynolds k-E) or by full solution of the omega equation on a fine enough mesh (k-omega/SST). If you have flows in small gaps in a larger, turbulent domain, in which large lengthscales of turbulence of course could not be supported, the flow will re-laminarise in a physically sensible (although perhaps not mathematically exact) manner. These models will also MAINTAIN laminar flow in external boundary layers, PROVIDED that you have a fine enough mesh (use the laminar mesh distribution guidelines in Fluent manual, too coarse a mesh will lead to non-physical turbulence generation in the BL). BUT they will maintain this laminar flow and evolution of the laminar profile (in the absence of significant disturbance by separation or impingement at the wall) forever, no spontaneous instability or transition to turbulence will occur. So check the length-based Reynolds numbers of walls where you think there will be undisturbed laminar boundaries, that there is not expected to be spontaneous transition of these BLs.<br />
<br />
==== How to start a 3D simulation with an compressible medium and temperature changes? What is important to consider ====<br />
<br />
<br />
I would do it that way:<br />
<br />
1. solve the flow for incompressible medium, without energy equation. Set the density close to the density, that you expect at the present pressure and temperature. The solution for the flow dosn't has to be completely convergent, but the residuals should be on the way down. <br />
<br />
2. Apply energy equation and compressibility of the gas and set the present pressure with operating condition option. You might do some iteration steps as well. Sometimes they are not necessary<br />
<br />
3. Apply the thermal BC<br />
<br />
=== Solution Methodology === <br />
==== How do I carry out rotating body analysis, eg a rotating sphere or cylinder''' in flo'''w? ====<br />
Rotating cylinder problem ( assume circular ), can be done easily by specifying angular velocity on the cylinder wall. As i observed no need of moving mesh for this case. you need to specify the rotation axis with respect to which your cylinder is rotating.<br />
<br />
==== How do I get better and faster convergence? ====<br />
==== What is the role of under-relaxation parameters? What should be the optimum choice of these parameters? ====<br />
They limit the influence of the previous iteration over the present one. If you choose small values it may prevent oscillations in residuum developing. At the same time the solution may need more time to converge. <br />
Keep the default values as they are given in FLUENT. You can decrease them gradually if necessary. Momentum 0.6, pressure 0.1, k 0.4, eps 0.4, mass source 1, viscosity 1.<br />
<br />
=== User-Defined Function (UDF) Related ===<br />
<br />
==== How do I learn UDF programming? ====<br />
There are not to many tutorials out there on this, probably due to the wide variety of things you can do with the UDF interface. The documentation the Fluent provides is pretty good once you know what you are trying to do (chapter 8 of the UDF manual has examples). UDF programming is easier if you have C programming experience, so it is advisable to learn a little C programming, then do some of the simple cases that Fluent provides, then tackle the problem you really want to solve. <br />
<br />
==== How do I create/build/load a UDF? ====<br />
The simplest way to add a UDF into Fluent is to write your UDF in the C programming language and then use Define -> User-Defined -> Functions to either interpret or compile your UDF. It can then be loaded. Fluent provides good documentation of the UDF interface with numerous examples, so read that before trying too much.<br />
<br />
==== Do I have to use C? ====<br />
Yes and no. To hook your UDF into Fluent, you'll probably have to use one of the DEFINE_* macros that Fluent provides, and this is most easily done using C. However, you can write routines that are used in the routines that are defined with the DEFINE_* macros in other languages and then link them together. This requires some knowledge of mixed language programming, Makefiles, the text user interface (TUI), and is not necessarily very portable.<br />
<br />
==== Which compilers work? ====<br />
On Unix-like machines, GCC is the compiler of choice. On Windows machines, Microsoft Visual C++ is the compiler of choice (GCC may also work on Windows- if anyone has firsthand knowledge of this, please share). The free Express Edition of the Microsoft compiler also works.<br />
<br />
==== My UDF won't interpret or compile - what is wrong? ====<br />
The answer depends upon what exactly has happened. <br />
<br />
*If Fluent complains about not being able to find a compiler, then check to make sure that the compiler is properly installed. On Windows machines, it is possible to install the Visual C++ compiler without fully setting up the command line compiler (which Fluent needs to be able to find). In this case, you are likely to see complaints about things being "not recognized as an internal or external command, operable program or batch file" or missing DLL's. It is theoretically possible to fix this issue by setting the appropriate environment variables, but keep in mind that even when nmake can be found there still may be DLL issues. The easy path is probably reinstallation of Visual Studio (taking special care to make sure that the command line interface is set up properly), but the reinstallation path is always perilous. If you have long-term experience using Windows you should probably know the risks, and if you don't you should consult a (local) expert.<br />
<br />
*If you are interpreting, keep in mind that not everything that is supported for compiled UDF's is supported for interpreted UDF's. This is true both for the UDF interface and the C language. If you are doing something pretty involved and it fails inexplicably, try compiling to see if that makes a difference.<br />
<br />
*There is also the possibility of coding errors. Keep in mind that your source code gets run through the C preprocessor (to change the Fluent macros into C code), so unintended interactions are very possible. <br />
<br />
==== Why do I get the message "'nmake' is not recognized as an internal or external command, operable program or batch file"? ====<br />
This is a Windows/Visual Studio issue. In order to compile your UDF, Fluent needs to know where the nmake program is located, and it currently can't find it. If you open up a command window and enter "nmake", you should probably get the same message. See the previous question/answer.<br />
<br />
==== My UDF interprets/compiles but fails to execute - what is wrong? ====<br />
This commonly occurs due to a faulty operation of some kind. For example, user-defined memory (UDM) is not allocated until initialization, so attempting to access a UDM variable before initialization can lead to a segmentation fault. Try to isolate the cause, and then look for places where your expectation of what is available may not match reality. Finally, keep in mind that if you do something really bad, you may need to restart Fluent before even a fixed UDF will work.<br />
<br />
=== Journal File and Text User Interface (TUI) Related ===<br />
==== What is the Text User Interface? ====<br />
The Text User Interface (TUI) is a command-line-like interface to Fluent. The TUI is accessed through the main Fluent (hit enter while in the main Fluent window), with a menu system and the ability to execute Scheme programs. Fluent's documentation compares the menu system to the UNIX directory structure. Since it is text base, you can create and modify sequences of TUI commands using a simple text editor (see journal files below).<br />
<br />
When Fluent starts, you are in the "root" menu: press enter and you'll see something like this:<br />
<pre><br />
><br />
adapt/ file/ report/<br />
define/ grid/ solve/<br />
display/ parallel/ surface/<br />
exit plot/ view/<br />
</pre><br />
To access the plot menu, just type in "plot" and then press enter. To bring up the available commands, press enter again:<br />
<pre><br />
> plot<br />
<br />
/plot> <br />
change-fft-ref-pressure file-set/ residuals<br />
circum-avg-axial flamelet-curves residuals-set/<br />
circum-avg-radial histogram solution<br />
fft histogram-set/ solution-set/<br />
file plot<br />
file-list plot-direction<br />
</pre><br />
<br />
To exit a menu, simply type "q" and press enter (the rough equivalent of "cd .." in Unix). The TUI also understands command abreviations, so "pl/rs" is interpreted as "plot/residuals-set".<br />
<br />
==== What is a journal file? ====<br />
A journal file is a series of TUI commands stored in a text file. The file can be written in a text editor or generated by Fluent as a transcript of the commands given to Fluent during your session. A journal file generated by Fluent will include any GUI operations (in a TUI form, though). This is quite useful if you have a series of tasks that you need to execute, as it provides a shortcut. To record a journal file, start recording with File -> Write -> Start Journal..., perform whatever tasks you need, and then stop recording with File -> Write -> Stop Journal...<br />
<br />
==== How do I add a comment in a journal file? ====<br />
Any line beginning with a ''';''' (semicolon) is treated as a comment.<br />
<br />
==== How do I set boundary conditions? ====<br />
Suppose we have a boundary named "south" that we want to set as a wall. The command is<br />
<pre><br />
/define/boundary-conditions/zone-type south wall<br />
</pre><br />
which sets the zone "south" as a wall. The details (moving wall, etc.) can then be accessed be executing<br />
<pre><br />
/define/boundary-conditions/wall south<br />
</pre><br />
in the text user interface.<br />
<br />
==== How do I write a XY-plot? ====<br />
look at<br />
http://www.cfd-online.com/Forum/fluent_archive.cgi?read=40200<br />
<br />
==== How do I set material properties? ====<br />
look at http://www.cfd-online.com/Forum/fluent_archive.cgi?read=38768<br />
<br />
one example:<br />
<br />
<pre><br />
//define/materials/delete<br />
air_50c<br />
//define/materials/delete<br />
air_1bar<br />
//define/materials/change-create<br />
air<br />
air_1bar<br />
y<br />
incompressible-ideal-gas<br />
y<br />
piecewise-linear<br />
2<br />
298.15<br />
1007<br />
323.15<br />
1008<br />
y<br />
piecewise-linear<br />
2<br />
298.15<br />
0.02606<br />
323.15<br />
0.02788<br />
y<br />
piecewise-linear<br />
2<br />
273.15<br />
1.72E-05<br />
433.15<br />
2.45E-05<br />
n<br />
n<br />
n<br />
n<br />
n<br />
n<br />
y<br />
</pre><br />
<br />
==== How do I generate a hardcopy of a window? ====<br />
<br />
<pre><br />
display set-window 1 ; if window nr. 1 is the window you want to be hardcopied<br />
//display/set/windows/scale/form ; setting the options for the graph (colourmap)<br />
"%0.2f"<br />
//display/set/color-ramp<br />
bgr<br />
//display/set/hardcopy/color ; setting the options for the window<<br />
color<br />
//display/set/hardcopy/driver<br />
tiff<br />
//display/set/hardcopy/y-res<br />
2400<br />
//display/set/hardcopy/x-res<br />
3106<br />
//display/set/hardcopy/inv<br />
no<br />
//display/hard<br />
filename.tiff<br />
//display/set/hardcopy/inv<br />
yes<br />
//display/hard<br />
filename_inv.tiff<br />
</pre><br />
<br />
==== How do I run multiple cases in batch mode? ====<br />
This could be achieved by running it from journal file. The example journal file that runs two cases is given as:<br />
<pre><br />
file read-case-data xxx1.cas<br />
solve dual-time-iterate yyy1<br />
file write-case-data zzz1.cas<br />
file read-case-data xxx2.cas<br />
yes ; for discard cas dialog<br />
solve dual-time-iterate yyy2<br />
file write-case-data zzz2.cas<br />
</pre><br />
<br />
<br />
Another example:<br />
<pre><br />
rcd filemname.cas<br />
yes<br />
it 10000 <br />
wcd filemname.cas <br />
yes<br />
</pre><br />
<br />
<br />
Have a look at this discussion: [http://www.cfd-online.com/Forum/fluent_archive_2005.cgi/read/32615 http://www.cfd-online.com/Forum/fluent_archive_2005.cgi/read/32615]<br />
<br />
==== How do I loop in a journal file? ====<br />
The best way to loop in a journal file (or the text user interface) is to use one of the Scheme programming language's looping constructs.<br />
<br />
=== Tips === <br />
==== How do I merge two mesh files into one mesh file? ====<br />
To merge two mesh files the suggested utility is tmerge. The syntax of tmerge is simple.<br><br />
<i>utility tmerge -3d file1 file2 finalfile </i> <br><br />
To join the two interior faces use: <br><br />
<i>Grid->Fuse</i> <br><br />
from the menu with Fluent.<br />
<br />
==== How do I export Fieldview data for postprocessing during iterations? ====<br />
<br />
This could be done with the help of menu <b>solve->Execute Commands </b>. <br />
Here are two examples:<br />
<br />
'''Steady Case'''<br />
<br />
<pre><br />
file/export/fug/File_grid-%n<br />
file/export/fud/File_data-%n pressure velocity-magnitude x-velocity y-velocity z-velocity () </pre><br />
<br />
'''Unsteady Case'''<br />
<br />
<pre><br />
file/export/fug/File_grid-%t<br />
file/export/fud/File_data-%t pressure velocity-magnitude x-velocity y-velocity z-velocity () </pre><br />
<br />
You can chose the frequency of export from the <b>Execute Command</b> panel.<br />
<br />
==== What does abbreviation X mean?====<br />
<br />
{| border="1"<br />
|- <br />
| APG || adverse pressure gradient<br />
|- <br />
| BC || Boundary Conditions<br />
|- <br />
| B-L || Boundary Layer<br />
|-<br />
| CFD || Computational Fluid Dynamics<br />
|-<br />
| DES || Detached Eddy Simulation<br />
|-<br />
| DPM || Discrete Phase Model<br />
|-<br />
| FDM || Finite Difference Method<br />
|-<br />
| FEM || Finite Element Method<br />
|-<br />
| FVM || Finite Volume Method<br />
|-<br />
| GUI || Graphical User Interface<br />
|-<br />
| LES || Large Eddy Simulation<br />
|-<br />
| MUSCL || Monotone Upstream-centered Scheme for Conservation Laws<br />
|-<br />
| PDF || Probability Density Function<br />
|-<br />
| QUICK || Quadratic Upstream Interpolation for Convective Kinematics<br />
|-<br />
| RANS || Reynolds Averaged Navier-Stokes<br />
|-<br />
| RSM || Reynolds Stress Model<br />
|-<br />
| SIMPLE || Semi-Implicit Method for the Pressure-Linked Equation<br />
|-<br />
| SST || Shear Stress Transport<br />
|-<br />
| TUI || Text User Interface<br />
|-<br />
| UDF || User defined function<br />
|-<br />
| URF || Under Relaxation Factor<br />
|-<br />
| VOF || Volume Of Fluid<br />
|}<br />
<br />
==== What is the difference between FE and FV?====<br />
<br />
See the answer in the [[General CFD FAQ#What is the difference between FEM, FVM and FDM?|General CFD FAQ]].<br />
<br />
== FloWizard==<br />
<br />
== FIDAP==<br />
<br />
== POLYFLOW ==<br />
<br />
== Gambit ==<br />
===Why does Gambit refuse to open my .dbs file and say that my file is already open? I get an error message - ERROR: IDENTIFIER "X" CURRENTLY OPEN.===<br />
Before opening your file "X.dbs", Gambit looks for a file named "X.lok" to determine the status of your file. If it finds the .lok file, you'll get the above error message (or something like it). If you are in a multi-user environment, you should check that it is not actually already open elsewhere, but in other situations the most likely reason that there is still a X.lok file is that Gambit encountered a problem the last time X.dbs was open. Deleting the .lok file should solve your problem.<br />
<br />
===Q: Why does Gambit complain about the number of nodes on edges being odd and then refuse to mesh a face?===<br />
<br />
A: It is mathematically impossible to create an all-quad mesh with an odd number of intervals on the outer edge loop. If this is inconvenient for you, you may consider a quad-dominant mesh (mostly quads, with a few triangles), or even an all-triangle mesh. Many users achieved good solutions with triangle surface meshes and prism (wedge) boundary layers.<br />
<br />
===Q: What are these boundary layers things defined in Gambit? Do they represent the real situation?===<br />
<br />
A: Gambit's boundary layers allow you to generate specific semi-structured grids topologies on faces that grow out from an edge or edges. You can specify the initial cell height, the growth rate, and a transition pattern that changes the edge-parallel interval count. There are several default settings, which can affect the quality of boundary layers. For cases with sharp corners, normal and offset smoothing can greatly improve quality. Such smoothing is off by default because it requires significantly more computation time.<br />
<br />
===Q: If my quad face mesh has cells with high skewness or large aspect ratios, the pyramiding procedure used by the tet mesher will frequently lead to failure, why? ===<br />
<br />
A: This is because the triangles on the tops of the pyramids have very high skewnesses which can prevent tet meshing. Consider a quad face with a 10-to-1 aspect ratio. Connect opposite corners to create diagonals. This is the "top view" of the pyramid that would be created on this face. The triangles are very highly skewed. It is recommended that your quad faces bounding a region to be tet-meshed have aspect ratios of 5-to-1 or lower.<br />
<br />
===Q: I'm trying to mesh a geometry but I'm getting this message: “check the skewnesses of you face meshes and make sure the face mesh sizes are not too large in areas of small gaps.” I checked the skewness and it's low enough. ===<br />
<br />
A: Your problem is most likely that you have small gaps where the local surface mesh sizes are much larger than the gap sizes. Refining the surface meshes in those areas is likely to solve the problem.<br />
<br />
===Q: I would like to generate grids for different zones using Gambit. How do I merge them together using Gambit or Tgrid later?===<br />
<br />
A: For a valid conformal mesh, mesh nodes on the faces at the interface of the two parts have to be matching within a tolerance. Then, you can either merge the nodes (using Tgrid) or fuse the zones (using Fluent). If you use Tgrid to merge the duplicate nodes, the resulting surface at the interface will have the boundary type as "wall" which should be changed to "interior" if both sides of the interface have same cell (fluid) zone. Fluent automatically converts the resulting surface after fuse to be of "interior" type if both sides of it has the same cell (fluid) zone. <br />
<br />
Also, if you are not using Tgrid, you need to use tfilter tmerge3d to merge the meshes together before reading them into Fluent. Tgrid does the same when you load multiple mesh files at a time. <br />
<br />
===Q: How do I determine what kind of grid to generate? (I would like to known selection criteria between structured and unstructured mesh.)===<br />
<br />
A: Try this approach - consider the meshing options in this order: Single-Block Structured, Multi-Block Structured, Multi-Block Hybrid/Mixed, Fully Unstructured. Gambit can generate most of the cells types and topologies that Fluent can use (with the notable exception of nonconformal meshes). Here are some guidelines/suggestions:<br />
* If you can generate a single-block structured mesh for your problem, then stop there. There is no need to go further. <br />
* If your solution is having problem around a corner (or the like), try multi-block structured mesh. If you are getting improved solution, then stop there. <br />
* If you still have problems around different part of the corner, try the unstructured mesh, with high density mesh around the corner. Before going to a fully unstructured mesh, try making only the problem region unstructured. If the solution is good, then stop there. <br />
* If one part of the mesh still requires special attention, then you can use Fluent's adaptive unstructured facility to refine the mesh until the solution is acceptable. Ideally, you should still get a mesh independent solution. <br />
* It is very important to be able to control every part of your mesh so that you can get good solution everywhere. This is more difficult with unstructured meshes. <br />
* For many geometries, if you can use a structured mesh you will end up with fewer cells (this is particularly true in three dimensions). It is a good idea to use structured-type meshes in regions that will allow it, and use unstructured meshes everywhere else.<br />
* Don't forget that Fluent can handle prismatic cells. If you have an unstructured surface mesh, Gambit can generate a layer of prismatic cells that will resolve boundary layers without requiring a (fully) structured mesh.<br />
<br />
===Q: How do I run GAMBIT as a batch process?=== <br />
<br />
A: To run Gambit in "batch" mode, prepare a journal file (e.g., "test.jou"), then use the command : gambit test -in test.jou <br />
<br />
=== Q: I am having trouble uniting two volumes, what should I do? ===<br />
<br />
"misclassified graph coedge - probably geometrical problem" <br><br />
-> you can try healing the volumes<br><br />
-> deleting the volume (without lower geometry), healing and uniting the faces, then build the volume again<br />
<br />
===Q: I am trying to move a node to modify the mesh on a face with mouse. Why in y direction I can only move the node discretely by 0.5 or multiples of 0.5? I can move it continuously in x direction and I would like to do so in y as well. Is there some default value to change? ===<br />
<br />
== Other Preprocessing Codes==<br />
=== Gambit Turbo ===<br />
<br />
=== TGrid ===<br />
<br />
== Application specific codes ==<br />
<br />
=== Icepak ===<br />
<br />
=== Airpak ===<br />
<br />
=== MixSim ===<br />
<br />
== Educational codes ==<br />
<br />
=== FlowLab ===<br />
[http://flowlab.fluent.com]<br />
<br />
[[Category: FAQ's]]<br />
<br />
{{stub}}</div>Si