← Back to team overview

yade-users team mailing list archive

Re: [Question #191904]: reproducibility of capillary law

 

Question #191904 on Yade changed:
https://answers.launchpad.net/yade/+question/191904

Christian Jakob posted a new comment:
Thank you for your comment. I can not send you a script, because it is a bit too complex. There are servel preparation steps before the final calculation is running.
To provide more informations, I can send you output from my test runs. I created a file called test-results.sh. It simply consists of these lines:

yade -j 6 6-final.py
yade -j 6 6-final.py
yade -j 6 6-final.py
yade -j 6 6-final.py
yade -j 6 6-final.py

In will give you also main steps file 6-final.py:

#!/usr/bin/python
# -*- coding: utf-8 -*-

execfile('userinput.py')   #here some parameters are stored
O.load('no-macropore.xml')

#get highest particle before calculation and get V_spheres:
V_spheres = 0
max_z_pos = -10
for ii in sphID:
	i = O.bodies[ii]
	if ((i) and (isinstance(i.shape,Sphere))):
		V_spheres = V_spheres + (4*pi*(O.bodies[ii].shape.radius)**3)/3
		pos = O.cell.wrapPt(O.bodies[ii].state.pos)
		if pos[2] > max_z_pos:
			max_z_pos = pos[2]

#calculate steps_cube_full:
O.dt=4e-7
dt_now = O.dt
time_cube_full = abs(z_cu - z_cl) / v_iw
steps_cube_full = int(time_cube_full / dt_now)

t0 = O.time
c_broken = 0
cc = 1
if incr_water:
	start_time=O.realtime
	for c_final in range (0,int(steps_cube_full/100+1)):
		O.run(100,True)
		time_now = O.time
		water_height = (time_now-t0) * v_iw + shift
		#determine contacts that are below water_height
		for i in O.interactions:
			z_int_vec = O.cell.wrapPt(i.geom.contactPoint)
			z_int     = z_int_vec[2]	#z coordinate of interaction

			if ((z_int < water_height) and (i.isReal)):
				i.phys.isBroken=True				#delete liquid bridges
				c_broken += 1
	
		#show calculation status in console:
		if int(c_final) == int(cc*steps_cube_full/(10*100)):
			now_time = O.realtime
			print cc*10,'percent done, actual water height: ',water_height,' / elapsed time: %e min' % ((now_time - start_time)/60) 
			cc += 1

#get highest particle before calculation:
max_z_pos_after = -10
for ii in sphID:
	i = O.bodies[ii]
	if ((i) and (isinstance(i.shape,Sphere))):
		pos = O.cell.wrapPt(O.bodies[ii].state.pos)
		if pos[2] > max_z_pos_after:
			max_z_pos_after = pos[2]

settling_value = max_z_pos - max_z_pos_after
rel_set_val = settling_value / (z_cu - z_cl)
print settling_value
print rel_set_val

O.save('test-run2.xml')
sys.exit(0)

#-------------------------------------------------------------------------------endoffile

Result:

me@debian ~/YADE/my-yade-projects/07-converted-PFC-model >. test-results.sh 
Welcome to Yade unknown
TCP python prompt on localhost:9000, auth cookie `dsskea'
XMLRPC info provider on http://localhost:21000
Running script 6-final.py
10 percent done, actual water height:  0.000900399999508  / elapsed time: 2.971767e+00 min
20 percent done, actual water height:  0.00120039999902  / elapsed time: 5.951367e+00 min
30 percent done, actual water height:  0.00150039999853  / elapsed time: 8.970583e+00 min
40 percent done, actual water height:  0.00180039999804  / elapsed time: 1.205620e+01 min
50 percent done, actual water height:  0.00210039999754  / elapsed time: 1.514240e+01 min
60 percent done, actual water height:  0.00240039999705  / elapsed time: 1.831538e+01 min
70 percent done, actual water height:  0.00270039999656  / elapsed time: 2.151325e+01 min
80 percent done, actual water height:  0.00300039999607  / elapsed time: 2.476030e+01 min
90 percent done, actual water height:  0.00330039999558  / elapsed time: 2.807042e+01 min
100 percent done, actual water height:  0.00360039999509  / elapsed time: 3.142205e+01 min
0.00029855191197
0.09951730399
Yade: normal exit.
Beendet
Welcome to Yade unknown
TCP python prompt on localhost:9000, auth cookie `askcye'
XMLRPC info provider on http://localhost:21000
Running script 6-final.py
10 percent done, actual water height:  0.000900399999508  / elapsed time: 2.958867e+00 min
20 percent done, actual water height:  0.00120039999902  / elapsed time: 5.910517e+00 min
30 percent done, actual water height:  0.00150039999853  / elapsed time: 8.870300e+00 min
40 percent done, actual water height:  0.00180039999804  / elapsed time: 1.180363e+01 min
50 percent done, actual water height:  0.00210039999754  / elapsed time: 1.478193e+01 min
60 percent done, actual water height:  0.00240039999705  / elapsed time: 1.789090e+01 min
70 percent done, actual water height:  0.00270039999656  / elapsed time: 2.111632e+01 min
80 percent done, actual water height:  0.00300039999607  / elapsed time: 2.436760e+01 min
90 percent done, actual water height:  0.00330039999558  / elapsed time: 2.763468e+01 min
100 percent done, actual water height:  0.00360039999509  / elapsed time: 3.110225e+01 min
0.0003843152258
0.128105075267
Yade: normal exit.
Beendet
Welcome to Yade unknown
TCP python prompt on localhost:9000, auth cookie `uasdcs'
XMLRPC info provider on http://localhost:21000
Running script 6-final.py
10 percent done, actual water height:  0.000900399999508  / elapsed time: 2.963633e+00 min
20 percent done, actual water height:  0.00120039999902  / elapsed time: 5.946450e+00 min
30 percent done, actual water height:  0.00150039999853  / elapsed time: 9.002733e+00 min
40 percent done, actual water height:  0.00180039999804  / elapsed time: 1.208903e+01 min
50 percent done, actual water height:  0.00210039999754  / elapsed time: 1.519418e+01 min
60 percent done, actual water height:  0.00240039999705  / elapsed time: 1.832947e+01 min
70 percent done, actual water height:  0.00270039999656  / elapsed time: 2.143732e+01 min
80 percent done, actual water height:  0.00300039999607  / elapsed time: 2.466240e+01 min
90 percent done, actual water height:  0.00330039999558  / elapsed time: 2.785198e+01 min
100 percent done, actual water height:  0.00360039999509  / elapsed time: 3.111655e+01 min
0.000388188987295
0.129396329098
Yade: normal exit.
Beendet
Welcome to Yade unknown
TCP python prompt on localhost:9000, auth cookie `cuekss'
XMLRPC info provider on http://localhost:21000
Running script 6-final.py
10 percent done, actual water height:  0.000900399999508  / elapsed time: 2.970300e+00 min
20 percent done, actual water height:  0.00120039999902  / elapsed time: 5.930817e+00 min
30 percent done, actual water height:  0.00150039999853  / elapsed time: 8.940450e+00 min
40 percent done, actual water height:  0.00180039999804  / elapsed time: 1.202117e+01 min
50 percent done, actual water height:  0.00210039999754  / elapsed time: 1.513903e+01 min
60 percent done, actual water height:  0.00240039999705  / elapsed time: 1.832503e+01 min
70 percent done, actual water height:  0.00270039999656  / elapsed time: 2.153702e+01 min
80 percent done, actual water height:  0.00300039999607  / elapsed time: 2.480080e+01 min
90 percent done, actual water height:  0.00330039999558  / elapsed time: 2.807388e+01 min
100 percent done, actual water height:  0.00360039999509  / elapsed time: 3.147515e+01 min
0.000325288935697
0.108429645232
Yade: normal exit.
Beendet
Welcome to Yade unknown
TCP python prompt on localhost:9000, auth cookie `cukaes'
XMLRPC info provider on http://localhost:21000
Running script 6-final.py
10 percent done, actual water height:  0.000900399999508  / elapsed time: 2.922750e+00 min
20 percent done, actual water height:  0.00120039999902  / elapsed time: 5.835467e+00 min
30 percent done, actual water height:  0.00150039999853  / elapsed time: 8.784200e+00 min
40 percent done, actual water height:  0.00180039999804  / elapsed time: 1.168948e+01 min
50 percent done, actual water height:  0.00210039999754  / elapsed time: 1.463730e+01 min
60 percent done, actual water height:  0.00240039999705  / elapsed time: 1.767775e+01 min
70 percent done, actual water height:  0.00270039999656  / elapsed time: 2.080507e+01 min
80 percent done, actual water height:  0.00300039999607  / elapsed time: 2.405577e+01 min
90 percent done, actual water height:  0.00330039999558  / elapsed time: 2.737785e+01 min
100 percent done, actual water height:  0.00360039999509  / elapsed time: 3.077348e+01 min
0.000276722571637
0.0922408572124
Yade: normal exit.
Beendet

As you can see elapsed time and settling value is different in every
calculation ... this should not be, right?

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.