Issues with sponge setup

9 views
Skip to first unread message

Saarthak Gupta

unread,
Mar 15, 2026, 4:23:47 PM (3 days ago) Mar 15
to Nek5000

Hello Nek users,


I'm simulating a transitional boundary layer over a flat plate. The domain is initialized using the Blasius solution. The boundary conditions imposed are as follows:

Streamwise (x): Dirichlet ('v') at the upstream boundary with freestream disturbances imposed using userbc and 'O' boundary condition at the downstream boundary.

Wall-normal (y): 'W' at y = 0 and 'ON' at y = y_max

Spanwise (z): Periodic

I added a sponge region near the downstream boundary to suppress large-amplitude vortical fluctuations and relax the solution toward the initial Blasius profile. The sponge forcing is prescribed in userf as shown below:



subroutine userf(ix,iy,iz,eg)

include 'SIZE'
include 'TOTAL'

integer eg,e
double precision xsp_st, xsp_end, xsp_c, xval_loc
double precision sp_max, alpha_sp, sigma_val
double precision sigma_sp, sigma_sp_st, sigma_sp_end

common /myblas/ ub(lx1,ly1,lz1,lelt), vb(lx1,ly1,lz1,lelt)

e = gllel(eg)

c --- sponge parameters
xsp_st = 3400.0
xsp_end = 3600.0
xsp_c = 3500.0

sp_max = 0.025
alpha_sp = 0.15

xval_loc = xm1(ix,iy,iz,e)

sigma_sp_st = 1/(1 + exp(-alpha_sp*(xsp_st - xsp_c)))
sigma_sp_end = 1/(1 + exp(-alpha_sp*(xsp_end - xsp_c)))

sigma_sp = 0.0

if (xval_loc .gt. xsp_st) then
   sigma_val = 1/(1 + exp(-alpha_sp*(xval_loc - xsp_c)))
   sigma_sp = sp_max * (sigma_val - sigma_sp_st)
   sigma_sp = sigma_sp / (sigma_sp_end - sigma_sp_st)
endif

ffx = -sigma_sp * (vx(ix,iy,iz,e) - ub(ix,iy,iz,e))
ffy = -sigma_sp * (vy(ix,iy,iz,e) - vb(ix,iy,iz,e))
ffz = -sigma_sp * (vz(ix,iy,iz,e))

t(ix,iy,iz,e,1) = sigma_sp
t(ix,iy,iz,e,2) = ffx
t(ix,iy,iz,e,3) = ffy
t(ix,iy,iz,e,4) = ffz

return
end


The simulation ran for roughly two computational domain flow-through times but blew up at the downstream boundary. I increased the sponge forcing and modified the sponge region as shown above. Previously, I was starting the sponge from x = 3450 with sp_max = 0.02 and alpha_sp = 0.025. In both cases, the flow-field dynamics and the eventual blowup are identical.

I also output the fields ffx, ffy, and ffz stored in t(:,:,:,:) variable using outpost2 called from userchk. These fields are non-zero, but I am not certain they are being used correctly by the solver.

I realize there are better ways to implement this in production runs, but for now, I am trying to figure out if I’ve missed something in the implementation.

Philipp Schlatter

unread,
Mar 16, 2026, 3:11:48 AM (3 days ago) Mar 16
to nek...@googlegroups.com

does the sponge do what it is supposed to do (i.e. to damp disturbances) when the simulation is still alive? Perhaps you could try to reduce the amplitude instead, to see whether that renders the simulation stable?

Best regards,
Philipp

--
You received this message because you are subscribed to the Google Groups "Nek5000" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/nek5000/741bc4d0-6935-4f58-97c5-3e68d9511197n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages