CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Shock-bubble interaction and potential grid error (https://www.cfd-online.com/Forums/main/213034-shock-bubble-interaction-potential-grid-error.html)

selig5576 December 12, 2018 11:31

Shock-bubble interaction and potential grid error
 
1 Attachment(s)
Hello,

I was curious if anyone has had experience with shock-bubble interactions. Before I go further with my issue, I want to first say that I have validated my code on Rayleigh-Taylor instability, Kelvin-Helmholtz instability, and various Riemann problems.

On to my issue. When defining my bubble I am using the classical formula

sqrt((X(i,j,k)-XCenter)^2.0 + (Y(i,j,k)-YCenter)^2.0 + (Z(i,j,k)-ZCenter)^2.0) < r

However I notice that when I use a non-square domain (lets say a 3 x 1 x 1 domain), my simulation blows up (NaNs.) After some time I noticed that if I remove the bubble, I do not have blow up. Maybe this is the wrong conclusion, but is it possible the way I'm defining my bubble numerically problematic?

In terms of my problem setup. On the inflow and outflow I have Neumann BCs (i.e. dq/dn = 0) and on the walls I have reflective boundary conditions.

As a little code snippet (not too important) here is how I am defining my IC:

Code:

       
!Bubble
if ((X(i,j,k)-0.50)**2.0 + (Y(i,j,k)-0.50)**2.0 + (Z(i,j,k)-0.50)**2.0 <= 0.1**2.0) then
rho(i,j,k) = 0.1358
u(i,j,k) = 0.0
v(i,j,k) = 0.0
w(i,j,k) = 0.0
p(i,j,k) = 1.0
gamma = 1.67
else
!Pre-shock
rho(i,j,k) = 1.0
u(i,j,k) = 0.0
v(i,j,k) = 0.0
w(i,j,k) = 0.0
p(i,j,k) = 1.0
gamma = 1.4
end if

!Post-shock
if (X(i,j,k) > 0.9) then
rho(i,j,k) = 0.13764
u(i,j,k) = -0.394
v(i,j,k) = 0.0
w(i,j,k) = 0.0
p(i,j,k) = 1.5698
gamma = 1.4
end if



All times are GMT -4. The time now is 01:24.