[FLASH-USERS] diffusion coefficients
Christoph Federrath
christoph.federrath at monash.edu
Fri Aug 16 00:56:32 EDT 2013
Dear FLASH users,
I'm using viscous and magnetic diffusion in FLASH4.0.1. I recently had a problem with numerical instability for relatively large magnetic diffusion. I was able to fix this by reducing CFL to 0.4 instead of 0.8, but normally it should work fine for CFL = 0.8. So, I looked into Diffuse_computeDt.F90 and saw some things that I don't fully understand and that maybe one of you can answer.
The first thing is viscous diffusion:
if (useDiffuseVisc) then
call Viscosity(xtemp, xdens, massfrac, visc_zone_unusedHere, viscKinematic)
!!$ if (viscKinematic > max_diffusivity(i,j,k)) then
!!$ max_diffusivity(i,j,k) = viscKinematic * 2.0
!!$ endif
max_diffusivity(i,j,k) = max_diffusivity(i,j,k) + viscKinematic * ((8*NDIM-4)/3.0)
endif
Some lines have been commented there in the public release and replaced by that line with the factor ((8*NDIM-4)/3.0) at the end. What is that factor and where does it come from? Does this factor apply equally in split and unsplit implementations?
And then more importantly for my problem of instability, further down in Diffuse_computeDt.F90 comes the magnetic resistivity part for constraining the timestep:
if (useDiffuseMagneticResistivity) then
call MagneticResistivity(xtemp,xdens,massfrac,magResist)
if (magResist > max_diffusivity(i,j,k)) then
max_diffusivity(i,j,k) = magResist
endif
end if
Why is the magnetic resistivity not added to the max_diffusivity like for the viscous? Should it or not, I'm not sure? Adding it would certainly be safer, but maybe not necessary. And why is there no factor here like above for viscous diffusion?
I also note that using dt_diff_factor = 0.5 (instead of the standard 0.8) also solves my particular stability problem, but I would like to understand why, because 0.8 should be fine in theory. And maybe it is just a coincidence that this works and if I set the diffusion even higher, it might break again.
Thanks for your help and kind regards,
Christoph
________________________________
Dr. Christoph Federrath
School of Mathematical Sciences,
Monash University,
Clayton, Vic 3800, Australia
+61 3 9905 9760
http://www.ita.uni-heidelberg.de/~chfeder/index.shtml?lang=en
More information about the flash-users
mailing list