Commit ec960dc3 by Matthieu Constant

all test cases article with paraview state with relative path

parent 5acff405
 from math import * import matplotlib from matplotlib.tri import Triangulation from matplotlib import pyplot from matplotlib.mlab import griddata import matplotlib.cm as cm #!/usr/bin/env python from marblesbag import scontact3 import numpy as np import os import time import shutil import random p = scontact3.ParticleProblem() p.read_vtk("outputIm",20) i = 70 R = 2.7e-3 r = [] x = [] y = [] b1 = False b2 = False rhop=2400 n = len(p.mass()) print(n) print(p.position()[0,1]) fig, ax = pyplot.subplots() for i in range(n) : if i-.00002: circle = pyplot.Circle((p.position()[i,0]/R, p.position()[i,1]/R), 2*(3*p.mass()[i]/(4*np.pi*rhop))**(1./3.)/R, edgecolor='r', facecolor=(0,0,1),linewidth=0.1) ax.add_artist(circle) else: if p.position()[i,2]<.00002 and p.position()[i,2]>-.00002: circle = pyplot.Circle((p.position()[i,0]/R, p.position()[i,1]/R), 2*(3*p.mass()[i]/(4*np.pi*rhop))**(1./3.)/R, edgecolor='b', facecolor=(1,0,0),linewidth=0.1) ax.add_artist(circle) ax.set_xlim((-1.5, 3.5)) ax.set_ylim((.17/R, .18/R)) ax.set_aspect('equal') ax.get_xaxis().set_visible(False) ax.get_yaxis().set_visible(False) fig.savefig('state_3d_0.png',bbox_inches='tight', dpi=900)
 from math import * import matplotlib from matplotlib.tri import Triangulation from matplotlib import pyplot from matplotlib.mlab import griddata import matplotlib.cm as cm #!/usr/bin/env python from marblesbag import scontact3 import numpy as np import os import time import shutil import random p = scontact3.ParticleProblem() p.read_vtk("outputIm",50) i = 70 R = 2e-3 r = [] x = [] y = [] b1 = False b2 = False rhop=2400 n = len(p.mass()) print(n) print(p.position()[0,1]) fig, ax = pyplot.subplots() for i in range(n) : if i-.0001: circle = pyplot.Circle((p.position()[i,0]/R, p.position()[i,1]/R), 2*(3*p.mass()[i]/(4*np.pi*rhop))**(1./3.)/R, edgecolor='r', facecolor=(0,0,1),linewidth=0.1) ax.add_artist(circle) else: if p.position()[i,2]<.0001 and p.position()[i,2]>-.0001: circle = pyplot.Circle((p.position()[i,0]/R, p.position()[i,1]/R), 2*(3*p.mass()[i]/(4*np.pi*rhop))**(1./3.)/R, edgecolor='b', facecolor=(1,0,0),linewidth=0.1) ax.add_artist(circle) ax.set_xlim((-2.5, 2.5)) ax.set_ylim((.181/R, .191/R)) ax.set_aspect('equal') ax.get_xaxis().set_visible(False) ax.get_yaxis().set_visible(False) fig.savefig('stateVert_3d_0.png',bbox_inches='tight', dpi=900)