CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Phoenics (https://www.cfd-online.com/Forums/phoenics/)
-   -   GENK, GEN1 or LGEN1 ??? (https://www.cfd-online.com/Forums/phoenics/51556-genk-gen1-lgen1.html)

Phoenics user February 4, 2003 05:20

GENK, GEN1 or LGEN1 ???
 
Hi!!! ¿what is the difference between LGEN1, GEN1 & GENK????

I have found that in some subrutines GEN1 is always used, and I don't find where LGEN1 is used. I want to use the square root of the generation function. This is SQRT(LGEN1) or simply LGEN1 ??? or SQRT(GEN1) ???

Someone could give me an answer ??? Thanks!

cham SUPPORT February 11, 2003 05:17

Re: GENK, GEN1 or LGEN1 ???
 
If you put STORE(GEN1) in the Q1 file this will create 3d whole-field storage of mean rate of strain (generation function).

If you put STORE(GENK) in the Q1 file this will create 3d whole-field storage of production rate of turbulence energy (turbulent viscosity*generation function.

Then in any GROUND coding that you create you would use LBGEN1=LBNAME('GEN1') and LBGENK=LBNAME('GENK') to define the index for use in say call's to FN subroutines.

Note also that GEN1 is a 2d store of the current mean rate of strain at a given IZ slab. Therefore, this index can also be used in FN subroutines, but only within the PHOENICS IZ loop.

You cannot simply say SQRT(GEN1) because GEN1 is an index. You will need to call an FN subroutine to take the square root, or alternatively construct a do loop which accesses the F-array, i.e.

l0gen1=l0f(gen1)

do j=1,nxny

gsqrtg=sqrt(f(l0gen1+j))

enddo

where the PHOENICS integer function L0F returns the location in the F-array of the 2d store GEN1.



All times are GMT -4. The time now is 01:03.