FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

Ek.H

Go to the documentation of this file.
00001 #ifndef Ek_H
00002 #define Ek_H
00003 
00004 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00005 
00006 namespace Foam
00007 {
00008 
00009 inline tmp<scalarField> Ek
00010 (
00011     const scalar Ea,
00012     const scalar k0,
00013     const scalarField& k
00014 )
00015 {
00016     tmp<scalarField> tEk = Ea*pow(k/k0, 4.0)*exp(-2.0*sqr(k/k0));
00017 
00018     /*
00019     scalarField& Ekf = tEk();
00020 
00021     label i;
00022     forAll(Ekf, i)
00023     {
00024         if (k[i] < 2 || k[i] > 10)
00025         {
00026             Ekf[i] = 0.0;
00027         }
00028     }
00029     */
00030 
00031     return tEk;
00032 }
00033 
00034 
00035 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00036 
00037 } // End namespace Foam
00038 
00039 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines