Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a matrix of data of the form of 3 vectors R, Z, M1, M2, M3 ..., cylindric coordinates representing a measurement M of an axisymmetric hypersonic flow at the position R, Z (I don't measure along the theta coordinate).

http://pastebin.com/eDGZaFuT (not enough rep to post the link, sorry)

or get the file directly http://cl.ly/3e0e2M3U313n/download/He%2014K%20HD.pit

I have a very nice graph with the ListContourPlot function on which I'm able to do all my calculations. http://cl.ly/image/1430170n1o0u As you can see, the flow is mostly axysymmetric with the core at a precise temperature and well defined boundary layers, and ± values of R give the same X according to my precision of measure.

I am interested in plotting a pseudo-4D graphic, that would make several semitransparent 3D isosurfaces, for exemple in that case, 3 "cones" corresponding to surfaces T = 15, T = 14,T = 13

I tried defining function to draw a surface in a 3D polar plot, with a fixed R value (as a first approximation) and theta-inpendant, then combing these with Show, but it's not working. I also tried several other methods I found on this site, but I've been unable to make them work (either not what I'm looking for or not applicable because I have a list of points and not a function).

I'm debuting in Mathematica, so the following code may seem very ugly (but it works! and it's mine!) ;)

Any help in plotting this would be greatly appreciated.

Here are my functions to plot the data in 2D so far.

fileimport=Import["~/Downloads/N2 83K.pit","table"];
(* get measure paramters, import data *)
ysteps = Part[fileimport[[2]], 1];
ymin = Part[fileimport[[2]], 2];
δy = Part[fileimport[[2]], 3];
xsteps = Part[fileimport[[3]], 1];
xmin = Part[fileimport[[3]], 2];
δx = Part[fileimport[[3]], 3];
gas = Part[fileimport[[5]][[1]]];
rawdata = Drop[fileimport, 7];
(* generate surfaces,, find core of flow *)
MachMatrix = Transpose[{rawdata[[All, 2]], rawdata[[All, 1]],rawdata[[All, 4]]}]; 
TemperatureMatrix = Transpose[{rawdata[[All, 2]], rawdata[[All, 1]], rawdata[[All,5]]}];
DensityMatrix=Transpose[{rawdata[[All, 2]], rawdata[[All,1]],rawdata[[All,7]]*10^16}];
Flowmatrix = {TemperatureMatrix, DensityMatrix, MachMatrix};
Findcore[row_] := (Abs[row[[2]]] < .03);
(* user parameters for plot *)
inter = 1;
ratio = 2/3;  
size = 800;
(* plotmap makes the 2D plot of map parameter matrix *)
plotmap[map_] := 
  ListContourPlot[Flowmatrix[[map]], 
    ColorFunction -> ColorData["TemperatureMap"], PlotLegends -> Automatic, 
    GridLines -> {Table[m, {m, xmin, xsteps, δx}], Table[n, {n, ymin, ysteps, δy}]}, 
    InterpolationOrder -> inter, AspectRatio -> ratio, 
    ImageSize -> size, Contours -> 200, ContourStyle -> None, 
    Method -> {"GridLinesInFront" -> True}]
TabView[{"Temperature" -> plotmap[1], "Density" -> plotmap[2], "Mach" -> plotmap[3]}]

I have more functions to compute other properties of the flow, but that's the graph I would like to obtain the surfaces from.

share|improve this question
    
Perhaps as a newcomer to Mathematica, you will find it useful to learn that Part[x[[2]], 2] is more concisely expressed as x[[2, 2]] –  m_goldberg Jun 17 at 5:03
    
And you are importing with "table" instead of "Table". And I don't understand what you are precisely asking here. What is your precise question? –  Öskå Jun 17 at 9:31
    
Thanks for the clarifications. I am trying to get a plot of isosurfaces for a fixed temperature, in 3 dimensions of space. –  Billouman Jun 17 at 11:31
    
So are you going to fix those things? Unreadable code will highly unlikely get an attention. –  Kuba Jun 19 at 8:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.