Re: [Yade-users] [Question #706571]: Problem with using rolling resistance in ViscElCap physics

2023-05-11 Thread Roxana Saghafian Larijani
Question #706571 on Yade changed:
https://answers.launchpad.net/yade/+question/706571

Status: Needs information => Open

Roxana Saghafian Larijani gave more information on the question:
Hi Bruno,

I have  only added  mR=0.001 in mat and mat2 as :
mat=O.materials.append( ViscElCapMat(..., mR=0.001,)) and
mat2=O.materials.append( ViscElCapMat(..., mR=0.001,)), and it did
not work.


Working version:
mat=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho,  Vb=vB, gamma=Gamma, 
theta=Theta, Capillar=True, CapillarType=CapType, kn=kkN, ks=kkS, cn=ccN, 
cs=ccS )
)
mat2=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho,Vb=vB, gamma=Gamma, 
theta=90, Capillar=True, CapillarType=CapType, kn=kkN, ks=kkS, cn=ccN, cs=ccS )
)

non working:
mat=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, mR=0.001, Vb=vB, 
gamma=Gamma, theta=Theta, Capillar=True, CapillarType=CapType, kn=kkN, ks=kkS, 
cn=ccN, cs=ccS )
)
mat2=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, mR=0.001, Vb=vB, 
gamma=Gamma, theta=90, Capillar=True, CapillarType=CapType, kn=kkN, ks=kkS, 
cn=ccN, cs=ccS )
)


Regards,
Roxana

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #706571]: Problem with using rolling resistance in ViscElCap physics

2023-05-10 Thread Roxana Saghafian Larijani
New question #706571 on Yade:
https://answers.launchpad.net/yade/+question/706571

Hi all,
I am trying to add rolling resistance (mR) to my simulation . When I add mR to 
my script, the simulation does not run (I think it gets stuck somehow as it 
does not give me any output that it gives in the case I do not add mR). I was 
wondering what might be the problem. 
I have attached my script below.


from yade import pack
from yade import utils, wrapper

###functions for exporting data
os.mkdir(os.getcwd()+'/VTK/')

def savePropData(O):
from yade import export
import numpy as np

path = os.getcwd()+'/VTK/'
vtkExporter = export.VTKExporter(path)
vtkExporter.exportSpheres(numLabel = O.iter, what = dict( \
  dist = 'b.state.pos.norm()', \
   linVelocity = 'b.state.vel', \
   angVelocity = 'b.state.angVel', \
   mass = 'b.state.mass', \
   mat_rand = 'b.material.id', \
   id='b.id' , \
   numOfContacts = 'len(b.intrs())'))
   

##Material properties  
   

fr=0.9

rho = 3000

r = 0.0005 


Gamma = 0.0 
Theta = 0.0
vB = 0.0 

CapType="Rabinovich"

kkN= 2*(100)
kkS= 2*(30)
ccN= 2*(0.0005)
ccS= 2*(0.0005)
###en=0.3
#time parameters
O.dt = 5*1e-6
it=math.floor(0.1/O.dt )
simT=10
#drum 
drumr=0.05
druml=0.03

mat=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, mR=0.001, Vb=vB, 
gamma=Gamma,  theta=Theta, Capillar=True, CapillarType=CapType, kn=kkN, ks=kkS, 
cn=ccN, cs=ccS )
)
mat2=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, mR=0.001, Vb=vB, 
gamma=Gamma, theta=90, Capillar=True, CapillarType=CapType, kn=kkN, ks=kkS, 
cn=ccN, cs=ccS )
)


#defining the spheres

sp=pack.SpherePack()
sp.makeCloud((drumr-0.7*drumr,drumr-0.7*drumr,0.0015),(drumr+0.7*drumr,drumr+0.7*drumr,0.0285),rMean=r,num=45000)
sp.toSimulation(material=mat)

Nprtcl=len(O.bodies)
print(Nprtcl)



#liquidMigration
VV=0.0
Vmin=0.0

