[aspect-devel] Evenly spaced vectors, dynamic pressure

Jonathan Perry-Houts jperryh2 at uoregon.edu
Thu Sep 6 16:41:48 PDT 2018


On 09/06/18 12:25, Adam Holt wrote:
> Hi all!
> 
> I am a relatively new user of ASPECT, and have ran into some tricky things related to visualizing/post-processing ASPECT output using Paraview. I wondered if anyone had experience with the following:
> 
> First, plotting evenly spaced velocity vectors for models with mesh refinement. As the element sizes vary dramatically, plotting vectors using "Every Nth Point" (Paraview Glyph option) produces very uneven vector coverage. I thought I had solved this by interpolating the data onto a plane (using Paraview function "Resample with dataset"), but the result of this function (an evenly spaced velocity field) does not time evolve with the simulation (at least for Paraview 5.2.0). Has anybody ran into a similar issue?

That seems to work in Paraview 5.5.0 (it does evolve with the simulation
for me). Not sure if it matters, but I used a "Plane" source as the
uniform grid to Resample on. I attached a custom filter that works for
me (import it with Tools>Manage Custom Filters>Import).

It's ridiculous that the glyph filter's "uniform spatial distribution"
option doesn't do this automatically. That's exactly what I would expect
it to do. Apparently it just selects uniformly spaced points, and if
there happens to be a node there, it will plot a vector, otherwise it
skips it. That's why it almost never works for "small" data sets like a
2d mesh.

