[Paraview] WG: Visualizing load paths

Samuel Key samuelkey at bresnan.net
Thu May 12 10:22:26 EDT 2016


An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160512/2e1abe01/attachment.html>
-------------- next part --------------
<snip>
!!
!! Start vtk "PointData" data.
!!
            WRITE (IO_UNIT%LVTO,'(A)') '<PointData Tensors="Stress" Scalars="Material">'
            !!
            !! Write element-based (cell) stress data to VTK Data File.
            !! The retrieval function STRESS_DATA( element_n, component_i ) is used 
            !! with the following stress-component retrieval pattern to produce the
            !! the stress-component pattern expected by ParaView (PV):
            !!                   ( 1 4 5 )   ( xx xy xz )   ( 1 2 3 )
            !! Fma-3D Indices => ( 4 2 6 ) = ( yx yy yz ) = ( 4 5 6 ) <= PV Indices
            !!                   ( 5 6 3 )   ( zx zy zz )   ( 7 8 9 )
            !!
            WRITE(IO_UNIT%LVTO,'(2X,A)')'<DataArray type="Float32" Name="Stress" NumberOfComponents="9" format="ascii">'
            Lbgn = 1
            Lend = LREMAIN
            DO i = 1,LBLOCKS+1
              WRITE(IO_UNIT%LVTO,'((6(1PE15.7)))') 
     &        ((/ STRESS_DATA(NELUSED(L),1),STRESS_DATA(NELUSED(L),4),STRESS_DATA(NELUSED(L),5),
     &            STRESS_DATA(NELUSED(L),4),STRESS_DATA(NELUSED(L),2),STRESS_DATA(NELUSED(L),6),
     &            STRESS_DATA(NELUSED(L),5),STRESS_DATA(NELUSED(L),6),STRESS_DATA(NELUSED(L),3) /),  L = Lbgn,Lend)
              Lbgn = Lend + 1
              Lend = Lend + LBCOUNT
            ENDDO
            WRITE(IO_UNIT%LVTO,'(2X,A)')'</DataArray>'

            WRITE(IO_UNIT%LVTO,'(2X,A)')'<DataArray type="Float32" Name="Effective_Stress" NumberOfComponents="1" format="ascii">'
            Lbgn = 1
            Lend = LREMAIN
            DO i = 1,LBLOCKS+1
              WRITE(IO_UNIT%LVTO,'((6(1PE15.7)))') (EFFECTIVE_STRESS(NELUSED(L)), L = Lbgn,Lend)
              Lbgn = Lend + 1
              Lend = Lend + LBCOUNT
            ENDDO
            WRITE(IO_UNIT%LVTO,'(2X,A)')'</DataArray>'

            WRITE(IO_UNIT%LVTO,'(2X,A)')'<DataArray type="Float32" Name="Pressure" NumberOfComponents="1" format="ascii">'
            Lbgn = 1
            Lend = LREMAIN
            DO i = 1,LBLOCKS+1
              WRITE(IO_UNIT%LVTO,'((6(1PE15.7)))') (PRESSURE(NELUSED(L)), L = Lbgn,Lend)
              Lbgn = Lend + 1
              Lend = Lend + LBCOUNT
            ENDDO
            WRITE(IO_UNIT%LVTO,'(2X,A)')'</DataArray>'

            WRITE(IO_UNIT%LVTO,'(2X,A)')'<DataArray type="Float32" Name="Bulk_Strain" NumberOfComponents="1" format="ascii">'
            Lbgn = 1
            Lend = LREMAIN
            DO i = 1,LBLOCKS+1
              WRITE(IO_UNIT%LVTO,'((6(1PE15.7)))') (BULK_STRAIN(NELUSED(L)), L = Lbgn,Lend)
              Lbgn = Lend + 1
              Lend = Lend + LBCOUNT
            ENDDO
            WRITE(IO_UNIT%LVTO,'(2X,A)')'</DataArray>'

            WRITE(IO_UNIT%LVTO,'(2X,A)')'<DataArray type="Float32" Name="Strain_Energy" NumberOfComponents="1" format="ascii">'
            Lbgn = 1
            Lend = LREMAIN
            DO i = 1,LBLOCKS+1
              WRITE(IO_UNIT%LVTO,'((6(1PE15.7)))') (STRAIN_ENERGY_DENSITY(NELUSED(L)), L = Lbgn,Lend)
              Lbgn = Lend + 1
              Lend = Lend + LBCOUNT
            ENDDO
            WRITE(IO_UNIT%LVTO,'(2X,A)')'</DataArray>'

            WRITE(IO_UNIT%LVTO,'(2X,A)')'<DataArray type="Int32" Name="Material" NumberOfComponents="1" format="ascii">'
            Lbgn = 1
            Lend = LREMAIN
            DO i = 1,LBLOCKS+1
              WRITE(IO_UNIT%LVTO,'((6X,8I10))') (MatID_DATA(NELUSED(L)), L = Lbgn,Lend)
              Lbgn = Lend + 1
              Lend = Lend + LBCOUNT
            ENDDO
            WRITE(IO_UNIT%LVTO,'(2X,A)')'</DataArray>'
