CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Algebraic Model for Variance - grid size surface field ( June 28, 2012 05:03

Algebraic Model for Variance - grid size surface field

I have a rhoPimpleFoam solver which solve the equation for an extra scalar equation c (progress variable) and an algebraic equation for its variance.

The model for the variance is var (c) = a * (Delta X)^2 * (grad (c))^2

where the Delta X is the grid size, a is a constant (0.08333) and grad (c) is the gradient of C field.

The solver upload the data for progress variable (which goes from 0 to 1) and variance (which goes from 0 to 0.25) from a two dimensional table .

Table looks like:

Variance PV other variables
0 0
: :
: 1
0.1 0
: :
: 1
0.5 0
: :
: 1
My questions are the following:

1) I defined the grid size field in the following way and I would like to know if it's correct

surfaceScalarField GridSize

GridSize = mesh.surfaceInterpolation::deltaCoeffs();
2) My secondo question is:

considering the equation for the variance:

VarC.internalField() = pow((GridSize.internalField(),2)*0.08333*magSqr(fv c::grad(C));

when I run the simulation, after a few iterations, the variance goes out of bound (despite I impose to stay inside the limit of 0-0.25) and the simulation crashes soon.

Is that have something to do with the gridsize definition?

thanks for the help

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