Today's Deals (in Amazon.com)

 Question:

plotting - Contour heat graph (ListContourPlot?)
  • l3win

    I have solved 2D incompressible Navier Stokes and written out a .dat file that includes x,y,u,v,p values. I am trying to get a 2D color heat graph like this one for my data

    enter image description here

    Here is what I have done so far trying to use Contourplot:

    Data = Import[
    "C:\\Users...
    UVP-steady-state.dat", "Table"];
    x = Data[[3 ;; 16002, 1]];
    y = Data[[3 ;; 16002, 2]];
    u = Data[[3 ;; 16002, 3]];
    v =  Data[[3 ;; 16002, 4]];
    p =  Data[[3 ;; 16002, 5]];
    grid = Transpose[{x, y}];
    ListPlot[grid, PlotLabel -> "MeshPoints", AxesLabel -> {"x", "y"}, 
    PlotRange -> Automatic, AspectRatio -> Automatic]
    velocity = Transpose[{x, y, Sqrt[u*u + v*v]}];
    pressure = Transpose[{x, y, p}];
    ListContourPlot[velocity]
    ListContourPlot[pressure]
    

    My steady state solution is in this .dat file

    http://www.wikiupload.com/VSPA5GS9BAXQ830

    I am able to make my solution look like this with TecPlot. enter image description here

    For some reason Mathematica with ListContourPlot plots two fairly large gaps in the middle of the graph.

  •  Answers:

  • belisarius

    This is similar to your picture:

    ListContourPlot[velocity, ColorFunction -> "Rainbow", 
                    PlotLegends -> Automatic, PlotRange -> All, Contours -> 99, 
                    ContourStyle -> {None}]
    

    enter image description here

    But this is on a finer grain

    ListContourPlot[velocity, ColorFunction -> "Rainbow", PlotLegends -> Automatic]
    

    enter image description here

    ListContourPlot[velocity, ColorFunction -> "Rainbow", 
                    PlotLegends -> Automatic, Contours -> 99, ContourStyle -> {None}]
    

    enter image description here