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

Closing on wall functions - part 1: Problem statement and general solution

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

Rate this Entry

Closing on wall functions - part 1: Problem statement and general solution

Posted April 23, 2022 at 05:36 by sbaffini
Updated May 14, 2022 at 16:55 by sbaffini

This is the last series of posts on wall functions, where I summarize previous findings and give them a broader context. I won't provide derivations (hopefully I'll have time to put this in a larger note), but just few statements with the proper scripts to test them.

This all started with the aim to solve the following problem:

\frac{d}{dy}\left[C_p\left(\frac{\mu}{Pr}+\frac{\mu_t}{Pr_t}\right)\frac{dT}{dy}\right]=F_T

with boundary conditions T\left(0\right)=T_w and T\left(y_p\right)=T_p. Here, C_p (constant pressure specific heat), \mu (dynamic viscosity), Pr (Prandtl number) and Pr_t (turbulent Prandtl number) are all constant and \mu_t is an user specified turbulent viscosity profile better defined later. My previous attempts used a constant F_T too, here the more general case:

F_T\left(y\right) = \sum_{i=0}^{N}F_T^i\left(\frac{y}{y_p}\right)^i

is considered. The fact that this equation correctly represents a large set of velocity/temperature viscous boundary conditions should be self-evident (and you can read previous posts on the matter for explanations). Omitting derivations, assuming also \mu_t\left(0\right)=0, the formal solution to the problem above can be written as:

T\left(y\right) = T_w + y \left(\frac{Pr}{\mu C_p}\right) \left[q_w\left(\frac{{s_T^{-1}}^+}{y^+}\right)+y\sum_{i=0}^{N}\frac{F_T^i}{i+1}\left(\frac{y}{y_p}\right)^i\left(\frac{{s_T^i}^+}{{y^+}^{i+2}}\right)\right]

where (note the sign opposite to the classical thermal convention, but coherent to the velocity one, for ease of exposition):

q_w=\frac{\mu C_p}{Pr}\frac{dT}{dy}\bigg\rvert_{y=0}.

It also imemdiately follows that:

q_w = \frac{\left\{\frac{\left[T\left(y\right) - T_w\right]}{y} \left(\frac{\mu C_p}{Pr}\right) - y\sum_{i=0}^{N}\frac{F_T^i}{i+1}\left(\frac{y}{y_p}\right)^i\left(\frac{{s_T^i}^+}{{y^+}^{i+2}}\right) \right\}}{\left(\frac{{s_T^{-1}}^+}{y^+}\right)}

The functions {s_T^i}^+ appearing above are defined as follows:

{s_T^i}^+ = \int_0^{y+}{\frac{z^{i+1}}{\left[1+\left(\frac{Pr}{Pr_t}\right)\left(\frac{\mu_t}{\mu}\right)\right]}dz}

All the expressions above hold true for the velocity case as well, provided that C_p, Pr and Pr_t are all set to 1 (in this case, for clarity, we denote the functions above as {s_U^i}^+). The average turbulent kinetic energy production can instead be shown to be:


P_k \approx \frac{1}{y} \int_0^y \mu_t \left(\frac{dU}{dz}\right)^2 dz = \frac{\left(\tau_w^2 a+2\tau_w y b + y^2 c\right)}{\mu}

where:

a = \left(\frac{{p^{-1}}^+}{y^+}\right)

b = \sum_{i=0}^{N}\frac{F_U^i}{i+1}\left(\frac{y}{y_p}\right)^i\left(\frac{{p^i}^+}{{y^+}^{i+2}}\right)

c = \sum_{i=0}^{N}\sum_{j=0}^{N}\frac{F_U^i F_U^j}{\left(i+1\right)\left(j+1\right)}\left(\frac{y}{y_p}\right)^{i+j}\left(\frac{{p^{i+j+1}}^+}{{y^+}^{i+j+3}}\right)

and the functions {p^i}^+ appearing above are defined as follows:

{p^i}^+ = \int_0^{y+}{\frac{z^{i+1}\left(\frac{\mu_t}{\mu}\right)}{\left[1+\left(\frac{\mu_t}{\mu}\right)\right]^2}dz}

It is worth mentioning that, at this point, the formulas above are still exact for the initial problem statement, and all the details of the specific solution method have been moved to the integrals {s_{T,U}^i}^+ and {p^i}^+. This, while kind of obvious, is still remarkable, as it suggests a very specific implementation for wall functions and wall bcs in general, as the formulas above are straightforward generalizations of classical laminar formulas. Note also, that we have introduced an y^+ but it just appears as extreme of the integrals and as their denominator (elevated to a certain power). In practice, it is the variable that appears in the \mu_t/\mu formula, but nothing more needed to be specified about it in order to obtain the formulas above. In general, it will have a formula like y^+=f\left(y,\mu,\rho,\tau_w,F_U^i\right), but could well just depend from the tubulent model variables.

Leaving aside, for the moment, the solution for the integrals above (we assume the availability of a routine that gives their value for given y^+), the general solution procedure would be as follows:
  1. Solve equation above for \tau_w(iteratively, if y^+ depends from it) using y=y_p. Note that the equation for \tau_w is obtained from the one for q_w with C_p, Pr and Pr_t set to 1 and the functions {s_U^i}^+ in place of the {s_T^i}^+.
  2. Determine q_w or T_w, depending from the available thermal bc, from the equations above using y=y_p and the now certainly available y^+ (either iteratively from first step or just from turbulent variables).
  3. Repeat the previous point for any scalar (with C_p set to 1 and the Schmidt numbers in place of the Prandtl numbers, also within the s integrals)

In practice, as will be clear in a moment, I suggest to have routines that actually return \left(\frac{{s_{U,T}^i}^+}{{y^+}^{i+2}}\right) and \left(\frac{{p^i}^+}{{y^+}^{i+2}}\right), as it is their ratio that needs to be computed. Also, for reasons that will be clear in the second post of this series, I anticipate here that for the iterative solution of \tau_w in step 1 above, it is useful to have the same routine for \left(\frac{{s_U^i}^+}{{y^+}^{i+2}}\right) to also return:

{q^i}^+ = \frac{\left[\frac{1}{1+\frac{\mu_t}{\mu}}-\left(i+2\right)\left(\frac{{s_U^i}^+}{{y^+}^{i+2}}\right)\right]}{{y^+}^2}

which is the only wall function specific term entering in the derivative for the iterative procedure. I conclude this first post by stating, without proof, that for \mu_t/\mu going to 0 as C{y^+}^n with n>2, all the above terms can be safely computed also for y^+=0 and their exact limits are:

\lim_{y^+\to 0}\left(\frac{{s_T^i}^+}{{y^+}^{i+2}}\right) = \lim_{y^+\to 0} \left[\frac{1}{\left(i+2\right)}-\left(\frac{Pr}{Pr_t}\right)\frac{C{y^+}^n}{\left(i+n+2\right)}\right] = \frac{1}{\left(i+2\right)}

\lim_{y^+\to 0}\left(\frac{{p^i}^+}{{y^+}^{i+2}}\right) = \lim_{y^+\to 0} \frac{C{y^+}^n}{\left(i+n+2\right)} = 0

\lim_{y^+\to 0} {q^i}^+ = \lim_{y^+\to 0} -\frac{nC{y^+}^{n-2}}{\left(i+n+2\right)} = 0

The second post in the series will formalize the iterative procedure for computing \tau_w.
Posted in Uncategorized
Views 671 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0

Comments

 

All times are GMT -4. The time now is 02:19.