[i've been trying on and off for a week to get a post to appear on this
mailing list. do i have the magic now? hopefully just one of my attempted
posts will appear. apologies if this shows up multiple times, n.]
I am using openDX to process output from a 2D hydrocode. The hydrocode
can be run in either slab geometry (regular x-y coordinate system) or
in cylindrical geometry (r-z coordinates).
In examining the documentation for the various vector operators
implemented in openDX (gradient, divergence, and curl), I find nothing
which indicates they can be exercised in cylindrical geometry.
Is there something I am missing (quite possible), or is there a reason
why no cylindrical geometry option has been implemented for those
operators?
hi,
i've worked with dx and lots of data in different kinds of
coordinate systems. you do eventually have to convert
it to x,y before you actually plot up the results, but you
can choose how much of your computation you want
to do in cylindrical coordinates before you convert.
you don't have to do anything special to work in cylindrical
coordinates - all the modules will work just fine as is.
when do you want to change the coordinates, you do:
Mark(field, "positions");
Compute ("[a.y * cos(a.x), a.y * sin(a.x)]") ...or whatever the
conversion is between your coordinate system & cartesian.
i think this is right assuming that your coordinates are [r,z].
Unmark(field, "positions");
that converts the positions from cylindrical to rectangular.
if your data is scalar, you can leave it. if you have [r,z] vector
data, then you have to convert the data as well - but you don't
need the Mark/Unmark, just the same Compute as above.
if you want to do vector operations like you listed, or anything else -
like add cutting planes, you can do it in the [r,z] coordinate system,
without any special flags or settings, and then only do the conversion
to rectangular before you plot. it gives you different answers depending
on when you do the conversion, and you can choose which one matches
the physics of your problem best.
think about a cutting plane added in [r,z] space. when you cut at a
constant z and then convert to [x,y], you get a semi-circle. but if
you convert to [x,y] first and then cut at a constant y, you get a
straight line. you might want either or both of these depending on
your problem.
hope this helps,
nancy