yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #11442
Re: [Question #268954]: Calculation efficiency of the last version of Yade
Question #268954 on Yade changed:
https://answers.launchpad.net/yade/+question/268954
Status: Open => Answered
Chareyre proposed the following answer:
Can you please add "O.timingEnabled=True" at the beginning of the script
and "from yade import timing; timing.stats()" at the end, and post the
results here.
On 7 July 2015 at 10:41, Henry <question268954@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Question #268954 on Yade changed:
> https://answers.launchpad.net/yade/+question/268954
>
> Status: Answered => Open
>
> Henry is still having a problem:
> Dear Anton,
>
> Many thank for your help, and the script as follows:
>
> # -*- coding: utf-8
> # This file is used to import PFC3D model to Yade model,and do direct
> shear test
>
> from yade import utils,qt
> from yade import plot
> from yade.pack import *
> from numpy import *
>
> qt.View()
>
> O=Omega()
>
>
> #材料参数
>
> soil_poi=0.01
> soil_coh=2.5e6
> soil_Friction=40.0
> soil_young=2*5.0e9
> soil_Dens=2500
>
>
>
> TopWall_Mat=O.materials.append(FrictMat(density=1,young=Wall_young,poisson=.1,frictionAngle=radians(Wall_Friction),label='TopWall'))
>
> #Definition of bodies constituing the numerical model : six boxes
> corresponding to sids of the simple shear box, containing a particle samples
> ...........
> O.bodies.append([leftBox2,rightBox2,lowBox2,behindBox2,inFrontBox2])
>
>
>
> SoilMat=O.materials.append(FrictMat(density=soil_Dens,young=soil_young,poisson=soil_poi,frictionAngle=radians(soil_Friction),label='soil'))
>
> Clump_file=open("Sample.sphere","r") #
> # import the sphere particles
> .....
>
> print("Total sphere Number:",Total_Sphere_NUM)
> O.engines=[
> ForceResetter(),
>
> InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb(),Bo1_Facet_Aabb()]),
> InteractionLoop(
>
> [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom()],
> [Ip2_FrictMat_FrictMat_FrictPhys()],
> [Law2_ScGeom_FrictPhys_CundallStrack()]
> ),
> GravityEngine(gravity=(0,-9.81,0)),
> NewtonIntegrator(damping=0.6, label='Newton'),
> PyRunner(command='checkUnbalanced()',iterPeriod=100
> ,label='checker'), #,realPeriod=0.1
> PyRunner(command='checkDamping()',iterPeriod=1000,label='checker_Damp')
> #iterPeriod=500
> ]
>
> def checkDamping():
> if O.iter>4990:
> Newton.damping=0.4
> O.dt=.5*utils.PWaveTimeStep()
>
>
> def checkUnbalanced():
> # at the very start, unbalanced force can be low as there is only few
> contacts, but it does not mean the packing is stable
> if O.iter<2990:return
> # the rest will be run only if unbalanced is < .05 (stabilized packing)
> if utils.unbalancedForce()>.1: return
> # start plotting the data now, it was not interesting before
>
> O.engines=O.engines+[PyRunner(command='addPlotData()',iterPeriod=1000)]
> #iterPeriod=200
> checker.command='unloadPlate()'
>
> # besides unbalanced force evolution, also plot the displacement-force
> diagram
> plot.plots={'i':('unbalanced',),'Normal_Dis':('Normal_Stress',)}
>
> # plot.plots={'i':('unbalanced',None,O.energy.keys)}
> plot.plot()
> raw_input()
>
> Thanks a lot!
>
> Best regard
> Henr
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.