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

kEqn model: epsilon() function

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By Tobermory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 11, 2024, 07:40
Default kEqn model: epsilon() function
  #1
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,

I would like help to understand the reason for having a function intended for epsilon() in the KEqn model, which is an one SGS equation model and I did not see where the value obtained in the function is used.

Code:
template<class BasicMomentumTransportModel>
tmp<volScalarField> kEqn<BasicMomentumTransportModel>::epsilon() const
{
    return volScalarField::New
    (
        this->groupName("epsilon"),
        this->Ce_*k()*sqrt(k())/this->delta()
    );
}
Thanks
gu1 is offline   Reply With Quote

Old   January 11, 2024, 08:21
Thumbs up
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 748
Rep Power: 14
Tobermory will become famous soon enough
It's just a utility function, to allow you to calculate epsilon if you need it.
gu1 and NotOverUnderated like this.
Tobermory is offline   Reply With Quote

Old   January 29, 2024, 19:08
Default
  #3
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by Tobermory View Post
It's just a utility function, to allow you to calculate epsilon if you need it.
...and how I can calc? How to invoke the utility function?

Thanks.
gu1 is offline   Reply With Quote

Old   January 30, 2024, 04:50
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 748
Rep Power: 14
Tobermory will become famous soon enough
You first need to get a reference to the instantiated kEqn object, let's call that turbulence, then you just write turbulence.epsilon().

Here's an analogous situation, from a quick "grep -r" on "epsilon()" in the src folder:

Code:
     const compressibleMomentumTransportModel& turbulence =
         combModel_.turbulence();
 
     // Total strain
     const volScalarField sigmaTotal
     (
         sigma + alpha_*turbulence.epsilon()/(turbulence.k() + kMin)
     );
which shows both the epsilon() and k() access functions in action.
Tobermory is offline   Reply With Quote

Old   January 30, 2024, 07:07
Default
  #5
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by Tobermory View Post
You first need to get a reference to the instantiated kEqn object, let's call that turbulence, then you just write turbulence.epsilon().
I understood.
I believe I'm even in the wrong forum, the right thing to do would be to question it in post-processing.

What I want to learn is, once I have finished my analysis using the KEqn model, how do I calculate the epsilon for the last time of the simulation? Can I access it from outside, something like: 'postProcess -func calc epsilon -latestTime'?

Thanks
gu1 is offline   Reply With Quote

Old   January 30, 2024, 07:13
Default
  #6
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 748
Rep Power: 14
Tobermory will become famous soon enough
Aaah - okay. There's no direct way, I think, unless you can get the cacheing to work, as per my response on an earlier post - Production and Destruction terms.

Probably the best way to do this would be to write it your own functionObject in which you generate the reference to the kEqn object, call the epsilon access function and then write the resulting volScalar field. You could do this as a coded FO if it's a one-off, or implement as your own full FO if you plan to use it regularly.
Tobermory is offline   Reply With Quote

Old   January 30, 2024, 08:40
Default
  #7
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Ok. Thanks.

I even made a post about 'R', present in the multiphase model. I know he's not there for nothing, I just need to figure out what to call him.
gu1 is offline   Reply With Quote

Reply

Tags
keqn, openfoam11


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
../externals/cgns/hdf5/H5public.h:63:10: fatal error: mpi.h: No such file or director Mohsin1 SU2 8 November 25, 2023 04:46
Can we model k epsilon without wall function? parthigcar OpenFOAM 2 March 15, 2022 22:31
[mesh manipulation] refineMesh Error mohsen.boojari OpenFOAM Meshing & Mesh Conversion 3 March 1, 2018 23:07
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 01:35


All times are GMT -4. The time now is 12:18.