File Exchange

image thumbnail


version 1.0.0 (1.05 MB) by junpeng wang
Investigating 2D stress field via principal stress lines, stress field visualization


Updated 09 Jun 2020

View License

# StressField2D_Investigator_exported
Successfully tested on Matlab R2019a and subsequent versions

# Functionality:
Principal stress lines (PSLs) based 2D stress field investigation.
The program allows to trace PSLs interactively in the saliency map of different stress components
(Inc. cartesian stress, von Mises stress, principal stress magnitude and anisotropy),
or in the stress field topology visualization.

# Data set:
What is the file format of the data set?
The data set is composed of two parts: the quad mesh and cartesian stress field.
The quad mesh is written in the standard .vtk DataFile Version 3.0, and cartesian stress field
is appended after the mesh info. in the same file.

# Usage:
run StressField2D_Investigator_exported.m

'DataSrc' edit field ==== name of data set file without extension
'Loading' button ======== loading the data set and draw the silhouette of the input stress field
'VisType' drop-down ===== selecting the stress components to visualize
'None' ---------- nothing to vis. (default)
'SigmaX' -------- normal stress along X-dir.
'SigmaY' -------- normal stress along Y-dir.
'SigmaXY' ------- shear stress
'Mises' --------- von Mises stress
'Sigma1' -------- magnitudes of major principal stress
'Sigma2' -------- magnitudes of minor principal stress
'Anisotropy' ---- defined by log10(|Sigma1/Sigma2|), the farther away from zero,
the stronger the anisotropy ('+': major PS dominates, '-': minor PS dominates)
'Topology' ------ topological features of the stress field, inc. degenerate points and
topological skeletons (red dotted lines -> major principal direction, blue -> minor)
'Alpha' slider ========== adjusting the transparency of saliency map to highlight PSLs
(from 0 to 1, opaque to tranparent)
'TraceMajor' button ===== capturing cursor position, and tracing major PSL (red lines) from there
'TraceMinor' button ===== capturing cursor position, and tracing minor PSL (blue lines) from there
'TraceBoth' button ====== capturing cursor position, and tracing major & minor PSLs from there
'UnTrace' button ======== capturing cursor position, removing PSL closest to it
'ClearAll' button ======= clear workspace before loading new data set

# Limitations:
Only 1st-order quad mesh is supported for now, constant step size is used in tracing PSLs, might be not robust
enough for mesh with vastly different element sizes.

Cite As

junpeng wang (2021). StressField2D-Investigator (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2019a
Compatible with R2019a to R2020a
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!