for s in O.bodies:
if not type(s.shape)==wrapper.Sphere:
continue
s.state.Vf=VV * (4/3) * 3.14*(s.shape.radius)**3
s.state.Vmin=Vmin

Drum=geom.facetCylinder(material=mat2,center=(0.05,0.05,0.015), 
segmentsNumber=32, wallMask=4, 
radius=drumr,height=20*druml,orientation=Quaternion(Vector3(0,0,1),(pi/2.0)))
walls = O.bodies.append(Drum)
O.periodic = True
O.cell.setBox(0.5,0.5,0.03)




##engine
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()], 
allowBiggerThanPeriod = True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_ViscElCapMat_ViscElCapMat_ViscElCapPhys()],
[Law2_ScGeom_ViscElCapPhys_Basic()],

),
   
NewtonIntegrator(gravity=[0, -9.8, 0]),
RotationEngine(ids=walls,rotationAxis=[0,0,1],rotateAroundZero=True, 
zeroPoint=[0.05,0.05,0.015], angularVelocity=0.45),
PyRunner(command='savePropData(O)', iterPeriod=it)
]

#Functions 




import math

duration=simT/O.dt
O.run( 1 * math.floor(duration),True)




###saving for Restart
O.save('test.bz2')

import pandas as pd

intrState = pd.DataFrame(columns = 
['id1','id2','Fn','Fv','sCrit','normalForce0','normalForce1','normalForce2', 
'shearForce0','shearForce1','shearForce2'], dtype=object)

for ii in O.interactions:
iiState = 
pd.DataFrame({'id1':[ii.id1],'id2':[ii.id2],'Fn':[ii.phys.Fn],'Fv':[ii.phys.Fv],
 'sCrit':[ii.phys.sCrit], 'normalForce0':[ii.phys.normalForce[0]], 
'normalForce1':[ii.phys.normalForce[1]], 
'normalForce2':[ii.phys.normalForce[2]], 'shearForce0':[ii.phys.shearForce[0]], 
'shearForce1':[ii.phys.shearForce[1]], 'shearForce2':[ii.phys.shearForce[2]]})
intrState = intrState.append(iiState,ignore_index = True)

intrState.to_csv('tmpIntrState.csv')


###




Thanks in advance for your response!

Regards,
Roxana


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #704389]: Problem with OpenMP

2023-01-13 Thread Roxana Saghafian Larijani
New question #704389 on Yade:
https://answers.launchpad.net/yade/+question/704389

Dear all ,

I am trying to run my simulation on multiple cores using openMP (using j -n). 
However, I can see that only one core is being used at 100% cpu.  I have 
provided the MWE below and was wondering if you know what might be wrong?

I am not sure if it is the same problem as question 689131 or not. I tried to 
use sp.cellFill as Jan mentions in that question, but if I am not mistaken it 
cannot be used for periodic=False case , and my simulation is not periodic.

from yade import ymport
from yade import pack
from yade import utils, plot,wrapper


fr = 0.38
rho = 3000

En = 0.22
Et = 0.22
poi=0.3
yoM=200e6


r = 0.0005  


Gamma = 0.073 
Theta = 0
vB = 6.03  * 1e-9 
CapType="Rabinovich"
KN=2*(47.17)
KS=2*(13.48)
CN=2*(0.0053)
CS=2*(0.0015)



##definig material

mat=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, poisson=poi, young= yoM, 
Vb=vB, gamma=Gamma, theta=Theta, Capillar=True, CapillarType=CapType,en=En, 
et=Et,kn=KN,ks=KS,cn=CN, cs=CS)
)

#defining the spheres

sp=pack.SpherePack()
sp.makeCloud((-0.033,-0.033,-0.01),(0.033,0.033,0.01),rMean=r)
sp.toSimulation(material=mat)
Nprtcl=len(O.bodies)
print(Nprtcl)
Tt= utils.PWaveTimeStep()
O.dt = 0.5*Tt


#liquidMigration
VV=0.03
Vmin=0.0

for s in O.bodies:
if not type(s.shape)==wrapper.Sphere:
continue
s.state.Vf=VV * (4/3) * 3.14*(s.shape.radius)**3
s.state.Vmin=Vmin
##

