CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to calculate Production and Dissipation term

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2021, 00:14
Default How to calculate Production and Dissipation term
  #1
Member
 
ESI
Join Date: Sep 2017
Posts: 44
Rep Power: 6
ht2017 is on a distinguished road
Now I am running channel flow with DNS. I am modifying the "create_field.H" to calculate the production term by the equation.

P_k = - \overline{u\prime_i u\prime_m} \frac{\partial U_i}{\partial x_m}

Code:
Info<< "Reading transportProperties\n" << endl;

IOdictionary transportProperties
(
    IOobject
    (
        "transportProperties",
        runTime.constant(),
        mesh,
        IOobject::MUST_READ_IF_MODIFIED,
        IOobject::NO_WRITE
    )
);

dimensionedScalar nu
(
    "nu",
    dimViscosity,
    transportProperties.lookup("nu")
);

Info<< "Reading field p\n" << endl;
volScalarField p
(
    IOobject
    (
        "p",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);


Info<< "Reading field U\n" << endl;
volVectorField U
(
    IOobject
    (
        "U",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);
  dimensionedScalar gradP
    (       
        transportProperties.lookup("gradP")
    );

    vector flowDirection(1,0,0);


// calculate production term

Info<< "Reading field UMean\n" << endl;

volVectorField UMean
(
    IOobject
    (
        "UMean",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

Info<< "Reading field prod\n" << endl;

volScalarField prod
(
    IOobject
    (
        "prod",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    -(((U-UMean)*(U-UMean))&&fvc::grad(U))
	
);

 // end


#include "createPhi.H"


label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
mesh.setFluxRequired(p.name());
it appears the error at -(((U-UMean)*(U-UMean))&&fvc::grad(U)). Do you know how to fix it?
ht2017 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference for turbulence production term in epsilonWallFunction Tobermory OpenFOAM Programming & Development 0 January 18, 2021 13:21
TKE production and Dissipation for DNS Akshay_11235 OpenFOAM Programming & Development 0 March 30, 2020 22:50
Howto get the production and dissipation of TKE?? lakeat OpenFOAM Running, Solving & CFD 8 July 9, 2016 05:56
Production TKE in LES CeesH FLUENT 2 March 8, 2016 03:38
K-Epsilon model? Brindaban Ghosh Main CFD Forum 2 June 24, 2000 05:22


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