Page 1 of 1

Failure to transport a scalar in a lid driven flow in a box

Posted: Tue Aug 07, 2012 5:15 pm
by cyrillic
Hi,

My case is a 2D lid driven flow in a square box, the velocity is prescribed at the top wall and is parallel to the wall. This provides a solution where the fluid in the centre is rotating around a point slightly higher than the centre of the square.

The next part of my case is to transport a passive scalar that represents the total kinetic energy of the solution and so along the top the boundary condition for the passive user scalar is set as the square of the velocity boundary condition. It is zero on the other walls.

The problem I am having is that the passive scalar is not transported and results in zero in all cells. Is this to be expected because there is no inlet/outlet to convect it or for some other reason?

Any ideas what the problem is? I have attached a CS 2.0.1 data file for the gui, my usclim file for the boundary conditions and a simple mesh I test on (It is a .neu file but I wasn't allowed to upload it so I changed the extension to .txt and needs changing back).

Re: Failure to transport a scalar in a lid driven flow in a

Posted: Tue Aug 07, 2012 7:24 pm
by Jacques Fontaine
Hello,

You forgot to specify the type of your boundary condition for your scalar (icodcl).

Code: Select all

 icodcl(ifac, isca(1))    = 1
 rcodcl(ifac, isca(1), 1)   = 0.5d0*(0.25d0-(xyzcen(1,iel))**2)**2  !Total kinetic energy defined at top wall
Regards,