Re: [Yade-users] [Question #706976]: Reconstruct particles from ct images

2023-06-16 Thread Ruidong LI
Question #706976 on Yade changed:
https://answers.launchpad.net/yade/+question/706976

Ruidong LI posted a new comment:
Dear Vasileios,

Thanks for your answer. I have tried your code. So I just need to create
a text for each clump and import them iteratively, right?  Just using
the 'ymport.textClumps statement'.

Best,
Kyle

-- 
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 #706976]: Reconstruct particles from ct images

2023-06-16 Thread Vasileios Angelidakis
Question #706976 on Yade changed:
https://answers.launchpad.net/yade/+question/706976

Status: Open => Answered

Vasileios Angelidakis proposed the following answer:
Hi Kyle,

In your code, you do not need the  "O.bodies.appendClumped(spheres)"
statement, this is already included in the ymport.textClumps statement.
Look into [1]

Best,
Vasileios

[1] https://gitlab.com/yade-dev/trunk/-/blob/master/py/ymport.py#L147

-- 
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 #706976]: Reconstruct particles from ct images

2023-06-16 Thread Ruidong LI
Question #706976 on Yade changed:
https://answers.launchpad.net/yade/+question/706976

Status: Answered => Open

Ruidong LI is still having a problem:
Dear Vasileios,

Thanks for your answer. I have tried your code.

The error is below:

unning script /home/kyle/Yade/install/bin/clump_test1.py
Traceback (most recent call last):
  File "./yade-Unknown", line 343, in runScript
execfile(script,globals())
  File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 87, in 
execfile
exec_(code, myglobals, mylocals)
  File "/home/kyle/Yade/install/bin/clump_test1.py", line 69, in 
O.bodies.appendClumped(spheres)
TypeError: No registered converter was able to produce a C++ rvalue of type 
boost::shared_ptr from this Python object of type tuple

My code is:

inputfile = '/home/kyle/Downloads/yadetxtClumps.txt'
spheres = ymport.textClumps(inputfile,material=sphereMat,discretization=0)
O.bodies.appendClumped(spheres)

The file in the 'inputfile' is like this (contain many clumps):
0.068037 0.02416 0.0017637 0.0011423 1
0.068615 0.022601 0.0014278 0.00077244 1
0.069542 0.023528 0.0017906 0.00071539 1
0.066801 0.025141 0.0019788 0.0006786 1
0.049731 0.03499 0.0017112 0.00070436 10
0.048747 0.034309 0.0013637 0.00063928 10
0.047719 0.034628 0.0014651 0.00056027 10
0.047299 0.035323 0.0020008 0.00052311 10

Sorry to trouble you. But do you know what's wrong with this?

Best,
Kyle

-- 
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 #706062]: Triaxial test with flexible cylindrical membrane

2023-06-16 Thread Ruidong LI
Question #706062 on Yade changed:
https://answers.launchpad.net/yade/+question/706062

Status: Answered => Open

Ruidong LI is still having a problem:
Dear Jan,

Thanks for your reply. I have read your recommendation. But I am
wondering whether it is applicable to use bonded particles representing
flexible membrane instead of PFacet?  If so, can you give me some hints
(How to simulate bonded particles or how to apply force on them to
achieve stress-servo control)?

Looking forward to your reply. Many thanks.

Best,
Kyle

-- 
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 #706740]: Excess pore-water pressure in triaxial test

2023-06-16 Thread Fedor
Question #706740 on Yade changed:
https://answers.launchpad.net/yade/+question/706740

Fedor posted a new comment:
fedor@fedor-virtual-machine:~$ yadedaily N3.py 
Welcome to Yade 20230525-7264~94b01fd~jammy1 
Using python version: 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0]
TCP python prompt on localhost:9000, auth cookie `seacus'
XMLRPC info provider on http://localhost:21000
Running script N3.py
time step 0.015408844130320731
Segmentation fault (core dumped)

-- 
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 #706976]: Reconstruct particles from ct images

2023-06-16 Thread Vasileios Angelidakis
Question #706976 on Yade changed:
https://answers.launchpad.net/yade/+question/706976

Status: Open => Answered

Vasileios Angelidakis proposed the following answer:
Hi Kyle,

You can use something like:

c1 = ymport.text('yourClump.txt', shift=Vector3(0,0,0.5), scale=1.0, 
material='yourMaterial')
O.bodies.appendClumped(c1)

where yourClump.txt file should be in the format: x y z r, i.e. center and 
radius of each sphere, like here (for a three-sphere rod):
0 0 0 1
1 0 0 1
2 0 0 1

If you have all of your clump files in a the same directory, it should
be easy to iterate through them in a loop.

Hope this helps,
Vasileios

-- 
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 #706998]: VTKRecorder error

2023-06-16 Thread Jan Stránský
Question #706998 on Yade changed:
https://answers.launchpad.net/yade/+question/706998

Jan Stránský posted a new comment:
Hello,
I could not reproduce the problem
Ubuntu 22.04
Yade 2022.01a and yadedaily (20230525-7264~94b01fd~jammy1)
Cheers
Jan

-- 
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 #706855]: Segmentation fault (core dumped) when increasing the GridConnection number

2023-06-16 Thread Jan Stránský
Question #706855 on Yade changed:
https://answers.launchpad.net/yade/+question/706855

Jan Stránský posted a new comment:
Probably because the problem was in O.saveTmp(), and if you do not use it, the 
problem has no way to occure..
Cheers
Jan

-- 
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 #706998]: VTKRecorder error

2023-06-16 Thread Yipeng Xie
New question #706998 on Yade:
https://answers.launchpad.net/yade/+question/706998

Hello all, 
I'm learning how to record a vtk file according to the tutorial example 
"05-3d-postprocessing.py". However, it seems that VTKRecorder command is not 
working, and the following error occurs: 

In [1]: python3.8: 
/build/vtk6-9ueea8/vtk6-6.3.0+dfsg2/IO/XML/vtkXMLOffsetsManager.h:142: void 
OffsetsManagerGroup::Allocate(int, int): Assertion `numElements > 0' failed.
Aborted (core dumped)

If i remove the VTKRecorder, the script runs well. I have noticed that a 
similar question appeared but it does not have a solution. 
https://answers.launchpad.net/yade/+question/690820

My Yade version: Yade 2022-12-14.git-7c728c4 (Installed by source code)
My Ubuntu version: Ubuntu 20.04.6 LTS

Best
Yipeng

Here is the script: 
https://gitlab.com/yade-dev/trunk/blob/master/doc/sphinx/tutorial/05-3d-postprocessing.py
# demonstrate 3d postprocessing with yade
#
# 1. qt.SnapshotEngine saves images of the 3d view as it appears on the screen 
periodically
#makeVideo is then used to make real movie from those images
# 2. VTKRecorder saves data in files which can be opened with Paraview
#see the User's manual for an intro to Paraview

# generate loose packing
from yade import pack, qt
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(2,2,2),rMean=.1,rRelFuzz=.6,periodic=True)
# add to scene, make it periodic
sp.toSimulation()

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(damping=.4),
# save data for Paraview
VTKRecorder(fileName='3d-vtk-',recorders=['all'],iterPeriod=1000),
# save data from Yade's own 3d view
qt.SnapshotEngine(fileBase='3d-',iterPeriod=200,label='snapshot'),
# this engine will be called after 2 steps, only once
PyRunner(command='finish()',iterPeriod=2)
]
O.dt=.5*PWaveTimeStep()

# prescribe constant-strain deformation of the cell
O.cell.velGrad=Matrix3(-.1,0,0, 0,-.1,0, 0,0,-.1)

# we must open the view explicitly (limitation of the qt.SnapshotEngine)
qt.View()

# this function is called when the simulation is finished
def finish():
# snapshot is label of qt.SnapshotEngine
# the 'snapshots' attribute contains list of all saved files
makeVideo(snapshot.snapshots,'3d.mpeg',fps=10,bps=1)
O.pause()

# set parameters of the renderer, to show network chains rather than particles
# these settings are accessible from the Controller window, on the second tab 
("Display") as well
rr=yade.qt.Renderer()
rr.shape=False
rr.intrPhys=True


-- 
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 #706855]: Segmentation fault (core dumped) when increasing the GridConnection number

2023-06-16 Thread Launchpad Janitor
Question #706855 on Yade changed:
https://answers.launchpad.net/yade/+question/706855

Status: Open => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Open' state
without activity for the last 15 days.

-- 
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 #706976]: Reconstruct particles from ct images

2023-06-16 Thread Ruidong LI
Question #706976 on Yade changed:
https://answers.launchpad.net/yade/+question/706976

Status: Answered => Open

Ruidong LI is still having a problem:
Thanks for your reply, Karol.

>I can also recommend Matlab code for clumo generation developed by Angelidakis 
>et al. It is described in [3].
[3] Angelidakis et al. 2021 CLUMP: A Code Library to generate Universal 
Multi-sphere Particles, Softwarex
--By the way, I'd like to ask how can I import the position and radius of 
generated spheres into Yade. I mean once I obtain the positions and radius of 
spheres forming a clump externally such as your recommendation [1]. I can use 
the function 'O.bodies.appendClumped([])', right? But I have more than 800 
particles. Should I put those lines into the main py file together with other 
definitions such as material, or create a new py file and called by the main py 
file?

[1] Angelidakis et al. 2021 CLUMP: A Code Library to generate Universal
Multi-sphere Particles, Softwarex

Best
Kyle

-- 
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 #706976]: Reconstruct particles from ct images

2023-06-16 Thread Ruidong LI
Question #706976 on Yade changed:
https://answers.launchpad.net/yade/+question/706976

Ruidong LI posted a new comment:
Thanks for your reply, Jan.

>Just an idea to use this concept of "suitably" overlapping spheres, which 
>would represent more realistically the actual shape then cropped regular hexa 
>packing. Of course, it would need some development, with uncertain result :-)
-- yes. I will try and respond to you ASAP. Many thanks.


Best
Kyle

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 #706976]: Reconstruct particles from ct images

2023-06-16 Thread Ruidong LI
Question #706976 on Yade changed:
https://answers.launchpad.net/yade/+question/706976

Ruidong LI posted a new comment:
Thanks for your reply, Karol.

>I can also recommend Matlab code for clumo generation developed by Angelidakis 
>et al. It is described in [3].
[3] Angelidakis et al. 2021 CLUMP: A Code Library to generate Universal 
Multi-sphere Particles, Softwarex
--I will try and respond to you ASAP. Many thanks.

Best
Kyle

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