Drum=geom.facetCylinder(material=mat,center=(0.0,0.0,0.0), segmentsNumber=32, 
radius=0.05,height=0.03,orientation=Quaternion(Vector3(0,0,1),(pi/2.0)))
walls = O.bodies.append(Drum)


##engine
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_ViscElCapMat_ViscElCapMat_ViscElCapPhys()],
[Law2_ScGeom_ViscElCapPhys_Basic()],

),
   
NewtonIntegrator(gravity=[0, -9.8, 0]),
RotationEngine(ids=walls,rotationAxis=[0,0,1],rotateAroundZero=True, 
zeroPoint=[0.0,0.0,0.0], angularVelocity=0.45),
LiqControl(label='lqc')
]


import math


O.timingEnabled = 1
from yade import timing

duration=60.0/O.dt
O.run( 2 * math.floor(duration),True)

timing.stats()

###saving for Restart
O.save('test.bz2')


Regards,
Roxana

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #704367]: OpenMp

2023-01-12 Thread Roxana Saghafian Larijani
Question #704367 on Yade changed:
https://answers.launchpad.net/yade/+question/704367

Status: Answered => Solved

Roxana Saghafian Larijani confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #704367]: OpenMp

2023-01-12 Thread Roxana Saghafian Larijani
New question #704367 on Yade:
https://answers.launchpad.net/yade/+question/704367

Dear all,

I would like to run my simulation in parallel on multiple cores on cluster. The 
number of particles in my system is below 1 million and based the suggestion in 
the documentation I want to use OpenMp (rather than MPI). In order to do so I 
have used O.run( Number of iteration ,True) in the script and I am using -j n 
as:

~/install/bin/yade-2022-04-13.git-5bd3ade -nx -j24 test.py

I was wondering if using -j n  is all I have to do to run it on multiple cores?


Sincerely yours,
Roxana Saghafian

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #704035]: O.save/O.load problem

2022-12-16 Thread Roxana Saghafian Larijani
Question #704035 on Yade changed:
https://answers.launchpad.net/yade/+question/704035

Status: Answered => Solved

Roxana Saghafian Larijani confirmed that the question is solved:
Thanks Karol Brzezinski, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #704035]: O.save/O.load problem

2022-12-08 Thread Roxana Saghafian Larijani
Question #704035 on Yade changed:
https://answers.launchpad.net/yade/+question/704035

Roxana Saghafian Larijani gave more information on the question:
Hi Karol,

Thanks for your suggestion! In fact, in line 47:
 
https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/ViscoelasticCapillarPM.hpp#L47,
 if CapType gets changed to int, ii.phys.dict() will work fine. 
However, in the second simulation with O.load, when I print ii.phys.Dict(), 
Fn,Fv, normalForce and ShearForce turn out to be Nan! 

Regards,
Roxana

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #704035]: O.save/O.load problem

2022-12-06 Thread Roxana Saghafian Larijani
Question #704035 on Yade changed:
https://answers.launchpad.net/yade/+question/704035

Roxana Saghafian Larijani posted a new comment:
Hi Karol,

Thanks for your response! I changed the interaction physics to ViscEl
instead of ViscElCap (Law2_ScGeom_ViscElPhys_Basic()), and surprisingly
the O.save/O.load process is working correctly! So maybe the problem
exists only in the model that I am using, and something related to
liquid bridges!

Regards,
Roxana Saghafian

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #704035]: O.save/O.load problem

2022-12-06 Thread Roxana Saghafian Larijani
Question #704035 on Yade changed:
https://answers.launchpad.net/yade/+question/704035

Status: Needs information => Open

Roxana Saghafian Larijani gave more information on the question:

Sorry, eta is an attribute that I have added to ViscElCapMat in the source 
code, so please consider the following script  without eta:

from yade import ymport
from yade import pack
from yade import utils, plot,wrapper
from yade import export


fr = 0.38
rho = 3700
En = 0.22
Et = 0.22
poi=0.3
yoM=200e6
r = 0.0005

