[Yade-users] [Question #271685]: Defining Restitution with matchmaker

2015-09-22 Thread ipemath
New question #271685 on Yade:
https://answers.launchpad.net/yade/+question/271685

I am doing projectile impact studies on a bed of spheres bounded by walls. I am 
assiging the same material for all the bodies(walls and spheres). How will I 
use MatchMaker to assign coefficient of restitution between bodies. The code 
snippet is given below

 
steelId=O.materials.append(FrictMat(young=193e6,poisson=.3,density=8000e-9,frictionAngle=.42285,label='steel'))

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],

[Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=((steelId,steelId,1.0))),es=MatchMaker(matches=((steelId,steelId,1.0],
[Law2_ScGeom_MindlinPhys_Mindlin()],
),
NewtonIntegrator(),
PyRunner(iterPeriod=50,command='trial()')
]

If I run this script I get the following error

[Ip2_FrictMat_FrictMat_MindlinPhys(en=MatchMaker(matches=(steelId,steelId,1.0)),es=MatchMaker(matches=(steelId,steelId,1.0)))],
TypeError: No registered converter was able to produce a C++ rvalue of type 
Eigen::Matrix from this Python object of type int


Please help


-- 
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 #271679]: Want to know how to call parallel within a python script

2015-09-22 Thread MikeZhao
New question #271679 on Yade:
https://answers.launchpad.net/yade/+question/271679

Nowadays I am trying to make the calculation faster , and I want to use its 
parallel function.

We usually use the command ‘ yade -j4 file.py' to call more cores when we do 
simulations via Yade alone. (file.py is the python script) However, I am now 
trying to couple Yade and FEM, so I can not use that command to call multiple 
cores. I wonder if I can add some commands into the file to call more cores?

 

-- 
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 #271679]: Want to know how to call parallel within a python script

2015-09-22 Thread Jan Stránský
Question #271679 on Yade changed:
https://answers.launchpad.net/yade/+question/271679

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Yang,

if you run Yade from pure Python like in [1], please try the (untested)
following piece of code and let us know if it helped or not. I personally
am very curious..

import sys
sys.argv.extend(['-j','4']) # should be before "import yadeimport"
import yadeimport # or another file name

cheers
Jan

[1]
https://yade-dem.org/doc/user.html#importing-yade-in-other-python-applications


2015-09-22 18:43 GMT+02:00 MikeZhao :

> New question #271679 on Yade:
> https://answers.launchpad.net/yade/+question/271679
>
> Nowadays I am trying to make the calculation faster , and I want to use
> its parallel function.
>
> We usually use the command ‘ yade -j4 file.py' to call more cores when we
> do simulations via Yade alone. (file.py is the python script) However, I am
> now trying to couple Yade and FEM, so I can not use that command to call
> multiple cores. I wonder if I can add some commands into the file to call
> more cores?
>
>
>
> --
> 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
>

-- 
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 #271685]: Defining Restitution with matchmaker

2015-09-22 Thread Klaus Thoeni
Question #271685 on Yade changed:
https://answers.launchpad.net/yade/+question/271685

Status: Open => Answered

Klaus Thoeni proposed the following answer:
Hi,

you have two possibilities. As you are only using one material there is
no need to define a matchmaker, i.e. en=1, es=1. If you still want to
use matchmaker define two materials with the same material parameters,
i.e. en=MatchMaker(matches=(mat1,mat2,1.0)).

Klaus

-- 
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