|
[Sponsors] |
Turbulence intensity function object for OpenFOAM 2.4.x |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 25, 2019, 19:02 |
Turbulence intensity function object for OpenFOAM 2.4.x
|
#1 |
New Member
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Hi everyone,
I try to use the function object turbulence Intensity from the developers branch (see link below) in OpenFOAM 2.4.x as I am using SOWFA compiled with OF2.4.x. https://github.com/OpenFOAM/OpenFOAM...lenceIntensity Anyhow I am completely new to compiling and have some trouble adapting the files. Especially I don't now what to insert for fvMeshFunctionObject functions as it is not included in OF2.4.x. I guess I have to use functionObjectFile but what do I have to adapt in addition to the name? Furthermore Uprime is given by calculation with help of averageFields.H within ABLSolver.C. But averageFields.H is included "directly" (it looks more like a .C file and has no header or similar and starts right away instead of "dividing" into .H and .C files). Moreover the .H files can not be found when including it to the turbuöenceIntensity files and also in Make options. Hence I thought for making sure to include all needed values I use the ABLSolver.H file but that one does not exist at all (only the .C file here). How can I handle with this different set up? Thanks in advance Last edited by mörli; July 26, 2019 at 04:01. |
|
July 26, 2019, 08:42 |
|
#2 |
New Member
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Hi again,
I tried to use the vorticity function object (and some others) included in OpenFOAM 2.4.x to adapt for my needs. I attaced the .H and .C files With those i get the following error message: Code:
TIABL/TIABL.C: In member function ‘virtual void Foam::TIABL::execute()’: TIABL/TIABL.C:139:35: error: no match for call to ‘(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >) (Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >)’ TIABL = mag(U)(sqrt((2.0/3.0)*k)); ^ In file included from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/tmp.H:143:0, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/PtrListI.H:29, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/PtrList.H:322, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/List.C:30, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/List.H:259, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/HashTable.C:30, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/Istream.H:184, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/ISstream.H:39, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/IOstreams.H:38, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/VectorSpace.C:27, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/VectorSpace.H:171, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/Vector.H:44, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/vector.H:39, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/fieldTypes.H:35, from /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/finiteVolume/lnInclude/volFieldsFwd.H:37, from TIABL/TIABL.H:42, from TIABL/TIABL.C:26: /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/tmpI.H:187:11: note: candidate: T& Foam::tmp<T>::operator()() [with T = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>] inline T& Foam::tmp<T>::operator()() ^ /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/tmpI.H:187:11: note: candidate expects 0 arguments, 1 provided /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/tmpI.H:216:17: note: candidate: const T& Foam::tmp<T>::operator()() const [with T = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>] inline const T& Foam::tmp<T>::operator()() const ^ /home/ms-sowfa/OpenFOAM/OpenFOAM-2.4.x/src/OpenFOAM/lnInclude/tmpI.H:216:17: note: candidate expects 0 arguments, 1 provided TIABL/TIABL.dep:485: die Regel für Ziel „Make/linux64GccDPOpt/TIABL.o“ scheiterte make: *** [Make/linux64GccDPOpt/TIABL.o] Fehler 1 Btw: So far I am calculating with U instead of Uprime which obviosly is wrong but I wanted to do it step by step and I don't have a clue how to include Uprime (calculated within the ABLSolver I use) yet. Thanks in advance for any help. |
|
July 26, 2019, 10:20 |
|
#3 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15 |
Maybe TIABL = mag(U)/(sqrt((2.0/3.0)*k))
|
|
July 26, 2019, 13:06 |
turbModel.U vs "standard" U; averaging LES/RANS
|
#4 |
New Member
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Thanks for the fast reply.
You are right I was so focused on the definitions I didn't check the equation itself. Anyhow in OpenFOAM-dev turbModel.U is used for the calculation. Can you tell me what is the differents between turbModel.U and the "normal" U (f.exp. obr_.lookupObject<volVectorField>("U") ). Is it the same? If so wouldn't I have to adapt it for LES calculations (as it is averaged for RANS obviously already) for turbulence intensity calculation with averaged velocity? Thanks a lot |
|
July 26, 2019, 13:33 |
|
#5 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15 |
I think it is the same. This are all references to the U stored in the mesh database
|
|
July 27, 2019, 09:39 |
|
#6 |
New Member
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Thanks once again.
I succesfully compiled my functionObject. But when I include it in my controldict I get the following error message: Code:
--> FOAM FATAL ERROR: Unknown function type TIABL Table of functionObjects is empty In my controlDict I have: Code:
functions { TIABL { type TIABL; functionObjectLibs ("libTI.so"); } } I compiled my TIABL functionObject and AverageTI functionObject to the libTI with wmake libso. I got no error message. Am I missing a step or do I have to include the function object in another way? I attached the folder with my function objects files Thanks a lot |
|
July 28, 2019, 14:56 |
|
#7 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15 |
Code:
. namespace Foam { defineTypeNameAndDebug(TIABL, 0); const word TIABL::modelName = "turbulenceModel"; } |
|
August 8, 2019, 18:05 |
Output file from function object
|
#8 |
New Member
Join Date: Mar 2019
Posts: 11
Rep Power: 7 |
Hi once again,
and thanks a lot for your support. The error above was caused as I defined the member function write() (and others), which I think I must, but didn't use them. I now included them (without doing anything) and the script works. I can write the results to the main output file with help of "info". But I still can't get "file()" to work. Below you can see the part I use in the script: Code:
forAll(hLevelsValues,hLevelsI) Info << TImeanLevelsList[hLevelsI] << endl; // forAll(hLevelsValues,hLevelsI) // { // file(0) << " " << TImeanLevelsList[hLevelsI]; // } //file(0) << endl; The uncommented lines don't work, the others don't. Can anyone help how to use the commands correctly? I attached the whole code for the function object. Thanks a lot in advance. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
interFoam and scalarTransport function object with fvOptions sources | fusij | OpenFOAM Running, Solving & CFD | 4 | April 18, 2022 07:12 |
[blockMesh] Errors during blockMesh meshing | Madeleine P. Vincent | OpenFOAM Meshing & Mesh Conversion | 51 | May 30, 2016 10:51 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:31 |
Question on Turbulence Intensity | Eric | FLUENT | 1 | March 7, 2012 04:30 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |