CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to calculate dissipation rate in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2021, 16:35
Default How to calculate dissipation rate in OpenFOAM
  #1
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8
farzadmech is on a distinguished road
Hello all
I hope you are well. I want to calculate dissipation rate in LES simulation and I find a good code for calculating TKE budget.
https://github.com/AndreaDesan/pimpleTKEBudgetFoam
But I can not use it since some definitions are different, so I decided to use the definitions in the code(tkeBudget.H);
https://github.com/AndreaDesan/pimpl...er/tkeBudget.H
Code:
  volScalarField kSGS = turbulence->k(); //Instantaneous subgrid-scale tke
	    
    volScalarField kRes = 0.5*(UPrime & UPrime); //Instantaneous resolved tke

    kTot = kRes + kSGS;
    volScalarField epsilonSGS = turbulence->epsilon();

    volSymmTensorField SRes = symm(fvc::grad(UPrime)); //Instantaneous resolved fluctuating rate of strain
    volScalarField epsilonRes=-2*nuLam*(SRes && SRes); //Instantaneous resolved dissipation rate

    epsilonTot = mag(epsilonRes + epsilonSGS);

    LESResIndex = kRes/max(kSmall,kTot); //Instantaneous ratio of resolved to total (Resolved + SGS) tke
Now, lets return to my main discussion;
a) The dimension of tke is [m2s(-2)] and "tke rate" must be [m2s(-3)]
b) the dimension of dissipation rate must be the same, so I calculate for both epsilonSGS and epsilonRes as below;
1- epsilonSGS = Ce*pow(k,3/2)/delta====>[Ce]*[k^3/2]/[delta]====>[1]*[m3s(-3)]/[m]====>m2s(-3)

2- epsilonRes = nu * (gradU && gradU)====>[m2s(-1)]*[?????]=== I calculate "gradU && gradU" in OpenFoam and dimension was s(-2), so we have [m2s(-1)]*[s(-2)]=m2s(-3).

basically epsilonSGS and epsilonRes has the same dimension m2s(-3) which is the same as tke rate m2s(-3). From this I think I have calculated the [?????] correctly. Am I correct?
farzadmech is offline   Reply With Quote

Old   November 3, 2021, 17:28
Default
  #2
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8
farzadmech is on a distinguished road
Maybe this question is a little stupid one. I always read and heard dissipation rate [m2s(-3)], but I never heard about TKE rate. TKE is [m2s(-2)], so TKE rate must be [m2s(-3)] which is the same as dissipation rate. am I correct?


Quote:
Originally Posted by farzadmech View Post
Hello all
I hope you are well. I want to calculate dissipation rate in LES simulation and I find a good code for calculating TKE budget.
https://github.com/AndreaDesan/pimpleTKEBudgetFoam
But I can not use it since some definitions are different, so I decided to use the definitions in the code(tkeBudget.H);
https://github.com/AndreaDesan/pimpl...er/tkeBudget.H
Code:
  volScalarField kSGS = turbulence->k(); //Instantaneous subgrid-scale tke
	    
    volScalarField kRes = 0.5*(UPrime & UPrime); //Instantaneous resolved tke

    kTot = kRes + kSGS;
    volScalarField epsilonSGS = turbulence->epsilon();

    volSymmTensorField SRes = symm(fvc::grad(UPrime)); //Instantaneous resolved fluctuating rate of strain
    volScalarField epsilonRes=-2*nuLam*(SRes && SRes); //Instantaneous resolved dissipation rate

    epsilonTot = mag(epsilonRes + epsilonSGS);

    LESResIndex = kRes/max(kSmall,kTot); //Instantaneous ratio of resolved to total (Resolved + SGS) tke
Now, lets return to my main discussion;
a) The dimension of tke is [m2s(-2)] and "tke rate" must be [m2s(-3)]
b) the dimension of dissipation rate must be the same, so I calculate for both epsilonSGS and epsilonRes as below;
1- epsilonSGS = Ce*pow(k,3/2)/delta====>[Ce]*[k^3/2]/[delta]====>[1]*[m3s(-3)]/[m]====>m2s(-3)

2- epsilonRes = nu * (gradU && gradU)====>[m2s(-1)]*[?????]=== I calculate "gradU && gradU" in OpenFoam and dimension was s(-2), so we have [m2s(-1)]*[s(-2)]=m2s(-3).

