|
[Sponsors] |
January 11, 2024, 07:40 |
kEqn model: epsilon() function
|
#1 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
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() ); } |
|
January 11, 2024, 08:21 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14 |
It's just a utility function, to allow you to calculate epsilon if you need it.
|
|
January 29, 2024, 19:08 |
|
#3 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
||
January 30, 2024, 04:50 |
|
#4 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14 |
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) ); |
|
January 30, 2024, 07:07 |
|
#5 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Quote:
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 |
||
January 30, 2024, 07:13 |
|
#6 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
Rep Power: 14 |
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. |
|
January 30, 2024, 08:40 |
|
#7 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
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. |
|
Tags |
keqn, openfoam11 |
|
|
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 |