CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Strange averaging in directMappedFixedValue BC (http://www.cfd-online.com/Forums/openfoam/77482-strange-averaging-directmappedfixedvalue-bc.html)

woody June 24, 2010 08:28

Strange averaging in directMappedFixedValue BC
 
Dear All,

while trying to derive my own BC from the direct mapped BC, i was wondering why there are two different averaging possibilities:

Code:

  if (setAverage_)
    {
        Type averagePsi =
            gSum(this->patch().magSf()*newValues)
          /gSum(this->patch().magSf());

        if (mag(averagePsi)/mag(average_) > 0.5)
        {
            newValues *= mag(average_)/mag(averagePsi);
        }
        else
        {
            newValues += (average_ - averagePsi);
        }
    }

Any Idea about the streching if the average differs to much?


Have FUN!

florian_krause September 7, 2012 05:10

Quote:

Originally Posted by woody (Post 264335)
Dear All,

while trying to derive my own BC from the direct mapped BC, i was wondering why there are two different averaging possibilities:

Code:

  if (setAverage_)
    {
        Type averagePsi =
            gSum(this->patch().magSf()*newValues)
          /gSum(this->patch().magSf());

        if (mag(averagePsi)/mag(average_) > 0.5)
        {
            newValues *= mag(average_)/mag(averagePsi);
        }
        else
        {
            newValues += (average_ - averagePsi);
        }
    }

Any Idea about the streching if the average differs to much?


Have FUN!

Hi guys,
I am successfully using the mapped BC for LES of turbulent flow through a 90deg bend, with the mapping region located in an (extended) straight inlet section. I switched on averaging of velocity to obtain my desired bulk velocity.

While running the simulation, I assumed that OF always computes the new velocities according to the above else statement, using the difference between the desired average and the current velocities. Then I checked the corresponding code and I'm also a bit confused by the same the if statement, specifically by the condition and the first correction method.

Any ideas?

Thanks,
Florian


All times are GMT -4. The time now is 05:33.