~ubuntu-branches/ubuntu/wily/yade/wily

« back to all changes in this revision

Viewing changes to examples/sph/watercolumn.py

  • Committer: Package Import Robot
  • Author(s): Dmitry Shachnev
  • Date: 2014-11-14 12:54:52 UTC
  • mfrom: (20.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20141114125452-t16anreumu4ybg2s
Tags: 1.12.0-2ubuntu1
Add allow-stderr restriction to autopkgtest, to silence a warning
printed by new matplotlib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
fr = 0.0;
9
9
rho=1000.0
10
10
 
11
 
k = 5.0
12
 
mu = 0.001
13
 
tc = 0.0001; en = 0.7; et = 0.7;
 
11
k = 5000.0
 
12
tc = 0.001; en = 0.7; et = 0.7;
14
13
vel = 0.05
15
 
Rad = 15.0e-3
 
14
Rad = 12.0e-3
 
15
h = 2*Rad
16
16
o.dt = 0.0002
17
17
 
18
18
 
19
19
scaleF =  0.001
20
20
 
21
21
# Add material
22
 
mat1 = O.materials.append(ViscElMat(frictionAngle=fr,density=rho, SPHmode=True,mu=mu,tc=tc, en=en, et=et))
23
 
id1 = O.bodies.append(ymport.gmsh("box.mesh", scale=scaleF, material=mat1, color=(1,0,0), mask = 1, wire=True))
 
22
mat1 = O.materials.append(ViscElMat(frictionAngle=fr,density=rho, SPHmode=True,h=h,tc=tc, en=en, et=et, KernFunctionPressure = 1, KernFunctionVisco = 1))
 
23
mat2 = O.materials.append(ViscElMat(frictionAngle=fr,density=rho, SPHmode=False,h=h,tc=tc, en=en, et=et))
 
24
 
 
25
id1 = O.bodies.append(ymport.gmsh("box.mesh", scale=scaleF, material=mat2, color=(1,0,0), mask = 5, wire=True))
24
26
 
25
27
d = 15.0*scaleF
26
28
 
30
32
    pack.inAlignedBox(
31
33
    (0,       -2000.0*scaleF,  0.0),
32
34
    (1000*scaleF, 200*scaleF,  50.0*scaleF)),
33
 
    radius=d,gap=0.01*d, material=mat1, mask=1, color=(0,1,1)))
34
 
 
 
35
    radius=d,gap=0.001*d, material=mat1, mask=3, color=(0,1,1)))
35
36
 
36
37
print len(idSpheres)
37
38
 
45
46
    [Law2_ScGeom_ViscElPhys_Basic()],
46
47
  ),
47
48
  NewtonIntegrator(damping=0.05,gravity=[0,-9.81,0]),
48
 
  SPHEngine(mask=1, k=k, rho0 = rho),
 
49
  SPHEngine(mask=3, k=k, rho0 = rho, h = h, KernFunctionDensity= 1),
49
50
  VTKRecorder(iterPeriod=100,fileName='./cpt/spheres-', recorders=['spheres','velocity','colors','intr','ids','mask','materialId','stress']),
50
51
  VTKRecorder(iterPeriod=100,fileName='./cpt/facet-',   recorders=['facets'],label='VTK_box2'),
51
52
  PyRunner(command='addPlotData()',iterPeriod=50,dead=False),
56
57
 
57
58
plot.plots={'t':('Ekin')}; plot.plot()
58
59
 
 
60
enlargeF = h/Rad*1.1
 
61
print "enlargeF = %g"%enlargeF
 
62
is2aabb.aabbEnlargeFactor = enlargeF
 
63
ss2sc.interactionDetectionFactor = enlargeF
 
64
 
59
65
O.run(1, True)
60
66
 
61
67
qt.View()