|
[Sponsors] |
November 8, 2012, 12:29 |
LES inlet boundary conditions
|
#1 |
Senior Member
Join Date: Nov 2012
Posts: 171
Rep Power: 14 |
Hi everyone,
I am new here. Can I ask a question about how to implement the LES inlet boundary conditions in openfoam? To my limited knowledge, there are two methods: TurbulentInlet and Mapped. I am simulating a swirling flow, and so in the inlet I should specify the axial and tengential velocities, which is realized through swak4foam. However, in order to use mapped boundary condition, I think I need to designate the inlet boundary as mapped. This will require me to change the groovyBC type for the inlet. These two things conflict. I do not how to solve this problem. Does anyone have the related experience about this problem? In other words, my question is: in the type of TurbulentInlet or mapped boundary condition, how to use groovy or swak4foam at the same time? Thank you in advance. hz Last edited by hz283; November 8, 2012 at 17:30. Reason: typos |
|
December 1, 2012, 18:06 |
|
#2 |
Member
Join Date: Jul 2012
Posts: 66
Rep Power: 14 |
I have the same question!
How can I use a logarithmic inlet profile using groovy, and in the same time use TurbulentInlet to create fluctuations?? Did you get an answer? |
|
December 2, 2012, 05:06 |
turbulentRadialProfile
|
#3 |
Senior Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 123
Rep Power: 18 |
Hi!
A while back I wrote an BC that combined the turbulentInlet from 2.0 and timeVaryingUniform. The former has synthetic turbulence and the latter interpolates a fixedValue as a function of time from a user supplied list. What this bc (turbulentRadialProfile) does is to read a list (tuple) which has a field as a function of radius. It uses the list as a reference field and then applies the same turbulence as turbulentInlet. The user has to supply the center of the inlet and the radius is calculated as , where is the positionvector. In the attached gz there are two similar BCs, radialProfile which is the same as the above but doesn't use turbulence. xyzTurbulentProfile takes an unstructured list (tuple) of position and field. The interpolation is rubbish but works with unstructured data, just use many points. just extract the file and go into each directory and run Code:
wmake libso I haven't tested it with 2.1 but I suspect it only requires minor modifications. Edit: hope fully added file =) Best Nicolas Last edited by nsf; December 3, 2012 at 01:23. |
|
December 2, 2012, 19:47 |
|
#4 |
Senior Member
Join Date: Nov 2012
Posts: 171
Rep Power: 14 |
Hi nsf,
Thank you very much for your reply, but I did not find the attachment you mentioned... I really appreciate if you can nicely attach it again. hz |
|
August 20, 2013, 10:08 |
Using the BC for turbulent inlet for LES-VOF
|
#5 |
New Member
Kshitij kunte
Join Date: Jun 2011
Posts: 18
Rep Power: 15 |
I'm simulating a liquid atomization inside a cylindrical nozzle with inlet of 0.6 mm. I have run a few cases where I found that the turbulence for my case is on the lower side, when specifying a normal fixedValue inlet. From the forum I found that a synthetic turbulent boundary condition for the velocity inlet can be useful for my case. I'm specifying a uniform velocity of 50 m/s at the inlet.
Do you think the boundary condition written by you would be useful for my case. If yes how can implement it for my case. Any help regarding above would be of a great use. Thanking in anticipation |
|
August 20, 2013, 13:20 |
|
#6 |
Senior Member
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15 |
If you want, I just finished implementing Lund's recycling method in OpenFOAM (thanks to Perry Johnson). It seems to work just fine on a single processor, but I still can't run it in parallel. As soon as I find the solution, I'll upload it if you want.
Maybe one of you might be able to help. Actually, everything works just fine. The velocity field URecycled at the inlet is computed just as it should (I checked). However, when I do operator==(URecycled); I receive the following error. [1] #0 Foam::error:rintStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" [1] #1 Foam::sigFpe::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" [1] #2 in "/lib/x86_64-linux-gnu/libc.so.6" [1] #3 Foam::scaledMappedVelocityFixedValueFvPatchField:: updateCoeffs() in "/home/gatech/OpenFOAM/gatech-2.2.0/platforms/linux64GccDPOpt/lib/libScaledMappedVelocityBCMPI.so" [1] #4 Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<doub le>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) in "/opt/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/bin/pimpleFoam" [1] #5 [1] in "/opt/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/bin/pimpleFoam" [1] #6 [1] in "/opt/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/bin/pimpleFoam" [1] #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" [1] #8 [1] in "/opt/OpenFOAM/OpenFOAM-2.2.0/platforms/linux64GccDPOpt/bin/pimpleFoam" [shorthair:14372] *** Process received signal *** [shorthair:14372] Signal: Floating point exception (8) [shorthair:14372] Signal code: (-6) [shorthair:14372] Failing at address: 0x3e800003824 [shorthair:14372] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f350a6044a0] [shorthair:14372] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f350a604425] [shorthair:14372] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7f350a6044a0] [shorthair:14372] [ 3] /home/gatech/OpenFOAM/gatech-2.2.0/platforms/linux64GccDPOpt/lib/libScaledMappedVelocityBCMPI.so(_ZN4Foam42scaledMa ppedVelocityFixedValueFvPatchField12updateCoeffsEv +0x2ba) [0x7f350295ce1a] [shorthair:14372] [ 4] pimpleFoam(_ZN4Foam8fvMatrixINS_6VectorIdEEEC1ERKN S_14GeometricFieldIS2_NS_12fvPatchFieldENS_7volMes hEEERKNS_12dimensionSetE+0x26e) [0x434a5e] [shorthair:14372] [ 5] pimpleFoam() [0x434c13] [shorthair:14372] [ 6] pimpleFoam() [0x41991c] [shorthair:14372] [ 7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f350a5ef76d] [shorthair:14372] [ 8] pimpleFoam() [0x41c9bd] [shorthair:14372] *** End of error message *** -------------------------------------------------------------------------- mpirun noticed that process rank 1 with PID 14372 on node shorthair exited on signal 8 (Floating point exception). Would someone know how to solve this?? Thank you very much!! Joachim |
|
August 21, 2013, 06:11 |
|
#7 |
New Member
Kshitij kunte
Join Date: Jun 2011
Posts: 18
Rep Power: 15 |
Hi
Can you please upload those files, I can try it on my case and see if it runs. As far as the error is concerned I'm not that great at debugging and cannot tell you why it is not working. |
|
August 21, 2013, 14:38 |
|
#8 |
Senior Member
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15 |
Hum, your domain is a circular cylinder? Then Lund's method will not work. You can only use it on flat plates or similar geometries. There might be some analogous recycling methods though for your specific case.
Good luck! |
|
August 26, 2013, 15:15 |
|
#9 |
Senior Member
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15 |
problem solved. It seems that you cannot use any loop other than forAll in your code, if you want to parallelize it...
for example, I had something like label k; for (k = 0; k < N; k ++) { lala[k] = ...; etc } Apparently, OpenFOAM did not like that. I don't really know why yet. |
|
August 26, 2013, 15:50 |
|
#10 | |
Senior Member
Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 123
Rep Power: 18 |
Quote:
Code:
/** * \def forAll(list, i) * Loop across all elements in \a list * \par Usage * \code * forAll(anyList, i) * { * statements; * } * \endcode * \sa forAllReverse */ #define forAll(list, i) \ for (Foam::label i=0; i<(list).size(); i++) |
||
August 26, 2013, 15:58 |
|
#11 |
Senior Member
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15 |
While debugging, I isolated the lines that were generating the error. The problem basically came from all my loops.
Changing label k; for (k = 0; k < N; k ++) { lala[k] = ...; etc } to forAll (patch(), patchI) { lala[patchI] = ...; etc if(patchI == N-1) { break; } } solved my problem. However, the solution is really not that elegant! |
|
August 26, 2013, 20:00 |
|
#12 | |
Senior Member
Join Date: Jan 2013
Posts: 372
Rep Power: 14 |
Hi
I think this is related the parallel running, since forAll can be directly used in parallel computations. Can you use your own looping in the serial computations? Quote:
|
||
August 26, 2013, 21:13 |
|
#13 |
Senior Member
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15 |
Yep, the "k-loop" works just fine on a single processor. The problem only appears when using mpirun.
|
|
February 5, 2018, 05:03 |
|
#14 |
Member
Ardalan
Join Date: Jul 2012
Location: Atlanta, USA
Posts: 77
Rep Power: 14 |
Hi Joachim,
I know this is an old post. Do you have any intention to share the Lund's BC code? If so, we will be happy to use it in our OpenFoam course at Chalmers. Sincerely, Ardalan |
|
February 5, 2018, 08:46 |
|
#15 |
Senior Member
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15 |
Hi,
If you're interested, the code has already been shared earlier in this thread. Feel free to email me if you want additional files (initialization code, test case, etc.). These are too large and can't be attached here. Good luck with the OpenFOAM course, I think it's pretty great. Best, Joachim |
|
December 3, 2018, 05:51 |
|
#16 |
Senior Member
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8 |
Hi Joachim,
I need this BC for my DNS simulation, can you share the code and additional files to me? My email is 32420171152101@stu.xmu.edu.cn Thank you very much. |
|
December 16, 2019, 10:41 |
|
#17 | |
New Member
Shawn
Join Date: Dec 2019
Posts: 5
Rep Power: 7 |
Quote:
Could you please share the code and additional files to me? I want to test it with my LES simulation. My email is shawnhu94@gmail.com. Thank you very much. |
||
December 29, 2019, 17:59 |
|
#18 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Never ever use 'turbulentInlet' BC as an LES velocity inlet BC. The name is very unfortunate since it does not produce turbulence-alike time-series, but stuck due to historical reasons. Please use `turbulentDFSEM` or `turbulentDigitalFilter` BCs of OpenFOAM.com version if you are interested in synthetic inflow methods.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
CFX13 Post Periodic interface | EtaEta | CFX | 7 | December 8, 2011 18:15 |
Inlet boundary conditions | Mattia | CFX | 0 | February 9, 2009 14:25 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 07:18 |
user soubroutine of inlet boundary conditions | Charlie Beghein | Siemens | 2 | August 30, 2002 03:03 |