Hi All,

I'm new to FLASH, and new to YT. We've been running 2D cylindrically symmetric 
laser-irradiated target simulations in FLASH. The computational domain is 
1200e-4 cm (1200 microns) in R, and 2400e-4 cm (2400 microns) in Z. Nblockx =2, 
Nblocky=2 with lrefine_max = 5 (number of AMR refinement levels). We have been 
using 

We've been using the following Python to read in with YT:

data = yt.load(filename)

slc = data.slice(2,0)

xmin, ymin, thetamin = data.domain_left_edge.d  # minimum domain coordinates in 
cm

xmax, ymax, thetamax = data.domain_right_edge.d # maximum domain coordinates in 
cm

Lx = (xmax - xmin)*1e4  # length of x-axis (r-axis in R-Z cylindrical geometry) 
in microns
Ly = (ymax - ymin)*1e4  # length of y-axis (z-axis in R-Z cylindrical geometry) 
in microns

Nx = int(Lx + 1)        #number of pixels in r-axis
Ny = int(Ly + 1)        #number of pixels in z-axis

and using "FixedResolutionBuffer" to map the variables of choice to a 2D array 
with dimensions of our choosing (here Nx=1201 and Ny=2401, where each pixel is 
effectively 1-micron x 1-micron) with the following:

frb = yt.FixedResolutionBuffer(slc,(xmin,xmax,ymin,ymax),(Ny,Nx), 
antialias=True)
dens = np.nan_to_num(np.array(frb["flash","dens"]))
eden = np.nan_to_num(np.array(frb["gas", "El_number_density"]))
Te = np.nan_to_num(np.array(frb["flash", "tele"]))/11605.0      # convert to eV

The images we get for dens, eden and Te look decent enough, but since we are 
trying to map to a uniform grid that is higher resolution than the actual 
simulation, we get "stair stepping" in some regions, especially where there's 
not much refinement occurring.

We think that our solution somehow might be in using "smooth_covering_grid" 
because we want the data to be interpolated on a finer grid, but so far have 
been having troubles.

Is there a way to use FixedResolutionBuffer so that it will interpolate to a 
finer resolution between the simulation grid cells, or how would be implement 
"smoothed_covering_grid" such that it will create 2D arrays with the desired 
number of rows and columns (Ny, Nx)?
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-le...@python.org
https://mail.python.org/mailman3//lists/yt-users.python.org
Member address: arch...@mail-archive.com

Reply via email to