isovaleurs with paraview

Asked by Yor1

Hello !

I try to output a figure with isovaleurs in the simulated medium with paraview.
The problem is that all the examples given in the paraview tutorials is based on the continuum medium
whereas in Yade the medium is approximated by particles.

Is there anyone who did this exercise before ?

Best regards.
Jabrane.

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Jan Stránský (honzik) said :
#2

Hi Jabrane,
I don't use it myself. but there is TessalationWrapper [1] for this purposes.
I am sure Paraview itself has some ways to do it, I remember using something like Tetrahedralize filter (not sure), but it is more question on Paraview forums, not here..
cheers
Jan

[1] https://yade-dem.org/doc/user.html#micro-strain

Revision history for this message
Yor1 (jabrane-hamdi) said :
#3

Hello Jan,

Thank you for the answer.
In fact i try to do a script python with which i output the figure with iso-lines of cracks number in a part of the medium.
To output i have to introduce the coordinates of cracks and the number of cracks per part of medium.
I have the coordinates of the cracks position. The problem is how can i obtain the cracks number per a part of medium.

This is a short script with which we can have the isolines with python

import matplotlib
import numpy as np
import matplotlib.cm as cm
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt

matplotlib.rcParams['xtick.direction'] = 'out'
matplotlib.rcParams['ytick.direction'] = 'out'

delta = 0.025
x = np.arange(-3.0, 3.0, delta)
y = np.arange(-2.0, 2.0, delta)
X, Y = np.meshgrid(x, y)
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
# difference of Gaussians
Z = 10.0 * (Z2 - Z1)

Best regards

Revision history for this message
Yor1 (jabrane-hamdi) said :
#4

import matplotlib
import numpy as np
import matplotlib.cm as cm
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt

matplotlib.rcParams['xtick.direction'] = 'out'
matplotlib.rcParams['ytick.direction'] = 'out'

delta = 0.025
x = np.arange(-3.0, 3.0, delta)
y = np.arange(-2.0, 2.0, delta)
X, Y = np.meshgrid(x, y)
Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
# difference of Gaussians
Z = 10.0 * (Z2 - Z1)

# Create a simple contour plot with labels using default colors. The
# inline argument to clabel will control whether the labels are draw
# over the line segments of the contour, removing the lines beneath
# the label
plt.figure()
CS = plt.contour(X, Y, Z)
plt.clabel(CS, inline=1, fontsize=10)
plt.title('Simplest default with labels')

Revision history for this message
Jan Stránský (honzik) said :
#5

Hi Jabrane,

"part of medium" is the critical point here. I think the most
straightforward approach is to map the values to a unstructured grid (where
you can easily control what part of medium actually is). Paraview then
easily plot contours on such unstructured grid.
All in all, it is more paraview / data postprocessing in general question
than yade question..

cheers
Jan

Revision history for this message
Yor1 (jabrane-hamdi) said :
#6

Thank you Jan.
Finally i wrote a script with python because i persuade that i can't draw isolines with paraview.

Best regards
Jabrane