> Second, I am interested in the dynamic pressure field and wondered how best to retrieve it from my (incompressible) models. For such models, I assume it can be computed by subtracting the horizontally-constant static pressure from the pressure outputted (the 'nonadiabatic pressure' output variable). Is this something that should be done in Paraview, or by writing a new post-processor plugin?>
> Thanks in advance for any input!
> Adam Holt
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel
> 
-------------- next part --------------
<CustomFilterDefinitions>
  <CustomProxyDefinition name="UniformGlyphPlane" group="filters">
    <CompoundSourceProxy id="9118" servers="1">
      <Proxy group="filters" type="Glyph" id="8904" servers="1" compound_name="Glyph1">
        <Property name="GlyphMode" id="8904.GlyphMode" number_of_elements="1">
          <Element index="0" value="0"/>
          <Domain name="enum" id="8904.GlyphMode.enum">
            <Entry value="0" text="All Points"/>
            <Entry value="1" text="Every Nth Point"/>
            <Entry value="2" text="Uniform Spatial Distribution"/>
          </Domain>
        </Property>
        <Property name="GlyphTransform" id="8904.GlyphTransform" number_of_elements="1">
          <Proxy value="8826"/>
          <Domain name="proxy_list" id="8904.GlyphTransform.proxy_list">
            <Proxy value="8826"/>
          </Domain>
        </Property>
        <Property name="Input" id="8904.Input" number_of_elements="1">
          <Proxy value="8604" output_port="0"/>
          <Domain name="groups" id="8904.Input.groups"/>
          <Domain name="input_array1" id="8904.Input.input_array1"/>
          <Domain name="input_array2" id="8904.Input.input_array2"/>
          <Domain name="input_type" id="8904.Input.input_type"/>
        </Property>
        <Property name="MaximumNumberOfSamplePoints" id="8904.MaximumNumberOfSamplePoints" number_of_elements="1">
          <Element index="0" value="5000"/>
          <Domain name="range" id="8904.MaximumNumberOfSamplePoints.range"/>
        </Property>
        <Property name="Orient" id="8904.Orient" number_of_elements="1">
          <Element index="0" value="1"/>
          <Domain name="bool" id="8904.Orient.bool"/>
        </Property>
        <Property name="Scalars" id="8904.Scalars" number_of_elements="5">
          <Element index="0" value="0"/>
          <Element index="1" value=""/>
          <Element index="2" value=""/>
          <Element index="3" value="0"/>
          <Element index="4" value="None"/>
          <Domain name="array_list" id="8904.Scalars.array_list">
            <String text="None"/>
            <String text="T"/>
            <String text="crust"/>
            <String text="density"/>
            <String text="granite"/>
            <String text="melt"/>
            <String text="p"/>
            <String text="root"/>
            <String text="slab"/>
            <String text="strain_rate"/>
            <String text="viscosity"/>
            <String text="vtkValidPointMask"/>
          </Domain>
          <Domain name="field_list" id="8904.Scalars.field_list">
            <Entry value="0" text="Point Data"/>
          </Domain>
        </Property>
        <Property name="ScaleFactor" id="8904.ScaleFactor" number_of_elements="1">
          <Element index="0" value="10000000"/>
          <Domain name="bounds" id="8904.ScaleFactor.bounds"/>
          <Domain name="scalar_range" id="8904.ScaleFactor.scalar_range"/>
          <Domain name="vector_range" id="8904.ScaleFactor.vector_range"/>
        </Property>
        <Property name="ScaleMode" id="8904.ScaleMode" number_of_elements="1">
          <Element index="0" value="1"/>
          <Domain name="enum" id="8904.ScaleMode.enum">
            <Entry value="0" text="scalar"/>
            <Entry value="1" text="vector"/>
            <Entry value="2" text="vector_components"/>
            <Entry value="3" text="off"/>
          </Domain>
        </Property>
        <Property name="Seed" id="8904.Seed" number_of_elements="1">
          <Element index="0" value="10339"/>
          <Domain name="range" id="8904.Seed.range"/>
        </Property>
        <Property name="Source" id="8904.Source" number_of_elements="1">
          <Proxy value="8827" output_port="0"/>
          <Domain name="groups" id="8904.Source.groups"/>
          <Domain name="input_type" id="8904.Source.input_type"/>
          <Domain name="proxy_list" id="8904.Source.proxy_list">
            <Proxy value="8827"/>
            <Proxy value="8838"/>
            <Proxy value="8849"/>
            <Proxy value="8860"/>
            <Proxy value="8871"/>
            <Proxy value="8882"/>
            <Proxy value="8893"/>
          </Domain>
        </Property>
        <Property name="Stride" id="8904.Stride" number_of_elements="1">
          <Element index="0" value="200"/>
          <Domain name="range" id="8904.Stride.range"/>
        </Property>
        <Property name="Vectors" id="8904.Vectors" number_of_elements="5">
          <Element index="0" value="1"/>
          <Element index="1" value=""/>
          <Element index="2" value=""/>
          <Element index="3" value="0"/>
          <Element index="4" value="velocity"/>
          <Domain name="array_list" id="8904.Vectors.array_list">
            <String text="None"/>
            <String text="velocity"/>
          </Domain>
          <Domain name="field_list" id="8904.Vectors.field_list">
            <Entry value="0" text="Point Data"/>
          </Domain>
        </Property>
      </Proxy>
      <Proxy group="sources" type="PlaneSource" id="8310" servers="1" compound_name="Plane1">
        <Property name="Origin" id="8310.Origin" number_of_elements="3">
          <Element index="0" value="-600000"/>
          <Element index="1" value="0"/>
          <Element index="2" value="0"/>
          <Domain name="range" id="8310.Origin.range"/>
        </Property>
        <Property name="Point1" id="8310.Point1" number_of_elements="3">
          <Element index="0" value="600000"/>
          <Element index="1" value="0"/>
          <Element index="2" value="0"/>
          <Domain name="range" id="8310.Point1.range"/>
        </Property>
        <Property name="Point2" id="8310.Point2" number_of_elements="3">
          <Element index="0" value="-600000"/>
          <Element index="1" value="660000"/>
          <Element index="2" value="0"/>
          <Domain name="range" id="8310.Point2.range"/>
        </Property>
        <Property name="XResolution" id="8310.XResolution" number_of_elements="1">
          <Element index="0" value="50"/>
          <Domain name="range" id="8310.XResolution.range"/>
        </Property>
        <Property name="YResolution" id="8310.YResolution" number_of_elements="1">
          <Element index="0" value="50"/>
          <Domain name="range" id="8310.YResolution.range"/>
        </Property>
      </Proxy>
      <Proxy group="filters" type="ResampleWithDataset" id="8604" servers="1" compound_name="ResampleWithDataset1">
        <Property name="CategoricalData" id="8604.CategoricalData" number_of_elements="1">
          <Element index="0" value="0"/>
          <Domain name="bool" id="8604.CategoricalData.bool"/>
        </Property>
        <Property name="CellLocator" id="8604.CellLocator" number_of_elements="1">
          <Proxy value="8601"/>
          <Domain name="groups" id="8604.CellLocator.groups"/>
          <Domain name="proxy_list" id="8604.CellLocator.proxy_list">
            <Proxy value="8601"/>
            <Proxy value="8602"/>
            <Proxy value="8603"/>
          </Domain>
        </Property>
        <Property name="ComputeTolerance" id="8604.ComputeTolerance" number_of_elements="1">
          <Element index="0" value="1"/>
          <Domain name="bool" id="8604.ComputeTolerance.bool"/>
        </Property>
        <Property name="Input" id="8604.Input" number_of_elements="1">
          <Domain name="groups" id="8604.Input.groups"/>
          <Domain name="input_type" id="8604.Input.input_type"/>
        </Property>
        <Property name="MarkBlankPointsAndCells" id="8604.MarkBlankPointsAndCells" number_of_elements="1">
          <Element index="0" value="0"/>
          <Domain name="bool" id="8604.MarkBlankPointsAndCells.bool"/>
        </Property>
        <Property name="PassCellArrays" id="8604.PassCellArrays" number_of_elements="1">
          <Element index="0" value="0"/>
          <Domain name="bool" id="8604.PassCellArrays.bool"/>
        </Property>
        <Property name="PassFieldArrays" id="8604.PassFieldArrays" number_of_elements="1">
          <Element index="0" value="1"/>
          <Domain name="bool" id="8604.PassFieldArrays.bool"/>
        </Property>
        <Property name="PassPointArrays" id="8604.PassPointArrays" number_of_elements="1">
          <Element index="0" value="0"/>
          <Domain name="bool" id="8604.PassPointArrays.bool"/>
        </Property>
        <Property name="Source" id="8604.Source" number_of_elements="1">
          <Proxy value="8310" output_port="0"/>
          <Domain name="groups" id="8604.Source.groups"/>
          <Domain name="input_type" id="8604.Source.input_type"/>
        </Property>
        <Property name="Tolerance" id="8604.Tolerance" number_of_elements="1">
          <Element index="0" value="2.22044604925031e-16"/>
          <Domain name="range" id="8604.Tolerance.range"/>
        </Property>
      </Proxy>
      <Proxy group="cell_locators" type="StaticCellLocator" id="8601" servers="1" compound_name="auto_8601"/>
      <Proxy group="extended_sources" type="Transform2" id="8826" servers="1" compound_name="auto_8826">
        <Property name="Position" id="8826.Position" number_of_elements="3">
          <Element index="0" value="0"/>
          <Element index="1" value="0"/>
          <Element index="2" value="0"/>
          <Domain name="range" id="8826.Position.range"/>
        </Property>
        <Property name="PositionInfo" id="8826.PositionInfo" number_of_elements="3">
          <Element index="0" value="0"/>
          <Element index="1" value="0"/>
          <Element index="2" value="0"/>
        </Property>
        <Property name="Rotation" id="8826.Rotation" number_of_elements="3">
          <Element index="0" value="0"/>
          <Element index="1" value="0"/>
          <Element index="2" value="0"/>
          <Domain name="range" id="8826.Rotation.range"/>
        </Property>
        <Property name="RotationInfo" id="8826.RotationInfo" number_of_elements="3">
          <Element index="0" value="0"/>
          <Element index="1" value="0"/>
          <Element index="2" value="0"/>
        </Property>
        <Property name="Scale" id="8826.Scale" number_of_elements="3">
          <Element index="0" value="1"/>
          <Element index="1" value="1"/>
          <Element index="2" value="1"/>
          <Domain name="range" id="8826.Scale.range"/>
        </Property>
        <Property name="ScaleInfo" id="8826.ScaleInfo" number_of_elements="3">
          <Element index="0" value="1"/>
          <Element index="1" value="1"/>
          <Element index="2" value="1"/>
        </Property>
      </Proxy>
      <Proxy group="sources" type="ArrowSource" id="8827" servers="1" compound_name="auto_8827">
        <Property name="Invert" id="8827.Invert" number_of_elements="1">
          <Element index="0" value="0"/>
          <Domain name="bool" id="8827.Invert.bool"/>
        </Property>
        <Property name="ShaftRadius" id="8827.ShaftRadius" number_of_elements="1">
          <Element index="0" value="0.03"/>
          <Domain name="range" id="8827.ShaftRadius.range"/>
        </Property>
        <Property name="ShaftResolution" id="8827.ShaftResolution" number_of_elements="1">
          <Element index="0" value="6"/>
          <Domain name="range" id="8827.ShaftResolution.range"/>
        </Property>
        <Property name="TipLength" id="8827.TipLength" number_of_elements="1">
          <Element index="0" value="0.35"/>
          <Domain name="range" id="8827.TipLength.range"/>
        </Property>
        <Property name="TipRadius" id="8827.TipRadius" number_of_elements="1">
          <Element index="0" value="0.1"/>
          <Domain name="range" id="8827.TipRadius.range"/>
        </Property>
        <Property name="TipResolution" id="8827.TipResolution" number_of_elements="1">
          <Element index="0" value="6"/>
          <Domain name="range" id="8827.TipResolution.range"/>
        </Property>
      </Proxy>
      <ExposedProperties>
        <Property name="Input" proxy_name="ResampleWithDataset1" exposed_name="Input"/>
        <Property name="Point1" proxy_name="Plane1" exposed_name="PlaneLowerRight"/>
        <Property name="Origin" proxy_name="Plane1" exposed_name="PlaneOrigin"/>
        <Property name="Point2" proxy_name="Plane1" exposed_name="PlaneUpperLeft"/>
        <Property name="ScaleFactor" proxy_name="Glyph1" exposed_name="Scale Factor"/>
        <Property name="Vectors" proxy_name="Glyph1" exposed_name="Vectors"/>
        <Property name="XResolution" proxy_name="Plane1" exposed_name="X Resolution"/>
        <Property name="YResolution" proxy_name="Plane1" exposed_name="Y Resolution"/>
      </ExposedProperties>
      <OutputPort name="Output" proxy="Glyph1" port_index="0"/>
      <Hints>
        <ShowInMenu/>
      </Hints>
    </CompoundSourceProxy>
  </CustomProxyDefinition>
</CustomFilterDefinitions>


More information about the Aspect-devel mailing list