|
[Sponsors] |
January 12, 2024, 04:57 |
Production and Destruction terms
|
#1 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hello,
If I want to obtain the production values and in particular, destruction term of the equation below, how do I do it? Could anyone guide me? Code:
tmp<fvScalarMatrix> kEqn ( fvm::ddt(alpha, rho, k_) + fvm::div(alphaRhoPhi, k_) - fvm::laplacian(alpha*rho*DkEff(), k_) == alpha*rho*G - fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_) - fvm::Sp(this->Ce_*alpha*rho*sqrt(k_)/this->delta(), k_) + kSource() + fvModels.source(alpha, rho, k_) ); |
|
January 23, 2024, 11:51 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14 |
I used to think that this was impossible, without creating your own clone of the turbulence model and explicitly adding in coding to make the field write to disk. However - I found this recently: at the bottom of the controlDict in the simpleFoam/pitzDaily tutorial (foundation v8) is the following:
Code:
cacheTemporaryObjects ( kEpsilon:G ); functions { #includeFunc writeObjects(kEpsilon:G) } So, you can force the code to write tmp<> variables ... which is not quite what you are after since the destruction term is expressed as a composite term, and not as a tmp<> volField, but it may be a step in the right direction? Good luck. |
|
January 26, 2024, 07:49 |
|
#3 | |
Senior Member
ONESP-RO
Join Date: Feb 2021
Location: Somwhere on Planet Earth
Posts: 127
Rep Power: 5 |
Quote:
I use OpenFOAM v2312 so that trick doesn't work unfortunately. But I am not sure why do you need to clone the turbulence model to compute the production term when it could be simply computed using: The production term of TKE is the double inner product of the Reynolds stress tensor and the velocity gradient tensor. This can be computed using a coded function object (or expressions?). Regards
__________________
Don't keep making the same mistakes. Try to make new mistakes. |
||
January 26, 2024, 08:24 |
|
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14 |
The benefit of cloning the model rather than trying to calculate it yourself is that you see exactly the values that are being used in the turbulence model ... the value you calculate may be slightly different.
|
|
Tags |
openfoam9 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Point implicit treatment of k-e source terms | andy | Main CFD Forum | 5 | June 9, 2006 12:03 |