Gamma = 0.072
Theta = 0
vB = 6.03 * 1e-9
CapType="Rabinovich"
Tc=0.00045

##defining material

mat=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, poisson=poi, young= yoM, 
Vb=vB, gamma=Gamma, theta=Theta, Capillar=True, CapillarType=CapType,en=En, 
et=Et,tc=Tc)
)
mat2=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, poisson=poi, young= yoM, 
Vb=vB, gamma=Gamma, theta=90, Capillar=True, CapillarType=CapType, en=En, 
et=Et,tc=Tc)
)

#defining the spheres

sp=pack.SpherePack()
sp.makeCloud((-0.035,-0.035,-0.01),(0.035,0.035,0.01),psdSizes=[0.001,0.002,0.003,0.004],
 psdCumm=[0.0,0.8,0.95,1.0])
sp.toSimulation(material=mat)
Nprtcl=len(O.bodies)
print(Nprtcl)
Tt= utils.PWaveTimeStep()
O.dt = 0.5*Tt
print(O.dt)

#liquidMigration
VV=0.03
Vmin=0.0
for s in O.bodies:
if not type(s.shape)==wrapper.Sphere:
continue
s.state.Vf=VV * (4/3) * 3.14*(s.shape.radius)**3
s.state.Vmin=Vmin
##

Drum=geom.facetCylinder(material=mat2,center=(0.0,0.0,0.0),radius=0.05,height=0.03,orientation=Quaternion(Vector3(0,0,1),(pi/2.0)))
walls = O.bodies.append(Drum)

##engine
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_ViscElCapMat_ViscElCapMat_ViscElCapPhys()],
[Law2_ScGeom_ViscElCapPhys_Basic()],

),

NewtonIntegrator(gravity=[0, -9.8, 0]),
RotationEngine(ids=walls,rotationAxis=[0,0,1],rotateAroundZero=True, 
zeroPoint=[0.0,0.0,0.0], angularVelocity=2.0),
LiqControl(label='lqc'),

VTKRecorder(iterPeriod=1000,recorders=['spheres','facets','colors'],fileName='test-')]

O.run( 50,True)

O.save('test.bz2')

Regards,
Roxana Saghafian

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #704035]: O.save/O.load problem

2022-12-05 Thread Roxana Saghafian Larijani
New question #704035 on Yade:
https://answers.launchpad.net/yade/+question/704035

Hi all,
I am trying to continue my simulation in a rotating drum after I stop it. To do 
this I save my first simulation using O.save at the end of my first script. I 
also export vtu files for visualisation in Paraview. This works correctly. Then 
I O.load the saved file (test.bz2) at the beginning of the second script. The 
simulation goes on and gives me vtu files. However, in the vtu files some 
points are Nan and I do not get a proper visualisation in Paraview (it does not 
show the particles in paraview). I was wondering if you could help me with this 
issue. 

I have attached my two scripts here as well :
Script 1:

from yade import ymport
from yade import pack
from yade import utils, plot,wrapper
from yade import export



nCG=1
fr = 0.38
rho = 3700
En = 0.22
Et = 0.22
poi=0.3
yoM=200e6
r = 0.0005


Gamma = 0.072
Theta = 0
vB = 6.03  * 1e-9 * (nCG**3)
Eta= 0.001 
CapType="Rabinovich"
Tc=0.00045

##defining material

mat=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, poisson=poi, young= yoM, 
Vb=vB, gamma=Gamma, eta=Eta, theta=Theta, Capillar=True, 
CapillarType=CapType,en=En, et=Et,tc=Tc)
)
mat2=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, poisson=poi, young= yoM, 
Vb=vB, gamma=Gamma, eta=0, theta=90, Capillar=True, CapillarType=CapType, 
en=En, et=Et,tc=Tc)
)


#defining the spheres

sp=pack.SpherePack()
sp.makeCloud((-0.035,-0.035,-0.01),(0.035,0.035,0.01),psdSizes=[0.001,0.002,0.003,0.004],
 psdCumm=[0.0,0.8,0.95,1.0])
