Turbulence plugin, setting input plane

Hello,

I’m trying to understand how to correctly use the turbulence plugin.
I want to generate eddies in my inlet plane with is in the yz plane.

I have set

[solver-plugin-turbulence]
turbulence-intensity = 1
sigma = 0.7
avg-u = 68.277
turbulence-length-scale = 0.002
avg-rho = 2.04
avg-mach = 0.2
y-dim = 0.396
z-dim = 0.0108
centre = (0.0, 0.198, 0.0054)
rot-axis = (0, 0, 1)
rot-angle = 0

but if I look at the eddies they’re generated on the xz plane.

What should be the correct config?

Best regards

Is the flow in the x direction? Could you provide some more context to the image i.e. domain boundaries, injection box location etc. Your setup file should be correct for a yz plane injection. But I note that your injection plane has an aspect ratio of about 40:1, so will look like a line? Also, can you confirm that you have sufficient grid resolution to resolve eddies with a scale of 0.002? Thanks.

Hello,

I do apologize for the delay in the response:

  • yes I have enough resolution since my box has an average spacing between adjacent elements that is 0.0007 and I’m using 4th order polynomials

  • the inlet plane has an aspect ratio of 4

  • the flow should be aligned in the streamwise direction (nominally x)

  • my injection box location is the full inlet plane (the one at the most left)

Best regards

Hi,

Given:

y-dim = 0.396
z-dim = 0.0108

Is the aspect ratio of your injection plane closer to 40 than 4?

Just want to clarify before progressing further.

Peter

Hi @p.vincent ,
you’re right it was a typo in the cfg file but the mesh extent is 0.0396 hence an aspect ratio of 4.

Regards

To add to this a visualization of the tavg box (tavg of upup). You can see that eddies are generated not on the inlet plane but rather on the boundaries as the previous Q showed

Thanks. Could you share the full .ini file (and if possible the mesh) and I can take a closer look. Thanks again for your efforts testing this.

Let me know if you can download the mesh @p.vincent
mesh: https://we.tl/t-Ccy3Dlr3WU

inifile:

[backend]
precision = double
rank-allocator = linear

[constants]
rhoInf = 2.04
gamma = 1.4
uInf = 68.277            
vInf = 0.0
wInf = 0.0
pInf = 170000    
mu = 0.0000986   
Pr = 0.71
FTT = 0.0007909

[solver]
system = navier-stokes
order = 4   
anti-alias = flux,surf-flux

[solver-time-integrator]
formulation = std
scheme = rk45
controller = pi
atol = 1e-6
rtol = 1e-6
tstart = 0.0
tend = 0.04
dt = 1e-07

[solver-interfaces]
riemann-solver = roem
ldg-beta = 0.5
ldg-tau = 0.1

[solver-elements-hex]
soln-pts = gauss-legendre
quad-deg = 11  
quad-pts = gauss-legendre

[solver-interfaces-quad]
flux-pts = gauss-legendre
quad-deg = 11 
quad-pts = gauss-legendre

[soln-plugin-writer]
dt-out = 0.0001
basedir = /mimer/NOBACKUP/groups/kthmech/dafiero/Codes/TurbulenceBox/Boxpyfrs
basename = box-{t:.10f}

[soln-plugin-nancheck]
nsteps = 1000

[solver-plugin-turbulence]
turbulence-intensity = 1
sigma = 0.7
avg-u = 68.277
turbulence-length-scale = 0.002
avg-rho = 2.04
avg-mach = 0.2
y-dim = 0.396
z-dim = 0.0108
centre = (0.0, 0.198, 0.0054)
rot-axis = (0, 0, 1)
rot-angle = 0

[soln-bcs-inlet]
type = char-riem-inv
rho = rhoInf
u = uInf
v = vInf
w = wInf
p = pInf

[soln-bcs-outlet]
type = sub-out-fp
p = pInf

[soln-ics]
rho = rhoInf  
u = uInf  
v = vInf  
w = wInf  
p = pInf  

I think your domain goes from 0 to -0.0108 in z. Therefore you need to have:

centre = (0.0, 0.198, -0.0054)

(note the negative sign).

I think currently you are injecting the vortices outside of the domain, and then the edge of the injection box is clipping the side of your domain, and then propagating to the other side via (I guess) a periodic BC in z?

I’d also change

y-dim = 0.396 → y-dim = 0.0396 to match the y extent of the domain, and correspondingly the y centre to 0.0198 (but this is not the cause of the issue, just for neatness).

Could you try these changes and see if they fix things?

Peter

Currently running, I’ll update you

Best regards

Hi @p.vincent, I’ve gone through some testing and it seems that generally TI is underestimated by a 30-40%, is this an expected behaviour? May the sigma value can have an impact on this?

Best regards

Can you share some more details of the setup, and how/where you measured the TI? Was it measured at the injection plane or some distance downstream?

Mesh and setups are those previously shared, I’ve measured TI through the full streamwise extent of the domain. It has a peak that is 30-40% lower than the chosen value and then it has a more or less linear decay rate in space

Best regards

How did you select the turbulent length scale?

Regards, Freddie.

It is a close value to the one of an experimental campaign.
Do you think it can have an effect on TI? If so in which part of the SEM?

Best regards

Sorry for slow reply, have been on holiday for the Christmas break. Can you share the formula that you used to calculate the TI. Also, can you confirm the y and z coordinates of the stream-wise (x-wise) line along which you calculate TI?

Hi @p.vincent,

Also, can you confirm the y and z coordinates of the stream-wise (x-wise) line along which you calculate TI?

I just used 10 slices linearly spaced along the x dimension of the box

Can you share the formula that you used to calculate the TI

TI = (sqrt(uu + vv + ww) / U_inf) * 100

Let me know if this suffice,

Best regards

I think you might need a 1/3 inside the sqrt? Also, uu, vv, ww should be averages of u’u’, v’v’ w’w’, respectively? Also, can you confirm that you average in space within each slice, as well as in time?

I think you might need a 1/3 inside the sqrt?.

You’re right, then the undershoot is more severe

Also, uu, vv, ww should be averages of u’u’, v’v’ w’w’, respectively?

Yes they are

Also, can you confirm that you average in space within each slice, as well as in time?

Yes each slice is a time averaged value and the values of u’_i u’_i are also spatial averaged within that slice

Thanks for info. Could you try not space averaging in z, and look at the TI levels as a function of x at different z locations. The injected eddies do not currently satisfy periodicity, so if a periodic direction is of a similar length scale to that of the eddies (which is the case for the z-wise domain extent here) then you might see a drop off in TI near the z boundaries. If this is the issue, I can look at making a PR to ensure the eddies satisfy periodicity.