Re: volume visualization and isosurface of axisymmetric data [message #73665] |
Tue, 23 November 2010 06:02  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article
<9a6a2ebb-62e2-484a-98ef-e86da2ce0127@k30g2000vbn.googlegroups.com>,
Andrea <negri.andre@gmail.com> wrote:
> Hi guys, I have a hydrodynamic simulation of an axisymmetric system of
> gas.
> Of couse the computation (I use ZEUS2D) is made in cylindrical
> coordinates (R,phi,z) so, computationally speaking, the simulation is
> 2D, and in IDL I have a matrix, eg density[i,j] where the first index
> refer to z axis and second index refer to R axis. Physically speaking
> this a section of a 3D space with phi = costant, ie a meridional
> plane.
>
> Until now I made maps with contour (David Fanning will forgive me, I
> saw FSC_Contour only last week!) on meridional plane, but now I should
> make some 3D isosurface, but I have a 2D array, and I don't know a way
> to tell to iVolume that the system is axisymmetric.
> iVolume (or the counterpart in direct graphics) accept only 3D matrix
> in cartesian coordinates, right? Because if iVolume accept a matrix in
> cylindrical coordinates, eg [phi,z,R] instead of [x,y,z], I can build
> a 3D matrix of density like this:
>
> density3D[i,*,*]=density2D[*,*]
>
> where i go on the phi campionation of the space.
>
> This trick is possible or I have to move on another program, like
> tecplot? I want use IDL as long as possible, since my analizing
> program is written in IDL.
>
>
> Thanks a lot for help.
> Andrea
Because the iTools 3-D visualization programs only deal with
Cartesian coordinates, you will need to interpolate from
cylindrical to Cartesian coordinates to plot 3-D volumes
(e.g., isosurfaces or rendered volumes).
Because the flow is axisymmetric, you know the flow as
a function of (phi,z,r). So the basic idea is to create
a 3-D Cartesian grid (x,y,z), find (z,r) for each (x,y,z)
on the Cartesian grid, then interpolate from your
2-D slice to the 3-D grid points. Because the flow
is axisymmetric, you don't need to interpolate in phi.
This procedure is easier than it sounds. The real work
is in computing the interpolation coordinates. That is,
where the Cartesian grid points are with respect to the
cylindrical grid. I suggest that you use INTERPOLATE with
bilinear interpolation, and you might want to look at this
http://csrp.tamu.edu/pdf/idl/sample_chapter.pdf
Ken Bowmabn
|
|
|