sp.toSimulation(material=mat)
Nprtcl=len(O.bodies)
print(Nprtcl)
Tt= utils.PWaveTimeStep()
O.dt = 0.5*Tt
print(O.dt)

#liquidMigration
VV=0.03
Vmin=0.0
for s in O.bodies:
if not type(s.shape)==wrapper.Sphere:
continue
s.state.Vf=VV * (4/3) * 3.14*(s.shape.radius)**3
s.state.Vmin=Vmin
##

Drum=geom.facetCylinder(material=mat2,center=(0.0,0.0,0.0),radius=0.05,height=0.03,orientation=Quaternion(Vector3(0,0,1),(pi/2.0)))
walls = O.bodies.append(Drum)


##engine
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_ViscElCapMat_ViscElCapMat_ViscElCapPhys()],
[Law2_ScGeom_ViscElCapPhys_Basic()],

),
   
NewtonIntegrator(gravity=[0, -9.8, 0]),
RotationEngine(ids=walls,rotationAxis=[0,0,1],rotateAroundZero=True, 
zeroPoint=[0.0,0.0,0.0], angularVelocity=2.0),
LiqControl(label='lqc'),

VTKRecorder(iterPeriod=1000,recorders=['spheres','facets','colors'],fileName='test-')]




O.run( 50,True)

O.save('test.bz2')



Script 2:

from yade import ymport
from yade import pack
from yade import utils, plot,wrapper
from yade import export


O.load('test.bz2')
Nprtcl=len(O.bodies)
print(Nprtcl)


O.run(15000,True)

###
BTW, I am using this version yade-2022-04-13.git-5bd3ade.

Thanks in advance for your respopnse!

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )

2022-08-19 Thread Roxana Saghafian Larijani
Question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Answered => Solved

Roxana Saghafian Larijani confirmed that the question is solved:
Thanks for your time and responses to my questions!


Regards,
Roxana Saghafian

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )

2022-08-18 Thread Roxana Saghafian Larijani
Question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Needs information => Open

Roxana Saghafian Larijani gave more information on the question:
Please find the MWE below:

from yade import ymport
from yade import pack
from yade import utils, plot,wrapper


fr = 0.38
rho = 2500
En = 0.7
Et = 0.7
poi=0.21
yoM=63e6

O.dt = 0.05

r = 0.01#0.002381


##definig material

mat=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, poisson=poi, young= 
yoM,en=En, et=Et)
)

#defining the spheres

sp=pack.SpherePack()
sp.makeCloud((0.6,0.6,0.05),(1,1,0.15),rMean=r)
sp.toSimulation(material=mat)
Nprtcl=len(O.bodies)


Drum=geom.facetCylinder((0.8,0.8,0.1),radius=0.5,height=0.2,orientation=Quaternion(Vector3(0,0,1),(pi/2.0)),
 wallMask=4)
walls = O.bodies.append(Drum)
##periodic boundary

O.periodic = True
O.cell.setBox(5,5,0.2)

##engine
O.engines = [
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()],allowBiggerThanPeriod
 = True),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_ViscElCapMat_ViscElCapMat_ViscElCapPhys()],
[Law2_ScGeom_ViscElCapPhys_Basic()],

),

NewtonIntegrator(gravity=[0, -9.8, 0]),

RotationEngine(ids=walls,rotationAxis=[0,0,1],rotateAroundZero=True,zeroPoint=[0.8,0.8,0.1],angularVelocity=1.68)

]


from yade import qt
qt.View()


O.run()


>What is the result with Law2_ScGeom_FrictPhys_CundallStrack?
I checked it and the problem does not get solved by changing to Cundall.

>But firstly I would guess the problem is due to the fact
"If I remember correctly, the large bodies are not "periodically copied", so 
the spheres from "next" cells do not interact with the wall."
discussed in [2], #4
I think this is the problem! Because it is like the particles pass through the 
drum wall and does not interact with it!

Regards,
Roxana Saghafian




From: nore...@launchpad.net  on behalf of Jan Stránský 

Sent: Thursday, August 18, 2022 9:20 AM
To: Saghafian Larijani, Roxana (UT-ET) 
Subject: Re: [Question #702751]: periodic boundary in the direction of the 
length of a rotating drum (cylinder )

Your question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Open => Needs information

Jan Stránský requested more information:
> However, I still have a problem.

please, provide a MWE as discussed above.

> Might it be because I am using (Law2_ScGeom_ViscElCapPhys_Basic()) as
it is mentioned in the question 429604?

What is the result with Law2_ScGeom_FrictPhys_CundallStrack?

But firstly I would guess the problem is due to the fact
"If I remember correctly, the large bodies are not "periodically copied", so 
the spheres from "next" cells do not interact with the wall."
discussed in [2], #4
If it is this case or not would be clear with the MWE.

Cheers
Jan

[2] https://answers.launchpad.net/yade/+question/701266

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/yade/+question/702751

You received this question notification because you asked the question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )

2022-08-17 Thread Roxana Saghafian Larijani
Question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Answered => Open

Roxana Saghafian Larijani is still having a problem:
Thank you for your response! I managed to display the rotating drum in the same 
way as the default case by shifting the drum and the particles.
However, I still have a problem. It seems that there are some problems with the 
contact detection of some particles, and they get out of the drum. Might it be 
because I am using (
Law2_ScGeom_ViscElCapPhys_Basic()
)  as it is mentioned in the question 429604?

Regards,
Roxana Saghafian



From: nore...@launchpad.net  on behalf of Jan Stránský 

Sent: Monday, August 15, 2022 2:25 PM
To: Saghafian Larijani, Roxana (UT-ET) 
Subject: Re: [Question #702751]: periodic boundary in the direction of the 
length of a rotating drum (cylinder )

Your question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Open => Answered

Jan Stránský proposed the following answer:
It depends on definition.
In Yade, if you enable periodicity, it is applied in 3 direction, no matter 
what.
But enlarging the periodic cell dimensions, you can "disable" some directions, 
making the simulation being practically periodic only in some direction(s).
Still, the **visualization** is done such that all particles are displayed 
inside the cell. But the periodicity itself (i.e. periodic contact detection 
between particles and periodic images of other particles) is not effectively 
present in "disabled" directions.

Cheers
Jan

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/yade/+question/702751/+confirm?answer_id=4

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/yade/+question/702751

You received this question notification because you asked the question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )

2022-08-15 Thread Roxana Saghafian Larijani
Question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Answered => Open

Roxana Saghafian Larijani is still having a problem:
Isn’t it the case that the periodic boundary is being implemented in all
three directions? Is there any way I can avoid periodic boundary
condition in x and y direction?

Regards,
Roxana Saghafian


Roxana Saghafian Larijani | PhD student
ET-CME, UTwente | https://tusail.eu<https://tusail.eu/>



From: nore...@launchpad.net  on behalf of Jan Stránský 

Sent: Monday, August 15, 2022 1:31 PM
To: Saghafian Larijani, Roxana (UT-ET) 
Subject: Re: [Question #702751]: periodic boundary in the direction of the 
length of a rotating drum (cylinder )

Your question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Open => Answered

Jan Stránský proposed the following answer:
> I have also attached the Drum.stl

attachments are not possible here in launchpad questions..
Please either provide the content of the file, or make your code using 
alternatives, like facetCylinder

> it gets devided to four different parts that might be right for other
cases but for my case it does not seem like a rotating drum.

Thanks for clarification.
Actually, it IS proper rotating drum and is "right" :-)
It is just the way it is displayed, particles positions wrapped inside the 
periodic cell, not outside.
To overcome this issue, you can:
- postprocess the positions to look more natural
- put the drum and particles to the "center" of the cell (i.e. the 
visualization of particles is natural). Note that the results should be exactly 
the same as in the "default" case.

Cheers
Jan

--
If this answers your question, please go to the following page to let us
know that it is solved:
https://answers.launchpad.net/yade/+question/702751/+confirm?answer_id=2

If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https://answers.launchpad.net/yade/+question/702751

You received this question notification because you asked the question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )

