|
[Sponsors] |
How to add random velocity fluctuations using groovyBC |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 10, 2019, 08:52 |
How to add random velocity fluctuations using groovyBC
|
#1 |
New Member
Anton Shevchenko
Join Date: Jan 2018
Posts: 10
Rep Power: 8 |
Hello everyone!
I have been trying to add random velocity fluctuations to my 2D jet flow simulation. First I used turbulentInlet BC – and it did what I wanted, but I find it quite restricting now, as it just gives me a flat velocity profile where i would like to set a parabolic profile for example, and I would also like to add various pulsations to my velocity – not just random noise. So I opted for groovyBC, as it seemed to be able to do a lot of things at once. Anyway, the task seemed easy. What I did previously (constant velocity profile, fluctuations at 1% of initial velocity) with turbulentInlet looks like this: inlet { type turbulentInlet; referenceField uniform (6.0 0 0); fluctuationScale (0.06 0 0); value uniform (6.0 0 0); } so, the same thing with groovyBc would have to look like this: inlet { type groovyBC; variables ( "u0=6;" "noise=0.012*rand()-0.06;" "u=u0+noise;" ); valueExpression "vector(u,0,0)"; value uniform (0 0 0); } However, when I ran simulations side by side, the results came out to be very different. groovyBC certainly does something – the results are different from the simulations with no noise whatsoever, but the scale of random velocity pulses is nowhere near what I achieved with turbulentInlet (see attached screenshots of velocity profiles as measured near jet inlet) I am quite certain that I am doing some dumb mistake or overlooking something obvious, but still... Would be happy to hear any advice) Anton. |
|
June 13, 2019, 03:53 |
|
#2 |
New Member
Anton Shevchenko
Join Date: Jan 2018
Posts: 10
Rep Power: 8 |
Well, if anyone is interested – it was a typo in expression
"noise=0.012*rand()-0.06;" instead of "noise=0.12*rand()-0.06;" of course which i somehow managed to overlook.... okay, at least I was right about "obvious dumb mistake" There is the post about rand() in swak4foam: how to initialize a random velocity field with funkySetFields and an example on openfoam wiki: http://openfoamwiki.net/index.php/Co...RandomVelocity |
|
Tags |
groovybc, inlet boundary condition, openfoam, random perturbation., swak4faom |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Power law inlet velocity using groovyBC | aviator | OpenFOAM Community Contributions | 3 | November 13, 2013 11:50 |
[swak4Foam] groovyBC setting different directions for waves and velocity profile | kilroy | OpenFOAM Community Contributions | 1 | August 2, 2013 07:00 |
Random fluctuations at the inlet boundary for LES | underGroundMan | CFX | 3 | November 19, 2010 12:11 |
Random fluctuations at the inlet boundary | underGroundMan | CFX | 12 | July 17, 2008 19:16 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |