CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   gammaCoeff in twoPhaseEulerFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/143262-gammacoeff-twophaseeulerfoam.html)

RjwV October 20, 2014 08:18

gammaCoeff in twoPhaseEulerFoam
 
Dear Foamers,

I would like to adjust the kineticTheoryModel.C file, more specifically the dissipation rate gammaCoeff. Currently the simplified equation 3.24 on page 50 of Van Wachem's thesis has been implemented. However, I would like to implement equation 3.23, where the divergence term of the solids velocity has not been neglected.

Could I get some hints on how I could program this into the code properly? Currently I have this, but it is not working.

Code:

        // Dissipation (Eq. 3.24, p.50)
 /*      volScalarField gammaCoeff
        (
            12.0*(1.0 - sqr(e_))
          *max(sqr(alpha), residualAlpha_)
          *gs0*(1.0/da)*ThetaSqrt/sqrtPi
        );*/

    // Added eqn. 3.23 from Van Wachem (RJWV)
        volScalarField gammaCoeff
        (
        3.0*(1.0 - sqr(e_))*max(sqr(alpha), residualAlpha_)*gs0
      *((4.0/da)*(ThetaSqrt/sqrtPi) - fvm::div(U))
        );

Kind regards,
Ramon

RjwV October 28, 2014 05:56

Just for the sake of completion, it seems I have managed to tackle the problem myself. It was not that difficult after all, but hopefully it can aid someone in the future.

in kineticTheoryModel.C the following changes can be made:

Code:

volScalarField divU = fvc::div(this->U_)
and:

Code:

volScalarField gammaCoeff
(
    3.0*(1.0 - sqr(e_))*max(sqr(alpha), residualAlpha)*gs0
  *((4.0/da)*(ThetaSqrt/sqrtPi) - divU)
);

I believe in the 2.3.x release gs0 should be replaced with gs0_ .

Kind regards,
Ramon


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