LES inlet boundary conditions

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 8, 2012, 12:29 LES inlet boundary conditions #1 Senior Member   Join Date: Nov 2012 Posts: 168 Rep Power: 5 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: 64 Rep Power: 6 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
#3
Senior Member

Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 102
Rep Power: 8
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
there is an working example with each BC.

I haven't tested it with 2.1 but I suspect it only requires minor modifications.

Edit: hope fully added file =)

Best

Nicolas
Attached Files
 nicolasBCs.gz (21.4 KB, 92 views)

Last edited by nsf; December 3, 2012 at 01:23.

 December 2, 2012, 19:47 #4 Senior Member   Join Date: Nov 2012 Posts: 168 Rep Power: 5 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, 09:08 Using the BC for turbulent inlet for LES-VOF #5 New Member   Kshitij kunte Join Date: Jun 2011 Posts: 17 Rep Power: 7 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, 12:20 #6 Senior Member   Joachim Join Date: Mar 2012 Location: Atlanta Posts: 140 Rep Power: 7 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 >::fvMatrix(Foam::GeometricField, 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 cfdonline2mohsen likes this.

 August 21, 2013, 05:11 #7 New Member   Kshitij kunte Join Date: Jun 2011 Posts: 17 Rep Power: 7 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, 13:38 #8 Senior Member   Joachim Join Date: Mar 2012 Location: Atlanta Posts: 140 Rep Power: 7 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, 14:15 #9 Senior Member   Joachim Join Date: Mar 2012 Location: Atlanta Posts: 140 Rep Power: 7 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, 14:50
#10
Senior Member

Nicolas Edh
Join Date: Mar 2010
Location: Uppsala, Sweden
Posts: 102
Rep Power: 8
Quote:
 Originally Posted by Joachim 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.
As far as I can tell "forAll" is just a macro defined in UList.H

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++)
There is no apparent magic there (to me at least) so maybe there is something else that differs?

 August 26, 2013, 14:58 #11 Senior Member   Joachim Join Date: Mar 2012 Location: Atlanta Posts: 140 Rep Power: 7 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! cfdonline2mohsen likes this.

August 26, 2013, 19:00
#12
Senior Member

Join Date: Jan 2013
Posts: 308
Rep Power: 6
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:
 Originally Posted by Joachim 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:13 #13 Senior Member   Joachim Join Date: Mar 2012 Location: Atlanta Posts: 140 Rep Power: 7 Yep, the "k-loop" works just fine on a single processor. The problem only appears when using mpirun.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post hinca CFX 15 January 26, 2014 18:11 EtaEta CFX 7 December 8, 2011 18:15 Mattia CFX 0 February 9, 2009 14:25 Tudor Miron CFX 15 April 2, 2004 06:18 Charlie Beghein CD-adapco 2 August 30, 2002 02:03

All times are GMT -4. The time now is 07:45.

 Contact Us - CFD Online - Top