2022-08-15 Thread Roxana Saghafian Larijani
Question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Needs information => Open

Roxana Saghafian Larijani gave more information on the question:
Hello Jan,
The problem is that I think the periodic boundary is being applied in all 
directions (but I only need z direction to have period boundary condition ). 
So, when I increase the dimensions of O.cell.setBox, it gets devided to four 
different parts that might be right for other cases but for my case it does not 
seem like a rotating drum. With smaller dimensions of O.cell.setBox, also it 
does not give me good result as I think the periodic boundary condition is 
being implemented in all directions.
This is my script; I have also attached the Drum.stl file.

from yade import ymport
from yade import pack
from yade import utils, plot,wrapper

###functions for exporting data
os.mkdir(os.getcwd()+'/VTK/')

def savePropData(O):
from yade import export
import numpy as np

path = os.getcwd()+'/VTK/'
vtkExporter = export.VTKExporter(path)
vtkExporter.exportSpheres(numLabel = O.iter, what = dict( \
  dist = 'b.state.pos.norm()', \
   linVelocity = 'b.state.vel', \
   angVelocity = 'b.state.angVel', \
   mass = 'b.state.mass', \
   mat_rand = 'b.material.id', \
   numOfContacts = 'len(b.intrs())'))





fr = 0.38
rho = 2500
En = 0.7
Et = 0.7
poi=0.21
yoM=63e6
O.dt = 0.05
r = 0.008#0.002381
Gamma =0.073  #20.6 * 1e-3
Theta = 35
vB = 0.0
CapType="Rabinovich"

##definig material

mat=O.materials.append(
ViscElCapMat(frictionAngle=fr, density=rho, poisson=poi, young= yoM, 
Vb=vB, gamma=Gamma,  theta=Theta, Capillar=True, CapillarType=CapType,en=En, 
et=Et)
)
mat2=O.materials.append(
ViscElCapMat(frictionAngle=0.29, density=rho, poisson=0.35, young= 
12e6, Vb=vB, gamma=Gamma,  theta=90, Capillar=True, 
CapillarType=CapType,en=0.72, et=0.72)
)
#defining the spheres

sp=pack.SpherePack()
sp.makeCloud((-0.2,-0.2,-0.05),(0.2,0.2,0.05),rMean=r)
sp.toSimulation(material=mat)
Nprtcl=len(O.bodies)


walls = O.bodies.append(ymport.stl('Drum.stl',material=mat2))
##periodic boundary

O.periodic = True
O.cell.setBox(0.4,0.4,0.1)

##engine
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), 
Bo1_Facet_Aabb()],allowBiggerThanPeriod=True ),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_ViscElCapMat_ViscElCapMat_ViscElCapPhys()],
[Law2_ScGeom_ViscElCapPhys_Basic()],

),

NewtonIntegrator(gravity=[0, -9.8, 0]),

RotationEngine(ids=walls,rotationAxis=[0,0,1],rotateAroundZero=True,angularVelocity=1.68),
PyRunner(command='savePropData(O)', iterPeriod=5000)
]


O.run()

Thank you!

Regards,
Roxana Saghafian




From: nore...@launchpad.net  on behalf of Jan Stránský 

Sent: Monday, August 15, 2022 9:30 AM
To: Saghafian Larijani, Roxana (UT-ET) 
Subject: Re: [Question #702751]: periodic boundary in the direction of the 
length of a rotating drum (cylinder )

Your question #702751 on Yade changed:
https://answers.launchpad.net/yade/+question/702751

Status: Open => Needs information

Jan Stránský requested more information:
Hello,

> But I get a very weird simulation.

please be (much) more specific.

> Is the center of the created box using O.cell.setBox(5,5,0.2) on
(0,0,0) ?

Periodic cell has no center. Or has arbitrary center at any point. It is
one of the (possibly non-intuitive) features of periodicity.

> I was wondering if you could help me find where are my mistakes and
how I can apply the boundary condition in this case.

The code seems OK.
Please describe your problem more in detail.
Please provide a MWE [1], i.e. provide Drum.stl or replace it e.g. with 
something like geom.facetCylinder

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/yade/+question/702751

You received this question notification because you asked the question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )

