**Discussion Closed** This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

## Problem with k-epsilon wall function

Posted 24 Jun 2009 11:26 GMT-04:00 7 Replies

Please login with a confirmed email address before reporting spam

The only significant difference I can see is that I am doing 2D Axisymmetric k-eps, not 2D. I have the heated wall on part of the outside of the cylinder.

My problem is that the "wall" function isn't working - I have complete temperature discontinuity from the temperature of the fluid and the temperature of the solid. The wall does not heat the fluid at all.

Any hints as to how to find my error? I am happy to post my .mph if that is appropriate?

Regards, John

Please login with a confirmed email address before reporting spam

Please login with a confirmed email address before reporting spam

What are the values for y+ and T+ in your model ? These are normally the variables dwplus_chns and Tplus_htgh in the COMSOL application mode only valid on the surface where the wall function is applied.

Aha!! I look through the COMSOL model solution and it has Tplus_chcc defined as a boundary variable for some of the boundaries as

11.82560274465786+log(dwplus_chns)/kappa_chns-0.5*(1+log(1000*kappa_chns))/kappa_chns

cplus_chns, kappa_chns and cmu_chns are defined as scalar variables. I can't find dwplus_chns (must be there somewhere I guess - is there an easy way to find definitions - if I try to plot it then it knows it is defined as a wall-offset-in-viscous-units?)....

When I look through my model, Tplus_chcc got automatically defined by someone, but the vaue is *ZERO*.

Even though I can't find dwplus_chns, I've now manually typed in that formula for Tplus_chcc.

I'll give it a go :-)

Please login with a confirmed email address before reporting spam

What is your Reynolds number ?

Please login with a confirmed email address before reporting spam

For better (or worse), I am not using htgh. I am using the ChemEng model for 2D Axisymmetric -> FluidFlow->NonIsothermal -> k-epsilon -> SteadyState

It automatically creates a model with k-epsilon and two chcc's. The wall functions are predefined.

It appears that when you do this for non axisymmtric and select "wall" on the chcc - then you get the correct formula for Tplus. But <unless I screwed up> when you choose axisymmetric and then wall - then you get Tplus=0.

But it is completely conceivable that the mistake is mine :-)

Thanks for the reminder on the range for y+ ... I had exceeded that in places.

Please login with a confirmed email address before reporting spam

I quickly set up a simple 2D model with chns, chcc, chcc2 and I can confirm what you have found. Indeed, it appears that the 2D cartesian model also sets up the heat flux as zero initially at the turbulent wall boundary. This appears incorrect, but there is a trick ! I fell into the same trap myself in trying to set this up.

Intuitively, from the GUI, you want to set your boundary conditions from the pull down window on the right. However, that menu shows a zero heat flux.

Instead, set the boundary condition using the Group pull down menu on the left for each individual boundary. In that menu, you see the boundary type "wall" which sets up the correct boundary condition. Once the correct boundary condition of wall is set, then Tplus will also change to a non-zero functional relationship and you will also get heat transfer to work (I bet). I don't like this "trick" because the wall option should also appear on the RHS as well.

Please login with a confirmed email address before reporting spam

Your comment on y+ has got me worried. The FEM solver has converged. If I mesh refine then the FEM still converges and the answer is basically the same. My background is linear PDE's so at that point I would sit back and be confident in the answer. But my y+ is about 1000. Does that mean the answer is junk? Scary.

Do you have a recomended sources of known solutions for "simple" air flow in pipes at Re ~ 10^6. When I do a literature search I am overwhelmed by the hits, all of which are for more complicated cases.

Please login with a confirmed email address before reporting spam

The default value for wall offset is "h/2". The COMSOL folks tell me that "h" is the length of the largest size of a finite element adjacent to the wall surface. In practice, I have found this really needs to be about the size of the normal distance of the first mesh line away from the wall. Actually, if you look at the way one is supposed to set up these problems, this first wall offset is not even supposed to be in the problem (the physical space that is). If you go look at the "flow in bended pipe" problem in the COMSOL examples, it shows this. But most folks have such thin boundary layers, that they ignore this small detail (including me).

Also Rey=10^6 is quite large. Turbulence theoretically starts at ~ 1200. So, if you really have Rey=10^6, you should have an extremely thin boundary layer and very small value for wall offset and very fine mesh near the wall. Yes the answer is questionable if you don't have 30<y+<100. This is clearly stated in the COMSOL manual. You need to have a benchmark problem in hand similar to yours to judge the accuracy. Yes, the literature is full of these problems.

I am attaching one of my favorite figures on this topic. It is on page 224 of "Computational Fluid Mechanics and Heat Transfer", McGraw-Hill, 1984, Anderson, Tannehill, Pletcher.

Attachments:

Note that while COMSOL employees may participate in the discussion forum, COMSOL^{®} software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.

## Suggested Content

- KNOWLEDGE BASE Initial guess leads to undefined function value
- FORUM Deposition of Electrons on wall
- BLOG Image Denoising and Other Multidimensional Variational Problems
- KNOWLEDGE BASE Solving electromagnetic heating models with high-frequency loads
- BLOG Introduction to Modeling Soap Films and Other Variational Problems