CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Bugs

Report a bug in LienCubicKELowReSetWallDissipation.H

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2011, 00:37
Default Report a bug in LienCubicKELowReSetWallDissipation.H
  #1
Member
 
Jinbiao Xiong
Join Date: Oct 2009
Location: China/Japan
Posts: 50
Rep Power: 16
JinBiao is on a distinguished road
Send a message via MSN to JinBiao
This head file sets the value of epsilon in the near wall cell. In order to consider the possibility that one cell may contain more than one wall-boundary faces. It contains the average function as follow.

Code:
    forAll(patches, patchi)
    {
        const fvPatch& curPatch = patches[patchi];

        if (isA<wallFvPatch>(curPatch))
        {
            forAll(curPatch, facei)
            {
                label faceCelli = curPatch.faceCells()[facei];

                // For corner cells (with two boundary or more faces),
                // epsilon in the near-wall cell are calculated as an average

                cellBoundaryFaceCount[faceCelli]++;

                epsilon_[faceCelli] +=
                     Cmu75*pow(k_[faceCelli], 1.5)
                    /(
                         kappa_.value()*y_[faceCelli]
                        *(1.0 - exp(-Aepsilon_.value()*yStar_[faceCelli]))
                     )
                    *exp(-Amu_.value()*sqr(yStar_[faceCelli]));

            }
        }
    }

    // perform the averaging

    forAll(patches, patchi)
    {
        const fvPatch& curPatch = patches[patchi];

        if (isA<wallFvPatch>(curPatch))
        {
            forAll(curPatch, facei)
            {
                label faceCelli = curPatch.faceCells()[facei];

                epsilon_[faceCelli] /= cellBoundaryFaceCount[faceCelli];
            }
        }
    }
For example, the cell i have two wall-boundary faces, then cellBoundaryFaceCount[i]=2. But the epsilon_ in the cell i will be divided by 2 twice. It is to say the epsilon_ is actually divided by 4. To remedy this bug, I replace the code above with

Code:
    forAll(patches, patchi)
    {
        const fvPatch& curPatch = patches[patchi];

        if (isA<wallFvPatch>(curPatch))
        {
            forAll(curPatch, facei)
            {
                label faceCelli = curPatch.faceCells()[facei];

                // For corner cells (with two boundary or more faces),
                // epsilon in the near-wall cell are calculated as an average

                cellBoundaryFaceCount[faceCelli]++;

                label n = cellBoundaryFaceCount[faceCelli];

                scalar eps_n =  
                            Cmu75*pow(k_[faceCelli], 1.5)
                           /(
                                kappa_.value()*y_[faceCelli]
                               *(1.0 - exp(-Aepsilon_.value()*yStar_[faceCelli]))
                            )
                          *exp(-Amu_.value()*sqr(yStar_[faceCelli]));

                // eps_ave = [(n-1)*eps_{n-1} + eps_n]/n
                epsilon_[faceCelli] =  ((n-1)*epsilon_[faceCelli] + eps_n) / n;;

            }
        }
    }
Best,

Jinbiao
__________________
Jinbiao
JinBiao is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cyclic patch bug in version 141 patched cosimobianchini OpenFOAM Bugs 10 February 1, 2011 19:16
Please report this bug egp OpenFOAM Installation 5 December 8, 2006 12:56
bug report pro am F.K. Siemens 3 January 25, 2005 00:27
BÚG REPORT for CD Piet Siemens 2 September 20, 2004 02:45
BUG REPORT for CD Piet Siemens 0 August 18, 2004 04:24


All times are GMT -4. The time now is 07:36.