2022-08-12 Thread Roxana Saghafian Larijani
New question #702751 on Yade:
https://answers.launchpad.net/yade/+question/702751

Hello,
I am trying to simulate a rotating drum. To avoid the effect of the front and 
back wall of the drum, instead of choosing the length of the drum very long I 
want to set periodic boundary only in this direction(z direction). So I defined 
a box with the same dimension of the drum in the z direction, and bigger than 
the radius of the drum. The drum center is located on (0,0,0) with the radius 
0.5m and length of 0.2. So I defined the box as :

sp=pack.SpherePack()
sp.makeCloud((-0.3,-0.3,-0.05),(0.3,0.3,0.05),rMean=r)
sp.toSimulation(material=mat)

walls = O.bodies.append(ymport.stl('Drum.stl',material=mat2))


O.periodic = True
O.cell.setBox(5,5,0.2)

Based on  the answers to some similar questions I also  added 
allowBiggerThanPeriod=True:
InsertionSortCollider([Bo1_Sphere_Aabb(), 
Bo1_Facet_Aabb()],allowBiggerThanPeriod=True ),

But I get a very weird simulation.
 Is the center of the created box using  O.cell.setBox(5,5,0.2)  on (0,0,0) ?

I was wondering if you could help me find where are my mistakes and how I can 
apply the boundary condition in this case.

Regards,
Roxana Saghafian


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #702522]: Adding the Maximum capillary force of wet particles in contact

2022-07-20 Thread Roxana Saghafian Larijani
New question #702522 on Yade:
https://answers.launchpad.net/yade/+question/702522

Hi,
I am using the ViscoElasticCapillar phys but in this model the capillary force 
is only added when the penetrationDepth is negative which means particles do 
not have overlap. However, the maximum capillary force which is equal to 
-(2 * M_PI * R * Gamma * cos(phys.theta));
will be exerted on the wet particles while the penetration depth is >=0. I 
tried to add this force but I am not sure if I am adding it in the right place 
as the normalForce plot does not change .
In line 205 TIMING_DELTAS_CHECKPOINT("force_calculation_penetr"); I think here 
the normalForce for of the particles in contact is being calculated based on 
the viscoelatic physics. Then here I wanted to add the maximum capillary force 
that I mentioned as below starting from the line " if 
(geom.penetrationDepth>0.0 && phys.liqBridgeCreated){"


TIMING_DELTAS_CHECKPOINT("force_calculation_penetr");
if (computeForceTorqueViscEl(_geom, _phys, I, force, torque1, 
torque2)) {
addForce(id1, -force, scene2);
addForce(id2, force, scene2);
addTorque(id1, torque1, scene2);
addTorque(id2, torque2, scene2);

return true;
} else {
return false;
}
if (geom.penetrationDepth>0.0 && phys.liqBridgeCreated){

 const auto MaxCapForce= 2 * M_PI *phys.R 
*phys.gamma*cos(phys.theta);

 phys.normalForce = -(MaxCapForce) * geom.normal;

addForce(id1, -phys.normalForce, scene2);
addForce(id2, phys.normalForce, scene2);
}
}

Thanks in advance for your answer!

Regards,
Roxana Saghafian

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #702446]: liquid migration

2022-07-11 Thread Roxana Saghafian Larijani
New question #702446 on Yade:
https://answers.launchpad.net/yade/+question/702446

Hello, I am using the liquid migration feature in Yade and have a couple of 
questions:

1) in order to use this model  only LiqControl should be added to the engine 
before the newton integrator, is this right?
In addition, I wanted to check that the liquid bridge volume Vb will be 
calculated based on the given Vf and  Vmin. So, we should determine Vf and Vmin 
for each particle. Then the quantity initialised for Vb must not be important. 
Is this correct ?

2) If I want to track the liquid content amount of each of the particles in 
each timestep, in which parameter is it stored ? Vf?


Thank you in advance!


Regards,
Roxana Saghafian




-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp