CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Algebraic Model for Variance - grid size surface field (http://www.cfd-online.com/Forums/openfoam/103868-algebraic-model-variance-grid-size-surface-field.html)

 alessio.nz June 28, 2012 05:03

Algebraic Model for Variance - grid size surface field

Hello,

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
(
IOobject
(
"GridSize",
runTime.timeName(),
mesh,
IOobject::NO_WRITE
),
mesh,
dimensionSet(0,-1,0,0,0,0,0)
);

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

considering the equation for the variance: