bouncing sphere example executing issue

Asked by chi

Hi All,

I am new to yade and I tried the example bouncing sphere
but It doesn't show any result
can you assist

chi@ubuntu:/tmp$ yade
Welcome to Yade 1.07.0
TCP python prompt on localhost:9000, auth cookie `ecyska'
XMLRPC info provider on http://localhost:21000
/usr/lib/python2.7/dist-packages/IPython/frontend.py:30: UserWarning: The top-level `frontend` package has been deprecated. All its subpackages have been moved to the top `IPython` level.
  warn("The top-level `frontend` package has been deprecated. "
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]

Yade [1]: execfile('exampl.py',globals())

Yade [2]: O.run()

Yade [3]: qt.View()
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/usr/bin/yade in <module>()
----> 1 qt.View()

NameError: name 'qt' is not defined

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
chi
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Does

from yade import qt; qt.View()

help?

cheers
Jan

2015-06-18 20:06 GMT+02:00 chi <email address hidden>:

> New question #268306 on Yade:
> https://answers.launchpad.net/yade/+question/268306
>
>
> Hi All,
>
> I am new to yade and I tried the example bouncing sphere
> but It doesn't show any result
> can you assist
>
> chi@ubuntu:/tmp$ yade
> Welcome to Yade 1.07.0
> TCP python prompt on localhost:9000, auth cookie `ecyska'
> XMLRPC info provider on http://localhost:21000
> /usr/lib/python2.7/dist-packages/IPython/frontend.py:30: UserWarning: The
> top-level `frontend` package has been deprecated. All its subpackages have
> been moved to the top `IPython` level.
> warn("The top-level `frontend` package has been deprecated. "
> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key
> for showing help), F10 both, F9 generator, F8 plot. ]]
>
> Yade [1]: execfile('exampl.py',globals())
>
> Yade [2]: O.run()
>
> Yade [3]: qt.View()
> ---------------------------------------------------------------------------
> NameError Traceback (most recent call last)
> /usr/bin/yade in <module>()
> ----> 1 qt.View()
>
> NameError: name 'qt' is not defined
>
>
> --
> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jan Stránský (honzik) said :
#2

or alternatively just press F11 key (as mentioned by Yade as startup)

2015-06-18 20:10 GMT+02:00 Jan Stránský <email address hidden>:

> Does
>
> from yade import qt; qt.View()
>
> help?
>
> cheers
> Jan
>
>
>
> 2015-06-18 20:06 GMT+02:00 chi <email address hidden>:
>
>> New question #268306 on Yade:
>> https://answers.launchpad.net/yade/+question/268306
>>
>>
>> Hi All,
>>
>> I am new to yade and I tried the example bouncing sphere
>> but It doesn't show any result
>> can you assist
>>
>> chi@ubuntu:/tmp$ yade
>> Welcome to Yade 1.07.0
>> TCP python prompt on localhost:9000, auth cookie `ecyska'
>> XMLRPC info provider on http://localhost:21000
>> /usr/lib/python2.7/dist-packages/IPython/frontend.py:30: UserWarning: The
>> top-level `frontend` package has been deprecated. All its subpackages have
>> been moved to the top `IPython` level.
>> warn("The top-level `frontend` package has been deprecated. "
>> [[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use
>> h-key for showing help), F10 both, F9 generator, F8 plot. ]]
>>
>> Yade [1]: execfile('exampl.py',globals())
>>
>> Yade [2]: O.run()
>>
>> Yade [3]: qt.View()
>>
>> ---------------------------------------------------------------------------
>> NameError Traceback (most recent call
>> last)
>> /usr/bin/yade in <module>()
>> ----> 1 qt.View()
>>
>> NameError: name 'qt' is not defined
>>
>>
>> --
>> 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 : <email address hidden>
>> Unsubscribe : https://launchpad.net/~yade-users
>> More help : https://help.launchpad.net/ListHelp
>>
>
>

Revision history for this message
chi (chiraniw) said :
#3

I tried F 11 but it doesn't view any. I think that command suppose to view the simulation
below is the script

# basic simulation showing sphere falling ball gravity,
# bouncing against another sphere representing the support

# DATA COMPONENTS

# add 2 particles to the simulation
# they the default material (utils.defaultMat)
O.bodies.append([
   # fixed: particle's position in space will not change (support)
   sphere(center=(0,0,0),radius=.5,fixed=True),
   # this particles is free, subject to dynamics
   sphere((0,0,2),.5)
])

# FUNCTIONAL COMPONENTS

# simulation loop -- see presentation for the explanation
O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_L3Geom()], # collision geometry
      [Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
      [Law2_L3Geom_FrictPhys_ElPerfPl()] # contact law -- apply forces
   ),
   # Apply gravity force to particles. damping: numerical dissipation of energy.
   NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1)
]

# set timestep to a fraction of the critical timestep
# the fraction is very small, so that the simulation is not too fast
# and the motion can be observed
O.dt=.5e-4*PWaveTimeStep()

# save the simulation, so that it can be reloaded later, for experimentation

O.saveTmp()

------------------------

Revision history for this message
chi (chiraniw) said :
#4

Can you help on above

Revision history for this message
chi (chiraniw) said :
#5

Dear Jan,

Thanks for the support given.
Now I'm fine with how this works