comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: volume visualization and isosurface of axisymmetric data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: volume visualization and isosurface of axisymmetric data [message #73665] Tue, 23 November 2010 06:02 Go to next message
Kenneth P. Bowman is currently offline  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
Re: volume visualization and isosurface of axisymmetric data [message #73757 is a reply to message #73665] Tue, 23 November 2010 09:55 Go to previous message
Andrea[1] is currently offline  Andrea[1]
Messages: 7
Registered: November 2010
Junior Member
On Nov 23, 3:02 pm, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> In article
> < 9a6a2ebb-62e2-484a-98ef-e86da2ce0...@k30g2000vbn.googlegroup s.com >,
>
>
>
>  Andrea <negri.an...@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

Sounds good, now I try!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Complicated Latex typesetting for IDL ledgend
Next Topic: idlwave w/ idl8?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:11:29 PDT 2025

Total time taken to generate the page: 0.00414 seconds