Re: [Yade-users] [Question #700439]: How to use TW.triangulate() for only part of particles

2022-02-01 Thread Leonard
Question #700439 on Yade changed:
https://answers.launchpad.net/yade/+question/700439

Status: Answered => Solved

Leonard confirmed that the question is solved:
Thanks Karol Brzezinski, that solved my question.

-- 
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 #700439]: How to use TW.triangulate() for only part of particles

2022-01-29 Thread Karol Brzezinski
Question #700439 on Yade changed:
https://answers.launchpad.net/yade/+question/700439

Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi Leonard,

the answer is simple. You need to output two txt files, before and after
deformation :)

step 1: output the first txt file (one sphere per line, with x,y,z,rad
separated by spaces).

step 2: run simulation.

step 3: output the second txt file.

step 4: pass the files to defToVtkFromPositions(first_file, second_file,
output_vtk_file).

Cheers,
Karol

-- 
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 #700439]: How to use TW.triangulate() for only part of particles

2022-01-29 Thread Leonard
Question #700439 on Yade changed:
https://answers.launchpad.net/yade/+question/700439

Status: Answered => Open

Leonard is still having a problem:
Hi Karol,
Firstly many thanks for your quick reply.

As this defToVtkFromPositions() is new info for me, if I understood
correctly, what I need to do is:

step1: output a txt file (one sphere per line, with x,y,z,rad separated
by spaces). This is clear for me, in this way I  can specific the part
of particles.

step2: pass this file to defToVtkFromPositions(), this function will
write local deformations in vtk format from positions file as introduced
in[1]. But what is not clear for me is that: there is only one state in
the txt file, how can it calculate the microstrain from only one state?
As the example code shows[2], it uses defToVtk() which write local
deformations in vtk format from states 0 and 1.

Thanks
Leonard

[1] 
https://yade-dem.org/doc/yade.wrapper.html?highlight=deftovtkfrompositions#yade.wrapper.TesselationWrapper.defToVtkFromPositions
[2]https://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-strain

-- 
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 #700439]: How to use TW.triangulate() for only part of particles

2022-01-29 Thread Karol Brzezinski
Question #700439 on Yade changed:
https://answers.launchpad.net/yade/+question/700439

Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi Leonard,

I don't know whether you can triangulate for a set of particles.
However, you can store the positions and radii of this set in external
files. Next, you can compute strains from positions files using
defToVtkFromPositions() method [1].

Cheers,
Karol


[1] 
https://yade-dem.org/doc/yade.wrapper.html?highlight=deftovtkfrompositions#yade.wrapper.TesselationWrapper.defToVtkFromPositions

-- 
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 #700439]: How to use TW.triangulate() for only part of particles

2022-01-29 Thread Leonard
New question #700439 on Yade:
https://answers.launchpad.net/yade/+question/700439

Hi,

I'd like to ask that how to export micro-strain[1] for part of the whole 
packing.
There are two groups of particles in my packing, let's say, packing1 and 
packing2 for storing the ids respectively. I'd like to export micro-strain for 
particles in packing1.

I guess it could be done by using TW.triangulate (i.e., computing regular 
Delaunay triangulation) for only packing1. Refering to the example code[2], it 
well demonstrates how to export the micro-strain for the whole packing by using 
TW.triangulate(), as below:

TW.triangulate()#compute regular Delaunay triangulation, don’t 
construct tesselation
TW.computeVolumes() #will silently tesselate the packing, then compute 
volume of each Voronoi cell

I made some attemps such as using TW.triangulate(packing1) or 
TW.computeVolumes(packing1), but I got the feedback: did not match C++ 
signature.

My question is that can we pass only packing1 to TW.triangulate()?

Thanks
Leonard

[1]https://yade-dev.gitlab.io/trunk/user.html?highlight=paraview#micro-strain
[2]https://gitlab.com/yade-dev/trunk/-/blob/master/examples/tesselationwrapper/tesselationWrapper.py

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