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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 7, 2021, 23:14
Default How to calculate Production and Dissipation term
  #1
Member
 
ESI
Join Date: Sep 2017
Posts: 46
Rep Power: 8
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


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
TKE production and Dissipation for DNS Akshay_11235 OpenFOAM Programming & Development 1 October 8, 2023 09:00
Howto get the production and dissipation of TKE?? lakeat OpenFOAM Running, Solving & CFD 9 March 22, 2022 11:14
Reference for turbulence production term in epsilonWallFunction Tobermory OpenFOAM Programming & Development 0 January 18, 2021 12:21
Production TKE in LES CeesH FLUENT 2 March 8, 2016 02:38
K-Epsilon model? Brindaban Ghosh Main CFD Forum 2 June 24, 2000 04:22


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