!!
!! End vtk "PointData" data.
!!
            WRITE (IO_UNIT%LVTO,'(A)') '</PointData>'
</snip>
-------------- next part --------------
<snip>
!!
!! Initialize sequential Material part counter.
!!
        MPart = 0
!!
!! Start this-time-step block.
!!
        CBUFFER = "BEGIN TIME STEP"
        WRITE (IO_UNIT%LEGO) CBUFFER

        CBUFFER = "Element Stress(xx,yy,zz,xy,xz,yz) Results"
        WRITE (IO_UNIT%LEGO) CBUFFER
!!
!! Loop on Material parts.
!!
        DO M = 1,NUMMT
!!
!! The function ELEMENTS_AND_NODES_USED(*) gen's nodal-points-used array NPTUSED, 
!! elements-used array NELUSED and vtk output-index-translation array NPTNOWI for 
!! this material. If material M is used, the function returns 1, otherwise 0. 
!!
          IF (ELEMENTS_AND_NODES_USED(M) .GT. 0) THEN

            NNodes = MATERIAL(M)%NNodes
            NElems = MATERIAL(M)%NElems

            CBUFFER = "part"
            WRITE (IO_UNIT%LEGO) CBUFFER
            MPart = MPart + 1
            WRITE (IO_UNIT%LEGO) MPart

            Nend = 0
            LBCOUNT = IBCOUNT
            MEL_COUNT = (/MHX,MPX,MPY,MTX,MM3,MP3,MM4,MP4,MTR,MPH,MPG/)

            DO k = 1,10
              MXX = MEL_COUNT(k)
              IF (MXX .GT. 0) THEN
                Nbgn = Nend + 1
                Nend = Nend + MXX
                CBUFFER = ESG_ELEMENT_TYPE(k)         
                WRITE (IO_UNIT%LEGO) CBUFFER

                LBLOCKS = MXX / LBCOUNT
                LREMAIN = MXX - LBCOUNT*LBLOCKS
                !!
                !! NOTE: The symmetric stress tensor components stored in the 1-D 
                !! array STRESS (*,1:6) in the program exactly match the component 
                !! order expected by the EnSight Gold results file.
                !!
                !! Program ==> (/Sxx,Syy,Szz,Sxy,Sxz,Syz/)
                !! EnSight ==> (/S11,S22,S33,S12,S13,S23/)
                !!
                Lbgn = Nbgn
                Lend = Lbgn + LREMAIN - 1
                DO i = 1,LBLOCKS+1
                  WRITE (IO_UNIT%LEGO) (STRESS_DATA(NELUSED(n),1), n = Lbgn,Lend)
                  Lbgn = Lend + 1
                  Lend = Lend + LBCOUNT
                ENDDO

                Lbgn = Nbgn
                Lend = Lbgn + LREMAIN - 1
                DO i = 1,LBLOCKS+1
                  WRITE (IO_UNIT%LEGO) (STRESS_DATA(NELUSED(n),2), n = Lbgn,Lend)
                  Lbgn = Lend + 1
                  Lend = Lend + LBCOUNT
                ENDDO

                Lbgn = Nbgn
                Lend = Lbgn + LREMAIN - 1
                DO i = 1,LBLOCKS+1
                  WRITE (IO_UNIT%LEGO) (STRESS_DATA(NELUSED(n),3), n = Lbgn,Lend)
                  Lbgn = Lend + 1
                  Lend = Lend + LBCOUNT
                ENDDO

                Lbgn = Nbgn
                Lend = Lbgn + LREMAIN - 1
                DO i = 1,LBLOCKS+1
                  WRITE (IO_UNIT%LEGO) (STRESS_DATA(NELUSED(n),4), n = Lbgn,Lend)
                  Lbgn = Lend + 1
                  Lend = Lend + LBCOUNT
                ENDDO

                Lbgn = Nbgn
                Lend = Lbgn + LREMAIN - 1
                DO i = 1,LBLOCKS+1
                  WRITE (IO_UNIT%LEGO) (STRESS_DATA(NELUSED(n),5), n = Lbgn,Lend)
                  Lbgn = Lend + 1
                  Lend = Lend + LBCOUNT
                ENDDO

                Lbgn = Nbgn
                Lend = Lbgn + LREMAIN - 1
                DO i = 1,LBLOCKS+1
                  WRITE (IO_UNIT%LEGO) (STRESS_DATA(NELUSED(n),6), n = Lbgn,Lend)
                  Lbgn = Lend + 1
                  Lend = Lend + LBCOUNT
                ENDDO

              ENDIF
            ENDDO

          ENDIF
        ENDDO
