|
[Sponsors] |
turbulentDFSEMInlet boundary condition for LES |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 10, 2018, 05:30 |
turbulentDFSEMInlet boundary condition for LES
|
#1 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
Hi all,
For LES it is suggested that the DFSEM (Divergence-free synthetic eddy method) should be used as the boundary condition at the inlet. After google it, I found that it is available starting from OpenFOAM1606 (the one downloaded from www.openfoam.com). Check this link for example, https://www.openfoam.com/releases/op...conditions.php. However, it seems like this BC is not supported in OpenFOAM downloaded from www.openfoam.org, even for the latest version OpenFOAM 6.0. I also tried to copy the source and header files from the .com one to the .org one and then compile the BC (after some minor cleaning of the code of course), but got error messages like this Code:
In file included from lnInclude/eddy.H:253:0, from turbulentDFSEMInletFvPatchVectorField.H:85, from turbulentDFSEMInletFvPatchVectorField.C:26: lnInclude/eddyI.H: In member function ‘Foam::scalar Foam::eddy::epsi(Foam::Random&) const’: lnInclude/eddyI.H:35:19: error: ‘class Foam::Random’ has no member named ‘sample01’ return rndGen.sample01<scalar>() > 0.5 ? 1 : -1; ^ lnInclude/eddyI.H:35:34: error: expected primary-expression before ‘>’ token return rndGen.sample01<scalar>() > 0.5 ? 1 : -1; ^ lnInclude/eddyI.H:35:36: error: expected primary-expression before ‘)’ token return rndGen.sample01<scalar>() > 0.5 ? 1 : -1; ^ In file included from turbulentDFSEMInletFvPatchVectorField.H:368:0, from turbulentDFSEMInletFvPatchVectorField.C:26: turbulentDFSEMInletFvPatchVectorFieldTemplates.C: In member function ‘Foam::tmp<Foam::Field<Type> > Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData(const Foam::word&) const’: turbulentDFSEMInletFvPatchVectorFieldTemplates.C:75:21: error: there are no arguments to ‘fileHandler’ that depend on a template parameter, so a declaration of ‘fileHandler’ must be available [-fpermissive] fileHandler().filePath ^ turbulentDFSEMInletFvPatchVectorFieldTemplates.C:75:21: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) turbulentDFSEMInletFvPatchVectorFieldTemplates.C:91:21: error: there are no arguments to ‘fileHandler’ that depend on a template parameter, so a declaration of ‘fileHandler’ must be available [-fpermissive] fileHandler().NewIFstream ^ turbulentDFSEMInletFvPatchVectorField.C: In member function ‘void Foam::turbulentDFSEMInletFvPatchVectorField::writeLumleyCoeffs() const’: turbulentDFSEMInletFvPatchVectorField.C:111:25: error: ‘fileHandler’ was not declared in this scope fileHandler().filePath ^ turbulentDFSEMInletFvPatchVectorField.C: In member function ‘const Foam::pointToPointPlanarInterpolation& Foam::turbulentDFSEMInletFvPatchVectorField::patchMapper() const’: turbulentDFSEMInletFvPatchVectorField.C:233:12: error: no match for ‘operator*’ (operand type is ‘Foam::autoPtr<Foam::pointToPointPlanarInterpolation>’) return *mapperPtr_; Thank you in advance. |
|
September 12, 2018, 09:55 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
It seems that the random number used in eddy.H ("cachedRandom.H") is not implemented in the openfoam.org version.
|
|
September 18, 2018, 23:20 |
|
#3 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
Hi mAlletto,
Thank you for your input, and you are absolutely right. The random number class used in the .org version and .com version have different member functions, and the .org one has a couple of more member functions. Initially I was going to modify the random number class in the .org version (I mainly work on this one) according to the .com one, but soon found out that the coding will need substantial efforts instead of minor changes. As for now my plan is to implement my own turbulentDFSEMInlet boundary condition (in a much simplified way, if I can) in the .org version. I still have questions about why the .org version doesn't implement this type of boundary condition, is the code not running very well or not good enough? Or I simply missed it in the .org version? Thank you again for reading my post. Ruiyan |
|
September 19, 2018, 10:18 |
|
#4 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Actually I have no idea why this boundary condition is not implemented in the .org version.
But maybe if you are able to get a version which is running also in the .org version you can try to submit it and look if it is accepted |
|
September 20, 2018, 00:34 |
|
#5 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
I will definitely try that and see how it goes.
|
|
September 20, 2018, 03:03 |
|
#6 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Having a first look on the DFSE method in the .com version I saw that the two base classes from which the boundary condition is derived from are also present in the .org version.
So i would guess it is not to complicated to take the sources of the .com version and try to compile it with the .org version. After that one has to check if the two base classes are implemented in the same way. If this is the case one has to check if the header files included in the .com version are present in the .org version. If not as a first step i would put them together in a subfolder and link against to them. After that try to compile it. If you proceed in this way and post the errors you get maybe i can help you out. |
|
September 21, 2018, 00:20 |
|
#7 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
Sounds great! I'll work on it and get back to you.
|
|
October 14, 2018, 03:55 |
|
#8 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
Hi Alletto,
Just want to get back to you on the discussions we had before. After trying to compile the DFSEM B.C. in the .org version of OF for a while I found it being very hard for me. Instead, I searched through this forum and found a similar B.C.-the inflowGenerator developed at Rostock. Right now I've been testing this B.C. for a while and it works well. I think these two B.C. both adopt the idea of synthetic eddies. The DFSEM is divergence free but the inflowGenerator may be not. Thanks. Ruiyan |
|
October 14, 2018, 14:38 |
|
#9 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
I think the method of the guys of Rostock is divergence free. I die not check the equations implemented in the github code but they pubished a divergencefree Methode a while ago
https://www.researchgate.net/publica...vortex_dipoles It is however only made for isotropic turbulence. A Mord general method is published but not availabel online (at least what I could Figuren out) https://www.researchgate.net/publica...ary_Anisotropy |
|
October 15, 2018, 02:41 |
|
#10 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
Thank you for the information Michael, I will definitely check these out!
|
|
October 15, 2018, 06:06 |
|
#11 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
A by the way, did you compile the github version of the inflow generator with a newer OF version of the 2.4?
|
|
October 30, 2018, 03:28 |
|
#12 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
Sorry Michael for the late response.
I am using OF-4.x, and I compiled the inflow generator in LEMOS-2.4.x, which you can find here: https://github.com/LEMOS-Rostock/LEMOS-2.4.x. It is in folder LEMOS-2.4.x/libLEMOS-2.4.x/boundaryConditions/inflowGenerator/ Cheers, Ruiyan |
|
July 8, 2020, 17:17 |
|
#13 | |
Member
Join Date: Oct 2013
Posts: 92
Rep Power: 13 |
Quote:
|
||
July 10, 2020, 01:12 |
|
#14 | |
Member
Join Date: Oct 2013
Posts: 92
Rep Power: 13 |
Quote:
Could you please tell me, how to use this? in U, "decayingTurbulenceInfowGenerator", not found among BCs,Do I have to create my own dummy solver with links to the newly compiled libray? I tried running pimpleFoam, it did not work |
||
July 10, 2020, 06:14 |
|
#15 | |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12 |
Quote:
Hi I've made it compilable in OpenFOAM-7. Here is my code and reference case: https://github.com/ZhangYanTJU/boundaryConditions
__________________
https://openfoam.top |
||
July 10, 2020, 21:16 |
|
#16 | |
Member
Join Date: Oct 2013
Posts: 92
Rep Power: 13 |
Quote:
|
||
July 10, 2021, 15:20 |
|
#17 |
Member
Join Date: Jan 2017
Posts: 71
Rep Power: 9 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 14:55 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
Accessing multiple boundary patches from a custom boundary condition file | ripudaman | OpenFOAM Programming & Development | 0 | October 22, 2014 19:34 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |