question on CapillaryPhys
Hi,
I want to model a wet granular material (sand). I tried to create a model with following engines:
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GravityEngine(
NewtonIntegrat
]
There an error message occured in yade:
me@debian ~/YADE/
Welcome to Yade bzr2877
TCP python prompt on localhost:9001, auth cookie `duasec'
XMLRPC info provider on http://
Running script converted-model.py
Traceback (most recent call last):
File "/home/
execfile(
File "converted-
[Law2_
TypeError: No registered converter was able to produce a C++ rvalue of type boost::
What did I do wrong?
Unfortunatly I could not find an example, that shows how to use CapillaryPhys.
Regards,
Christian.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Christian Jakob
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Law2_ScGeom_
per-interaction basis. It has a loop inside, so you need to declare it
outside the interaction loop.
Also note that it is NOT a contact law. You need to also add a contact
law if you want to see particles interacting like solid bodies. Any
combination with a ScGeom-based contact law should work:
Capillarity+
In the engines definition, it should read like this:
...
InteractionLoop(
[Ig2_Sphere_
[Ip2_FrictMat_
),
Law2_ScGeom_
...
We don't have any example script at the moment, the only example is
using the older method with preprocessors. If you manage to write a
simple script, it would be nice to include it in Yade's examples.
Bruno
Revision history for this message
|
#2 |
Yes, of course I can create an example with capillaryPhys, but I still need a little help ...
I tried
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
Law2_ScGeom_
... and ...
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
Law2_ScGeom_
... with result:
segmentation fault :(
Regards,
Christian
Revision history for this message
|
#3 |
Hi Christian,
please, start yade in debug-mode [1] and post here output messages.
[1] https:/
Anton
On Fri, Jul 29, 2011 at 2:01 PM, Christian Jakob
<email address hidden> wrote:
> Question #166257 on Yade changed:
> https:/
>
> Christian Jakob posted a new comment:
> Yes, of course I can create an example with capillaryPhys, but I still
> need a little help ...
>
> I tried
>
> InteractionLoop(
> [Ig2_Sphere_
> [Ip2_FrictMat_
> [Law2_ScGeom_
> ),
> Law2_ScGeom_
>
> ... and ...
>
> InteractionLoop(
> [Ig2_Sphere_
> [Ip2_FrictMat_
> [Law2_ScGeom_
> ),
> Law2_ScGeom_
>
>
> ... with result:
>
> segmentation fault :(
>
> Regards,
>
> Christian
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Revision history for this message
|
#4 |
I recompiled yade and started calculation again:
me@debian ~/YADE/
Welcome to Yade bzr2877 (debug build)
TCP python prompt on localhost:9000, auth cookie `ecdkas'
XMLRPC info provider on http://
Running script capillaryPhys-
python: /usr/include/
SIGSEGV/SIGABRT handler called; gdb batch file is `/tmp/yade-
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://
[Thread debugging using libthread_db enabled]
[New Thread 0x7fc271ec1700 (LWP 23743)]
[New Thread 0x7fc27bfff700 (LWP 23742)]
[New Thread 0x7fc280a34700 (LWP 23741)]
0x00007fc2a335c7dd in nanosleep () from /lib/libpthread
No symbol "info" in current context.
Thread 4 (Thread 0x7fc280a34700 (LWP 23741)):
#0 0x00007fc2a221f8d3 in select () from /lib/libc.so.6
#1 0x00000000004f7fd3 in ?? ()
#2 0x00000000004a7ba5 in PyEval_EvalFrameEx ()
#3 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#4 0x00000000004a7752 in PyEval_EvalFrameEx ()
#5 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#6 0x0000000000538a10 in ?? ()
#7 0x000000000041ef47 in PyObject_Call ()
#8 0x0000000000427c1f in ?? ()
#9 0x000000000041ef47 in PyObject_Call ()
#10 0x00000000004a1a53 in PyEval_
#11 0x00007fc280a3ecab in ?? () from /usr/lib/
#12 0x00007fc280ce5498 in ?? () from /usr/lib/
#13 0x00007fc280d1568a in ?? () from /usr/lib/
#14 0x00007fc29e504e15 in ?? () from /usr/lib/
#15 0x00007fc2a33548ba in start_thread () from /lib/libpthread
#16 0x00007fc2a222602d in clone () from /lib/libc.so.6
#17 0x0000000000000000 in ?? ()
Thread 3 (Thread 0x7fc27bfff700 (LWP 23742)):
#0 0x00007fc2a221f8d3 in select () from /lib/libc.so.6
#1 0x00000000004f7fd3 in ?? ()
#2 0x00000000004a7ba5 in PyEval_EvalFrameEx ()
#3 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#4 0x00000000004a7752 in PyEval_EvalFrameEx ()
#5 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#6 0x0000000000538a10 in ?? ()
#7 0x000000000041ef47 in PyObject_Call ()
#8 0x0000000000427c1f in ?? ()
#9 0x000000000041ef47 in PyObject_Call ()
#10 0x00000000004a1a53 in PyEval_
#11 0x00007fc280a3ecab in ?? () from /usr/lib/
#12 0x00007fc280ce5498 in ?? () from /usr/lib/
#13 0x00007fc280d1568a in ?? () from /usr/lib/
#14 0x00007fc29e504e15 in ?? () from /usr/lib/
#15 0x00007fc2a33548ba in start_thread () from /lib/libpthread
#16 0x00007fc2a222602d in clone () from /lib/libc.so.6
#17 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7fc271ec1700 (LWP 23743)):
#0 0x00007fc2a21f73ad in waitpid () from /lib/libc.so.6
#1 0x00007fc2a2195299 in ?? () from /lib/libc.so.6
#2 0x00007fc2a21955d0 in system () from /lib/libc.so.6
#3 0x00007fc2a3654f6a in crashHandler (sig=6) at core/main/
#4 <signal handler called>
#5 0x00007fc2a2189165 in raise () from /lib/libc.so.6
#6 0x00007fc2a218bf70 in abort () from /lib/libc.so.6
#7 0x00007fc2a21822b1 in __assert_fail () from /lib/libc.so.6
#8 0x00007fc288ec3091 in boost::
#9 0x00007fc288e7f6d9 in Law2_ScGeom_
#10 0x00007fc29900eec3 in Scene::
#11 0x00007fc299015e8b in SimulationFlow:
#12 0x00007fc299017424 in ThreadWorker:
#13 0x00007fc299016989 in ThreadRunner::call (this=0xd66f20) at /home/me/
#14 0x00007fc2990166cb in ThreadRunner::run (this=0xd66f20) at /home/me/
#15 0x00007fc2990e3e03 in boost::
#16 0x00007fc2990d4534 in boost::
#17 0x00007fc2990c3e89 in boost::
#18 0x00007fc2990b0b6e in boost::
#19 0x00007fc2991870af in boost::
#20 0x00007fc2991614c6 in boost::
#21 0x00007fc2a0dc5200 in thread_proxy () from /usr/lib/
#22 0x00007fc2a33548ba in start_thread () from /lib/libpthread
#23 0x00007fc2a222602d in clone () from /lib/libc.so.6
#24 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7fc2a3764700 (LWP 23738)):
#0 0x00007fc2a335c7dd in nanosleep () from /lib/libpthread
#1 0x00007fc285dea25e in pyOmega::wait (this=0xc626b0) at py/wrapper/
#2 0x00007fc285de9db8 in pyOmega::run (this=0xc626b0, numIter=10000, doWait=true) at py/wrapper/
#3 0x00007fc285ef7882 in boost::
#4 0x00007fc285ed93de in boost::
#5 0x00007fc285eb7f25 in boost::
#6 0x00007fc29fd7dbde in boost::
#7 0x00007fc29fd7de88 in ?? () from /usr/lib/
#8 0x00007fc29fd854fb in boost::
#9 0x00007fc29fd7a788 in ?? () from /usr/lib/
#10 0x000000000041ef47 in PyObject_Call ()
#11 0x00000000004a72b8 in PyEval_EvalFrameEx ()
#12 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#13 0x00000000004a9692 in PyEval_EvalCode ()
#14 0x00000000004c98be in PyRun_FileExFlags ()
#15 0x00000000004a0b87 in ?? ()
#16 0x00000000004a7ba5 in PyEval_EvalFrameEx ()
#17 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#18 0x00000000004a7752 in PyEval_EvalFrameEx ()
#19 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#20 0x00000000004a7752 in PyEval_EvalFrameEx ()
#21 0x00000000004a95c1 in PyEval_EvalCodeEx ()
#22 0x00000000004a9692 in PyEval_EvalCode ()
#23 0x00000000004c98be in PyRun_FileExFlags ()
#24 0x00000000004c9ad4 in PyRun_SimpleFil
#25 0x000000000041a6bd in Py_Main ()
#26 0x00007fc2a2175c4d in __libc_start_main () from /lib/libc.so.6
#27 0x00000000004198d9 in _start ()
Abgebrochen
Revision history for this message
|
#5 |
Oh, sorry. I copy/pasted your code without checking everything. The mix
between ScGeom and ScGeom6D is probably the reason of the crash.
Try:
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
Law2_ScGeom_
On 29/07/11 13:01, Christian Jakob wrote:
> Question #166257 on Yade changed:
> https:/
>
> Christian Jakob posted a new comment:
> Yes, of course I can create an example with capillaryPhys, but I still
> need a little help ...
>
> I tried
>
> InteractionLoop(
> [Ig2_Sphere_
> [Ip2_FrictMat_
> [Law2_ScGeom_
> ),
> Law2_ScGeom_
>
> ... and ...
>
> InteractionLoop(
> [Ig2_Sphere_
> [Ip2_FrictMat_
> [Law2_ScGeom_
> ),
> Law2_ScGeom_
>
>
> ... with result:
>
> segmentation fault :(
>
> Regards,
>
> Christian
>
--
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43
________________
Revision history for this message
|
#6 |
> Oh, sorry. I copy/pasted your code without checking everything. The mix
> between ScGeom and ScGeom6D is probably the reason of the crash.
> Try:
>
> InteractionLoop(
> [Ig2_Sphere_
> [Ip2_FrictMat_
> [Law2_ScGeom_
> ),
> Law2_ScGeom_
No, this is not the reason of crash. I get the same result: segmentation fault.
Revision history for this message
|
#7 |
Apparently, the postLoad() function is not called when the simulation is
built via a script, and so the law is not initialized correctly. It is a
bug.
It works correctly with the preprocessor because this one save a simulation.
A crazy workaround should be to save/reload before the 1st iteration in
your script. Try it?
Could you send me the script? it will be simpler to fix the problem with
a crashing example.
Bruno
Revision history for this message
|
#8 |
Good morning,
Thanks for the hint. I did a O.saveTmp() and O.loadTmp() before starting first iteration and there occurs a new warning:
WARNING: cannot open files used for capillary law, all forces will be null. Instructions on how to download and install them is found here : https:/
segmentation fault
Regards,
Christian
Revision history for this message
|
#9 |
I created a simple example script:
#------
#!/usr/bin/python
# -*- coding: utf-8 -*-
#example script to demonstrate how to implement capillaryPhys
shear_modulus = 3e7
poisson_ratio = 0.3
young_modulus = 2*shear_
friction = 0.5
angle=atan(
local_damping = 0.01
id_SphereMat=
SphereMat=
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
Law2_ScGeom_
GravityEngine(
NewtonIntegrat
]
O.bodies.
O.bodies.
O.saveTmp()
O.loadTmp()
O.run(100)
#------
Now there occurs following error:
me@debian ~/YADE/
Welcome to Yade bzr2877
TCP python prompt on localhost:9000, auth cookie `sycsae'
XMLRPC info provider on http://
Running script capillaryPhys-
WARNING: cannot open files used for capillary law, all forces will be null. Instructions on how to download and install them is found here : https:/
*** glibc detected *** /usr/bin/python: corrupted double-linked list: 0x00007f52e4003900 ***
======= Backtrace: =========
/lib/libc.
/lib/libc.
/lib/libc.
/lib/libc.
/usr/lib/
/usr/lib/
/usr/lib/
/home/me/
/home/me/
/home/me/
/home/me/
/home/me/
/home/me/
/home/me/
/usr/lib/
/lib/libpthread
/lib/libc.
======= Memory map: ========
00400000-0061d000 r-xp 00000000 08:01 2891650 /usr/bin/python2.6
0081d000-0087f000 rw-p 0021d000 08:01 2891650 /usr/bin/python2.6
0087f000-0088e000 rw-p 00000000 00:00 0
00b4c000-0240d000 rw-p 00000000 00:00 0 [heap]
7f52d8000000-
7f52d8021000-
7f52dd533000-
7f52dd534000-
7f52ddd34000-
7f52dddb5000-
7f52dde44000-
7f52dded0000-
7f52ddf1f000-
7f52ddf26000-
7f52de125000-
7f52de126000-
7f52de17f000-
7f52de37e000-
7f52de381000-
7f52de385000-
7f52de584000-
7f52de585000-
7f52de5ba000-
7f52de7b9000-
7f52de7bb000-
7f52de7bd000-
7f52de841000-
7f52dea40000-
7f52dea45000-
7f52dea4b000-
7f52dec4a000-
7f52dec4b000-
7f52dec53000-
7f52dee53000-
7f52dee54000-
7f52dee5b000-
7f52df05a000-
7f52df05b000-
7f52df062000-
7f52df261000-
7f52df262000-
7f52df264000-
7f52df463000-
7f52df464000-
7f52df472000-
7f52df672000-
7f52df673000-
7f52df67c000-
7f52df87b000-
7f52df87c000-
7f52df88a000-
abort
Regards,
Christian.
Revision history for this message
|
#10 |
Its working with this engines:
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
Law2_ScGeom_
GravityEngine(
NewtonIntegrat
]
There were two main mistakes:
1.) I had the files from https:/
2.) One has to set at least a value for the CapillaryPressure, so that the law knows how to calculate the right forces.
Regards,
Christian.
Special thanks to Luc Scholtes.