CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Boundary condition turbulentHeatFluxTemperature causes crash if yPlus is too low (https://www.cfd-online.com/Forums/openfoam-solving/115684-boundary-condition-turbulentheatfluxtemperature-causes-crash-if-yplus-too-low.html)

 jherb April 4, 2013 14:28

Boundary condition turbulentHeatFluxTemperature causes crash if yPlus is too low

Using the solver buoyantBoussinesqSimpleFoam and the boundary condition turbulentHeatFluxTemperature at a wall causes a crash in the solver for T if the yPlus value is too low at this wall.

The reason is, that the gradient of T at that wall is calculated in OpenFOAM-2.2.x/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C:
Code:

`gradient() = q_/(Ap*Cp0*alphaEffp);`
or
Code:

`gradient() = q_/(Cp0*alphaEffp);`
But alphaEffp is set in /OpenFOAM-2.2.x/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H as:
Code:

```kappat = turbulence->nut()/Prt; kappat.correctBoundaryConditions();```
nut() is calculated at the wall by the wall function, e.g. in /OpenFOAM-2.2.x/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C:
Code:

```        if (yPlus > yPlusLam_)         {             nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1.0);         }```
Now if yPlus is too low, nut is 0 so the equation for the gradient divides by 0.

And obvious solution would be to use a coarser grid, but this does not make sense (the SST turbulence model is used, so there should be no lower limit on yPlus).

I also reported this at: http://www.openfoam.org/mantisbt/view.php?id=806

How to fix this problem?

 palmerlee January 2, 2014 03:17

Hi, Joachim!

I don't know what alphaEffp is, but it couldn't be just turbulent. It could be alpha+alphat, by my guess, and alpha shouldn't be zero at the wall or anywhere else, also guessing.

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