Skip to content

Path Plots based on Sets

mkraska edited this page Jul 17, 2016 · 2 revisions

Path Plots Defined By Lines or Nodes

The implementation of this feature in CGX 2.10 has been supported by Brandenburg University of Applied Sciences.

In previous versions of CGX, path plots could be defined only using sequences of nodes, which had to be specified explicitly using the seq command or it's interactive counterpart qseq. This did not allow to automatically create path plots for variable mesh densities.

Now it is possible to sample the currently displayed result entity along a line or a combined line or along the nodes of a node set (sorted by distance from origin)

graph <set> +|-

<set> contains a single line or combined line, the sign indicates the sampling direction.

Example for Definition by Line

Example Drahtbiegen/Zug shows an axisymmetric model of a tensile test with necking.

Axisymmetric model of a tensile test

We want to plot the plastic equivalent strain (PE) along the centerline from the end to the necking zone and from there in radial direction along the cross section.

Read data and set definitions. First, we define the path based on the available node set definitions from the CCX input file. The set rad is not used in the input and therefore is loaded separately:

read Zug.frd
read Zug.inp nom
read rad.nam inp

Define points: The upper end of the center line is found as the intersection of the sets Ntop and Nsym. The second point is the origin and the third point is given by the location of the node in set Nrad, which was defined for this purpose in the pre-processing script.

seti cp n Ntop Nsym
pnt cp cp
pnt p0 0 0 0
pnt rad Nrad

Define the combined line: Note that the points are defined based on the initial co-ordinates of the nodes. Had we selected a dataset and switched on the displaced shape (view disp), then the deformed co-ordinates would have been used.

Now the points are used to define lines and these lines are joined into a combined line. For use in the path plot the combined line must be stored in a set. As in meshing, the line division options and commands can be applied. The line division defines the sampling points of the plot.

line l1 p0 cp 40 1.1
line l2 p0 rad 20
seto path
 lcmb ! - l1 + l2
setc

Create the plot: To actually produce the path plot, select a data set and issue the graph command. This produces a postscript image, which we convert to png for display in the web.

ds -0 e 1
graph path +
sys convert -rotate 90 graph_0.ps path0.png

Axisymmetric model of a tensile test

For further processing, the path data and the gnuplot command file are written to graph_0.out and graph_0.gnu.

The data file graph_0.out contains three columns:

  1. Node number (internally generated nodes, not visible in CGX)
  2. Length
  3. Value of the selected data set and entity.
# node length dat(ds)
562        0.00000e+00  -2.55949e-05
563        1.85926e-01  2.17145e-03 
564        3.54950e-01  3.69760e-03 
...

If you want the mapping to be based on the deformed state, just switch on view disp and repeat the graph command. Note that this is independent from whether the path was created based on deformed or undeformed node positions.

view disp
graph path +
sys convert -rotate 90 graph_1.ps path.png

Axisymmetric model of a tensile test

Multiple Curves

With a single graph command you can just create a single curve. For multiple curves in a single plot, first create these curves indivicually. Successive graph commands generate numbered output with an index starting from 0. Then you can produce the combined plot from the data files, e.g. using a gnuplot command file.

Clone this wiki locally