basically epsilonSGS and epsilonRes has the same dimension m2s(-3) which is the same as tke rate m2s(-3). From this I think I have calculated the [?????] correctly. Am I correct?
farzadmech is offline   Reply With Quote

Old   November 8, 2021, 08:27
Default
  #3
Senior Member
 
Andrea
Join Date: Feb 2012
Location: Leeds, UK
Posts: 179
Rep Power: 16
Andrea1984 is on a distinguished road
Not sure from where within code you got "tke rate".
Andrea
Andrea1984 is offline   Reply With Quote

Old   January 11, 2022, 04:44
Default
  #4
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5
joshwilliams is on a distinguished road
Quote:
Originally Posted by farzadmech View Post
Hello all
I hope you are well. I want to calculate dissipation rate in LES simulation and I find a good code for calculating TKE budget.
https://github.com/AndreaDesan/pimpleTKEBudgetFoam
But I can not use it since some definitions are different, so I decided to use the definitions in the code(tkeBudget.H);
https://github.com/AndreaDesan/pimpl...er/tkeBudget.H
Code:
  volScalarField kSGS = turbulence->k(); //Instantaneous subgrid-scale tke
        
    volScalarField kRes = 0.5*(UPrime & UPrime); //Instantaneous resolved tke

    kTot = kRes + kSGS;
    volScalarField epsilonSGS = turbulence->epsilon();

    volSymmTensorField SRes = symm(fvc::grad(UPrime)); //Instantaneous resolved fluctuating rate of strain
    volScalarField epsilonRes=-2*nuLam*(SRes && SRes); //Instantaneous resolved dissipation rate

    epsilonTot = mag(epsilonRes + epsilonSGS);

    LESResIndex = kRes/max(kSmall,kTot); //Instantaneous ratio of resolved to total (Resolved + SGS) tke
Now, lets return to my main discussion;
a) The dimension of tke is [m2s(-2)] and "tke rate" must be [m2s(-3)]
b) the dimension of dissipation rate must be the same, so I calculate for both epsilonSGS and epsilonRes as below;
1- epsilonSGS = Ce*pow(k,3/2)/delta====>[Ce]*[k^3/2]/[delta]====>[1]*[m3s(-3)]/[m]====>m2s(-3)

2- epsilonRes = nu * (gradU && gradU)====>[m2s(-1)]*[?????]=== I calculate "gradU && gradU" in OpenFoam and dimension was s(-2), so we have [m2s(-1)]*[s(-2)]=m2s(-3).

basically epsilonSGS and epsilonRes has the same dimension m2s(-3) which is the same as tke rate m2s(-3). From this I think I have calculated the [?????] correctly. Am I correct?

You use UPrime to calculate epsilonRes, but from equation 14 in this paper [1], it appears this would give you epsilonSGS. Instead, based on [1], you should use epsilonRes_ij = nu * (gradU & gradU). Then you can probably get it as a scalar as you appear to have it by taking the trace?
I have also seen epsilonRes been calculated as epsilonRes = dkRes/dt [2].



[1] Wacławczyk, M., Pozorski, J. and Minier, J.P., 2004. Probability density function computation of turbulent flows with a new near-wall model. Physics of Fluids, 16(5), pp.1410-1422.
[2] Jayaram, R., Jie, Y., Zhao, L. and Andersson, H.I., 2020. Clustering of inertial spheres in evolving Taylor–Green vortex flow. Physics of Fluids, 32(4), p.043306.
joshwilliams is offline   Reply With Quote

Old   November 24, 2022, 03:20
Default
  #5
New Member
 
Join Date: Aug 2017
Posts: 16
Rep Power: 9
Wang Shang is on a distinguished road
Dear Farzad Faraji,

I am having the same problem as you and searched for this thread of yours. Did you solve the problem please?

Regards,
Shang
Wang Shang is offline   Reply With Quote

Reply

Tags
dissipation rate, les, tke les


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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
Turbulent Dissipation Rate Concept (epsilon) elowfoam Main CFD Forum 2 October 9, 2019 15:31
Calculate mass flow rate during run time in OpenFOAM aishk OpenFOAM 5 May 27, 2019 08:03
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04


All times are GMT -4. The time now is 15:05.