Recently I bacame interested in Domain Decomposition algorithms for spectral methods, and in particular for Chebyshev collocation method.

There has been a lot of activity in this field since the second half of the 80′s. It will be hard to list all the papers, but maybe in some future post I will make a short list of some interesting ones.

Thanks to a funtastic scientific python blog I was able to get my hands on a masterfully written FD code implementing Multiplicative Schwarz method for Poisson equation on a square. With minor changes in the routine evaluating the 2D Laplacian, I was able to adapt the code for Chebyshev pseudospectral method. The results were wonderful!

I made two examples, and implemented them in **another-chebpy. **Both examples are in my google code git repository. One is solving Poisson eq. and other solves Biharmonic BVP (clamped BCs). I uploaded a small video on youtube that shows (rather slow) convergence for the case of biharmonic equation.

This can be accelerated by multigrid, which will be done in the future. Also parallelization is possible, but in this cae multicoloring (available here already) is required to decouple domains.

Following equations will help us in developing a collocation method using Bernstein polynomials for two-dimensional problems.

Let the following equation represent a surface in defined by a tensor product of Bernstein basis functions:

We can define p-*th* order partial derivative in -axis direction in a following way

and an q-*th* order derivative in -axis direction

Finally mixed derivative of order is defined as follows:

.

Laplacian operator can be written like this

,

which can further be simplified to

.

FLUENT users are aware of the “realizable” turbulence model. For more experienced modelers this means an implementation of a model presented in the paper by T.H. Shih, W.W. Liou, A. Shabbir, Z. Yang and J. Zhu, “A New Eddy Viscosity Model for High Reynolds Number Turbulent Flows”, *Computers and Fluids*, Vol. 24 No. 3, pp. 227-238, 1995.

In this model, realizability is achieved by letting coefficient appearing in the formulation of eddy viscosity, to be no longer a constant. Experiments also suggest it shouldn’t be a constant. While it has a value of 0.09 in inertial sublayer of BL flow, in homogeneous shear flow it is around 0,05. Therefore some way of changing the coefficient depending on the flow situation is desirable.

Let’s first say what realizability means mathematically, and then we’ll go into details about .

The realizability constraints any model should meet are following inequalities regarding Reynolds stress tensor components:

Eq. (2) is know as Schwarz’s inequality. So we need positivity of normal stresses (Eq.(1)), and we need Reynolds stress tensor components to obey Schwartz’s inequality. Based on these realizability constraints W. Reynolds as well as Shih, Zhu and Lumley proposed following form of an equation for :

Shih, Zhu, Lumley give this formulation for the constituents of the previous equation

,

Where

where is the mean rate-of-rotation tensor viewed in a rotating reference frame with the angular velocity . So this model can be applied in cases like rotating pipe etc.

, , , .

Only undetermined is coefficient . As far as I’m aware all authors treat it as a constant, and calibrate it in a way that it returns desired values in some cases (like 0.09 in inertial sublayer in BL flow). In original reference authors came to the value of , while in FLUENT this model is implemented with value . I look forward to some study where might not be a constant.

Now going to transport equations for and . The first one (-equation) remains the same as in standard model, while there are some changes with equation for dissipation. Here I’ll show them both for the sake of completeness

Where

Production of turbulence kinetic energy due to velocity gradients , as well as production of TKE due to buoyancy , are treated in the same way as in standard model.

When we find both and fields we move to computation of eddy viscosity in the standard form for model

The purpose of this note is to point out a few things I found useful for stable implementation of the model.

Argument of the arccos function should be in interval [-1,1], therefore I suggest implementation of in a following way:

Otherwise you might get a few NaN’s in the field which usually ruin the solution.

Experiments suggest there is no reason to let be larger than 0.09, so we will limit it from above

It would be useful to see what are the lowest values in the field and check with some experimental data, just to make sure we are on the right track.

Finally constants of the model are:

I wish you happy computing!

I was interested to see how **mlab** handles plots from my Chebyshev pseudospectral code. The result was quite surprising. The light effects give nice impression of this object’s position in space. The colors you might chose from are the same as in Matplotlib, but here they change smoothly – the one thing I was missing there.

I also posted this figure to **figshare** here.