!!
!! Close out this-time-step block.
!!
        CBUFFER = "END TIME STEP"
        WRITE (IO_UNIT%LEGO) CBUFFER

        CLOSE (UNIT=IO_UNIT%LEGO, STATUS='KEEP')

      ENDIF
</snip>
######################################################################################
The EnSight Case file --
######################################################################################
FORMAT
type: ensight gold
GEOMETRY
model:                   1  1  fmaego.results.geom    change_coords_only
VARIABLE
vector per node:         1  1  Displacement          fmaego.results.ndis
vector per node:         1  1  Velocity              fmaego.results.nvel
vector per node:         1  1  Acceleration          fmaego.results.nacc
scalar per element:      1  1  Material              fmaego.results.emat
scalar per element:      1  1  Material-State        fmaego.results.esta
scalar per element:      1  1  Pressure              fmaego.results.eprs
scalar per element:      1  1  Bulk-Strain           fmaego.results.elnv
scalar per element:      1  1  Strain-Energy-Density fmaego.results.esed
scalar per element:      1  1  Effective-Stress      fmaego.results.edev
vector per element:      1  1  Stress*Vel            fmaego.results.estv
tensor symm per element: 1  1  Stress                fmaego.results.estr
TIME
time set:                1
number of steps:       101
time values:                  1.000000000000E-06      2.000000000000E-05
      4.100000000000E-05      6.100000000000E-05      8.100000000000E-05
      1.010000000000E-04      1.210000000000E-04      1.410000000000E-04
      1.610000000000E-04      1.810000000000E-04      2.010000000000E-04
      2.210000000000E-04      2.410000000000E-04      2.610000000000E-04
      2.800000000000E-04      3.000000000000E-04      3.200000000000E-04
      3.400000000000E-04      3.600000000000E-04      3.800000000000E-04
      4.000000000000E-04      4.200000000000E-04      4.400000000000E-04
      4.600000000000E-04      4.800000000000E-04      5.000000000000E-04
      5.200000000000E-04      5.400000000000E-04      5.600000000000E-04
      5.800000000000E-04      6.000000000000E-04      6.200000000000E-04
      6.400000000000E-04      6.600000000000E-04      6.800000000000E-04
      7.000000000000E-04      7.200000000000E-04      7.400000000000E-04
      7.600000000000E-04      7.800000000000E-04      8.000000000000E-04
      8.200000000000E-04      8.400000000000E-04      8.600000000000E-04
      8.800000000000E-04      9.000000000000E-04      9.200000000000E-04
      9.400000000000E-04      9.600000000000E-04      9.800000000000E-04
      1.000000000000E-03      1.020000000000E-03      1.040000000000E-03
      1.060000000000E-03      1.080000000000E-03      1.100000000000E-03
      1.120000000000E-03      1.140000000000E-03      1.161000000000E-03
      1.181000000000E-03      1.201000000000E-03      1.221000000000E-03
      1.241000000000E-03      1.261000000000E-03      1.281000000000E-03
      1.301000000000E-03      1.321000000000E-03      1.341000000000E-03
      1.361000000000E-03      1.381000000000E-03      1.401000000000E-03
      1.421000000000E-03      1.441000000000E-03      1.461000000000E-03
      1.481000000000E-03      1.501000000000E-03      1.521000000000E-03
      1.541000000000E-03      1.561000000000E-03      1.581000000000E-03
      1.601000000000E-03      1.621000000000E-03      1.641000000000E-03
      1.661000000000E-03      1.681000000000E-03      1.701000000000E-03
      1.721000000000E-03      1.741000000000E-03      1.761000000000E-03
      1.781000000000E-03      1.801000000000E-03      1.821000000000E-03
      1.841000000000E-03      1.861000000000E-03      1.881000000000E-03
      1.901000000000E-03      1.921000000000E-03      1.941000000000E-03
      1.961000000000E-03      1.981000000000E-03      2.001000000000E-03
FILE
file set:                   1
number of steps:          101
######################################################################################


More information about the ParaView mailing list