Numerical disturbances near the entrance boundary

Hello everyone, I tried to calculate the boundary layer for Ma=0.5,

[constants]
M = 0.5
gamma = 1.4
Pr = 0.72
rhoin = 0.10518E+00
uin = 0.17015E+03
vin = 0.0
pin = 0.30450E+04
mu = 0.17896E-04
cpTref = 101326.29777524246
cpTs = 40827.44599002443

but there is a numerical perturbation near the inlet, I tried type = sub-in-frv and type = char-riem-inv the results are not good, could it be a problem with the mesh?


Or a special treatment of the boundary.
By the way, is the initial value mandatory, I specified u = uin*tanh(y)+0.001 for the initial value.

Best regards.

Check that the two boundary conditions are consistent with each other at the bottom left point.

Regards, Freddie.

I’m sorry that I didn’t understand what you mean.

Can you explain it further?

In the picture, the left side is the entrance boundary, and the bottom is the non-slip wall.

Best regards.

Those conditions are not consistent. At the bottom left point the bottom BC wants to impose the no slip condition (zero velocity). However, at this same point the left BC wants to impose an inflow velocity which is non-zero.

Regards, Freddie.

Thank you very much.

I understand what you mean,

I specified the inflow value at the left entrance boundary, so it caused a conflict between non-zero speed and non-slip wall conditions.

but is there any solution? I think the wall boundary condition should be non-slip, unless it is a thin gas or something.

Regards, Wgbb.

You probably want an isothermal wall.

Regards, Freddie.

Thank you for your help!
I was using the isothermal wall conditions were there is some variation, but a new problem has arisen where the pressure and density jumps and gets weird after the first layer of mesh near the wall in the y-direction.

[soln-bcs-wall]
# type = no-slp-adia-wall
type = no-slp-isot-wall
cpTw = cp*Tw



I was using the isothermal wall conditions were there is some variation, but a new problem has arisen where the pressure and density jumps and gets weird after the first layer of mesh near the wall in the y-direction.

I suspect that there is some detail that I am overlooking, I just want to run a smooth flat plate with Ma=0.5 for a validation test of the program.

I’ve also tried assigning bit hyperbolic tangent to the initial value and inlet exit, and adding the near-wall mesh, std and dual methods, but nothing works, and I also get this jump in pressure and density.

Can you help to see if there is something particularly stupid in my configuration file? Thank you for your help!

[backend]
precision = single  ; double

; [backend-cuda]
; device-id = local-rank 

[constants]
M = 0.5
gamma = 1.4
Pr = 0.72
rhoin = 0.10518E+00
uin = 0.17015E+03
vin = 0.0
pin = 8699.894153171993    ; 0.30450E+04
mu = 0.17896E-04
cpTref = 289500.18573970324  ; 101326.29777524246
cpTs = 116648.42648852512   ; 40827.44599002443
cp = 1005.0
Tw = 334.9

[solver]
system = navier-stokes
order = 1
;anti-alias = flux
;shock-capturing = artificial-viscosity
viscosity-correction = sutherland

;[solver-artificial-viscosity]
;max-artvisc = 0.01
;s0 = 0.01
;kappa = 5.0 ; 10.0

[solver-time-integrator]
formulation = std
scheme = rk34  ; tvd-rk3 ,rk45
controller = pi  ,none
tstart = 0.0
tend = 1000
dt = 1.0E-9
atol = 1.0E-6 ; 1.0E-6 
rtol = 1.0E-6
errest-norm = l2  ; uniform  ; l2
safety-fact = 0.9
min-fact = 0.3  ; 0.3
max-fact = 2.5  ; 2.5
; dt-max = 1.0E-7

; [solver-time-integrator]
; formulation = dual
; scheme = sdirk33
; pseudo-scheme = rk34  ; tvd-rk3
; controller = none  
; pseudo-controller = local-pi  ; none
; tstart = 0.0
; tend = 100000.0
; dt = 1e-6
; pseudo-dt = 5e-7
; pseudo-niters-min = 10
; pseudo-niters-max = 10
; pseudo-resid-norm = l2
; pseudo-resid-tol = 1e-6
; atol = 1e-6
; pseudo-dt-max-mult = 2.5

; [solver-dual-time-integrator-multip]
; pseudo-dt-fact = 1.75
; cycle = [(3, 1), (2, 1), (1, 1), (0, 2), (1, 1), (2, 1), (3, 3)]
; [(2,1),(1,1),(0,5),(1,2),(2,4)]

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

[solver-interfaces-line]
flux-pts = gauss-legendre

[solver-elements-tri]
soln-pts = williams-shunn
quad-deg = 10     
quad-pts = williams-shunn

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

[soln-plugin-nancheck]
nsteps = 10

[soln-plugin-residual] 
nsteps = 10
file = residual.csv
header = true

[soln-plugin-dtstats]
flushsteps = 10
file = dtstats.csv
header = true

; [soln-plugin-pseudostats]
; flushsteps = 10
; file = pseudostats.csv
; header = true

[soln-bcs-inlet]
; type = char-riem-inv
; rho = rhoin
; u = uin
; # u = uin*tanh(y)
; v = vin
; p = pin
type = sub-in-frv
rho = rhoin
u = uin
v = vin
p = pin

[soln-bcs-outlet]
# type = char-riem-inv
# rho = rhoin
# u = uin
# u = uin*tanh(y)
# v = vin
# p = pin
type = sub-out-fp
p = pin

[soln-bcs-wall]
; type = no-slp-adia-wall
type = no-slp-isot-wall
cpTw = cp*Tw
; u = uin
; v = 0

[soln-bcs-far]
; type = char-riem-inv
; rho = rhoin
; u = uin
; v = vin
; p = pin
type = sub-out-fp
p = pin

[soln-ics]
rho = rhoin
u = uin  ; 0.0
v = vin
p = pin
; u = uin*tanh(y)
; # u = uin*tanh(y)+0.001

[soln-plugin-writer]
dt-out =  1e-3                 
basedir = .               
; basename = 2d-single-{t:.2f} 
basename = 2d-{n:03d}  
post-action = echo -e "\nWrite file {soln} at time {t:.2f} for mesh {mesh}."

Regards, Wgbb.

Hello,
I also using PyFR to simulate the turbulent boundary layer recently, in my analysis, I use a Polynomial fitted flat plate Blasius solution for the initial condition and inflow boundary condition, the wall type is no-slp-adia-wall, this works well for me.
Thanks

List item

Hello,

Thank you for your suggestion. My original intention was to compare the results with the blasius solution.
Based on your suggestion, I tried polynomial fitting, but found that the local fitting was not very good. Can you tell me which functions you used for fitting?

I used from scipy. optimize import curve_fit to fit at a speed of u, a * (np. tanh (b * yy-g)/h)+f. But it still diverges.

Did you only specify the velocity profile, and did you specify the density and pressure?
Thank you for your help!

Good wishes

Another approach is to extend your domain forward a bit and use a adiabatic slip wall BC on the lower boundary of that extension to allow for the flow field to develop a bit more naturally ahead of the boundary layer region. This is somewhat common for boundary layer simulations (particularly ones where you don’t have an exact expression for the density/velocity/pressure profiles) and is effectively identical to simulating a two-sided flat plate in a free stream (since the adiabatic slip wall BC is a symmetry BC). You can then use a constant velocity/pressure field for the inlet.

Thank you for your help. It was very effective and the problem was resolved.

Good wishes.