Re: [Yade-users] [Question #706709]: Segmentation error

2023-05-24 Thread Carine Tanissa
Question #706709 on Yade changed:
https://answers.launchpad.net/yade/+question/706709

Status: Needs information => Open

Carine Tanissa gave more information on the question:
It still gives the segmentation fault

-- 
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 #706758]: Force between wall and particle

2023-05-24 Thread Carine Tanissa
Question #706758 on Yade changed:
https://answers.launchpad.net/yade/+question/706758

Status: Needs information => Open

Carine Tanissa gave more information on the question:
If i want to check the force between all the particles at the end of the
simulation (at iter= 50) with the wall.

-- 
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 #706758]: Force between wall and particle

2023-05-24 Thread Carine Tanissa
Question #706758 on Yade changed:
https://answers.launchpad.net/yade/+question/706758

Status: Answered => Open

Carine Tanissa is still having a problem:
How would i incorporate it into this code to get the interaction between the 
bottom of the box "bottom" and the randomly generated polyhedra:
# -*- coding: utf-8 -*-
"""
Created on Thu May 18 15:08:40 2023

@author: Carine
"""

from __future__ import print_function
from yade import plot, polyhedra_utils, qt
import numpy as np
wire = False


##
# Need to define polyhedral material for 
Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys() to work


m = PolyhedraMat() #defines polyhedral properties
m.density = 2600 #kg/m^3 
m.Ks = 130E3
m.Kn = 160E3 #N/m
m.frictionAngle = 0.54 #tan(31)=0.6, so 31 is 0.54 rad and the input is in rad 
O.materials.append(m) #adds material to yade

##
# Defining polyhedra shapes in terms of their vertices so technically defining 
vertices, dimaters are 1 mm

t1_coords = (
(0.00033091155911506355, -0.0003242136881048748, -0.00033985697995026614),
(0.00033091155911506355, 0.00038088860029783984, -0.00033985697995026614),
(-0.0003662726180924643, -0.0003242136881048748, -0.00033985697995026614),
(-0.8498849969921465, -0.0003242136881048748, 0.0003440300800075135),
(0.00033091155911506355, 0.95674950813, 0.0003055457315613278),
(0.00033091155911506355, 0.00038088860029783984, 0.00025920106521738856),
(-0.0003662726180924643, 0.00038088860029783984, 0.00020493952283110147),
(-0.0003662726180924643, -0.0003242136881048748, 0.00032033663438746235)
)


t2_coords = (
(-0.00014309681589806823, -0.0002272260744496193, 0.00038401015387691325),
(0.000358010967088001, -0.0002272260744496193, 0.00038401015387691325),
(0.0006643612513710932, -0.0002272260744496193, -0.00011312310165154156),
(0.9399535164170355, -0.0002272260744496193, -0.0004453308199780648),
(0.00028983044257111084, 0.6624457321674196, -0.0002657890485909965),
(-0.0003263752923764808, 0.9806342306798776, -0.00021177708099387714),
(-0.00014309681589806823, 0.0005961347452425924, 0.5063802822300939),
(-0.00027303541351821494, 0.0002667732486219123, 0.00018065628098092602),
(0.00037721690590733186, -0.964985942102914, 0.0003057083518969001),
(-0.00047649283929694435, -0.0002272260744496193, -0.00011312310165154156)
)


t3_coords = (
(0.0002600238357760947, 0.0002851848128988758, -0.00024701557197894438),
(0.00016012830358156934, 0.0003484895606572876, -0.00018513953373961826),
(-0.00016008801057746095, 0.0003484895606572876, -0.00018513953373961826),
(-0.00026000224348968266, 0.0002851848128988758, -0.00024701557197894438),
(-0.00038471948905778405, 0.0002025288577517229, -0.915820081211398),
(-0.00038471948905778405, -0.00020256899286437123, -0.915820081211398),
(-0.00023030565260400093, -0.00040365230950484085, 0.0002613542406089658),
(-0.00016008801057746095, -0.000500774842940389, 0.00018311089846328836),
(0.00016012830358156934, -0.000500774842940389, 0.00018311089846328836),
(0.00023034594560810932, -0.00040365230950484085, 0.0002613542406089658),
(0.00038475978206189245, -0.00020256899286437123, -0.915820081211398),
(0.00038475978206189245, 0.0002025288577517229, -0.915820081211398),
(0.00023034594560810932, 0.00040361217439219253, 0.0002613542406089658),
(0.00016012830358156934, 0.000500734707827741, 0.00018311089846328836),
(-0.00016008801057746095, 0.000500734707827741, 0.00018311089846328836),
(-0.00023030565260400093, 0.00040361217439219253, 0.0002613542406089658),
(-0.00016008801057746095, 0.0002025288577517229, 0.0004286664300572351),
(-0.00016008801057746095, -0.00020256899286437123, 0.0004286664300572351),
(0.00016012830358156934, -0.00020256899286437123, 0.0004286664300572351),
(0.00016012830358156934, 0.0002025288577517229, 0.0004286664300572351),
(0.00016012830358156934, 0.0002025288577517229, -0.0004030812475869826),
(-0.00016008801057746095, 0.0002025288577517229, -0.0004030812475869826),
(-0.00016008801057746095, -0.00020256899286437123, -0.0004030812475869826),
(0.00016012830358156934, -0.00020256899286437123, -0.0004030812475869826),
(0.0002600238357760947, -0.0002852249480115241, -0.00024701557197894438),
(0.00016012830358156934, -0.000348529695769936, -0.00018513953373961826),
(-0.00016008801057746095, -0.000348529695769936, -0.00018513953373961826),
(-0.00026000224348968266, -0.0002852249480115241, -0.00024701557197894438)
)



t4_coords = (
(0.000425451497911189, 0.000410663686410634, 0.000414950888597802),
(0.000568476283629213, 0.000328088287631944, 0.00033237549181911),
(0.000568476283629213, -0.00032837342517883, 0.00

[Yade-users] [Question #706781]: Polyhedra VTK Exporter

2023-05-24 Thread Carine Tanissa
New question #706781 on Yade:
https://answers.launchpad.net/yade/+question/706781

Why do i get a segmentation fault everytime I try to use the VTK exporter on 
polyhedra?

-- 
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 #706709]: Segmentation error

2023-05-24 Thread Carine Tanissa
Question #706709 on Yade changed:
https://answers.launchpad.net/yade/+question/706709

Status: Needs information => Open

Carine Tanissa gave more information on the question:
i m not sure what you are referring to

-- 
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 #706757]: Most efficient way of writing this code

2023-05-22 Thread Carine Tanissa
Question #706757 on Yade changed:
https://answers.launchpad.net/yade/+question/706757

Status: Needs information => Open

Carine Tanissa gave more information on the question:
Code running time.
Thanks,
Carina

-- 
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 #706758]: Force between wall and particle

2023-05-22 Thread Carine Tanissa
New question #706758 on Yade:
https://answers.launchpad.net/yade/+question/706758

How can i obtain the force between the wall and a polyhedral particle

-- 
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 #706757]: Most efficient way of writing this code

2023-05-22 Thread Carine Tanissa
New question #706757 on Yade:
https://answers.launchpad.net/yade/+question/706757

I have 4 different polyhedra shapes with vertices given by t1,t2,t3, and t4. I 
want to perform a gravity deposition of these polyhedra in a box by deposition 
of 9 random polyhedra shapes. This is the code that i have: 
# -*- coding: utf-8 -*-
"""
Created on Thu May 18 15:08:40 2023

@author: Carine
"""

from __future__ import print_function
from yade import plot, polyhedra_utils, qt
import numpy as np
wire = False


##
# Need to define polyhedral material for 
Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys() to work


m = PolyhedraMat() #defines polyhedral properties
m.density = 2600 #kg/m^3 
m.Ks = 130E3
m.Kn = 160E3 #N/m
m.frictionAngle = 0.54 #tan(31)=0.6, so 31 is 0.54 rad and the input is in rad 
O.materials.append(m) #adds material to yade

##
# Defining polyhedra shapes in terms of their vertices so technically defining 
vertices, dimaters are 1 mm

t1_coords = (
(0.00033091155911506355, -0.0003242136881048748, -0.00033985697995026614),
(0.00033091155911506355, 0.00038088860029783984, -0.00033985697995026614),
(-0.0003662726180924643, -0.0003242136881048748, -0.00033985697995026614),
(-0.8498849969921465, -0.0003242136881048748, 0.0003440300800075135),
(0.00033091155911506355, 0.95674950813, 0.0003055457315613278),
(0.00033091155911506355, 0.00038088860029783984, 0.00025920106521738856),
(-0.0003662726180924643, 0.00038088860029783984, 0.00020493952283110147),
(-0.0003662726180924643, -0.0003242136881048748, 0.00032033663438746235)
)



t2_coords = (
(-0.00014309681589806823, -0.0002272260744496193, 0.00038401015387691325),
(0.000358010967088001, -0.0002272260744496193, 0.00038401015387691325),
(0.0006643612513710932, -0.0002272260744496193, -0.00011312310165154156),
(0.9399535164170355, -0.0002272260744496193, -0.0004453308199780648),
(0.00028983044257111084, 0.6624457321674196, -0.0002657890485909965),
(-0.0003263752923764808, 0.9806342306798776, -0.00021177708099387714),
(-0.00014309681589806823, 0.0005961347452425924, 0.5063802822300939),
(-0.00027303541351821494, 0.0002667732486219123, 0.00018065628098092602),
(0.00037721690590733186, -0.964985942102914, 0.0003057083518969001),
(-0.00047649283929694435, -0.0002272260744496193, -0.00011312310165154156)
)



t3_coords = (
(0.0002600238357760947, 0.0002851848128988758, -0.00024701557197894438),
(0.00016012830358156934, 0.0003484895606572876, -0.00018513953373961826),
(-0.00016008801057746095, 0.0003484895606572876, -0.00018513953373961826),
(-0.00026000224348968266, 0.0002851848128988758, -0.00024701557197894438),
(-0.00038471948905778405, 0.0002025288577517229, -0.915820081211398),
(-0.00038471948905778405, -0.00020256899286437123, -0.915820081211398),
(-0.00023030565260400093, -0.00040365230950484085, 0.0002613542406089658),
(-0.00016008801057746095, -0.000500774842940389, 0.00018311089846328836),
(0.00016012830358156934, -0.000500774842940389, 0.00018311089846328836),
(0.00023034594560810932, -0.00040365230950484085, 0.0002613542406089658),
(0.00038475978206189245, -0.00020256899286437123, -0.915820081211398),
(0.00038475978206189245, 0.0002025288577517229, -0.915820081211398),
(0.00023034594560810932, 0.00040361217439219253, 0.0002613542406089658),
(0.00016012830358156934, 0.000500734707827741, 0.00018311089846328836),
(-0.00016008801057746095, 0.000500734707827741, 0.00018311089846328836),
(-0.00023030565260400093, 0.00040361217439219253, 0.0002613542406089658),
(-0.00016008801057746095, 0.0002025288577517229, 0.0004286664300572351),
(-0.00016008801057746095, -0.00020256899286437123, 0.0004286664300572351),
(0.00016012830358156934, -0.00020256899286437123, 0.0004286664300572351),
(0.00016012830358156934, 0.0002025288577517229, 0.0004286664300572351),
(0.00016012830358156934, 0.0002025288577517229, -0.0004030812475869826),
(-0.00016008801057746095, 0.0002025288577517229, -0.0004030812475869826),
(-0.00016008801057746095, -0.00020256899286437123, -0.0004030812475869826),
(0.00016012830358156934, -0.00020256899286437123, -0.0004030812475869826),
(0.0002600238357760947, -0.0002852249480115241, -0.00024701557197894438),
(0.00016012830358156934, -0.000348529695769936, -0.00018513953373961826),
(-0.00016008801057746095, -0.000348529695769936, -0.00018513953373961826),
(-0.00026000224348968266, -0.0002852249480115241, -0.00024701557197894438)
)




t4_coords = (
(0.000425451497911189, 0.000410663686410634, 0.000414950888597802),
(0.000568476283629213, 0.000328088287631944, 0.00033237549181911),
(0.000568476283629213, -0.00032837342517883, 0.00033237549181911),
(0.000425451497911189, 

Re: [Yade-users] [Question #706709]: Segmentation error

2023-05-22 Thread Carine Tanissa
Question #706709 on Yade changed:
https://answers.launchpad.net/yade/+question/706709

Status: Needs information => Open

Carine Tanissa gave more information on the question:
I am using Ubuntu within Windows Subsystem for Linux v. 2 and my Ubuntu is also 
22.04
My ayde version is 2022.01a

-- 
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 #706716]: saving the simulation

2023-05-22 Thread Carine Tanissa
Question #706716 on Yade changed:
https://answers.launchpad.net/yade/+question/706716

Status: Needs information => Open

Carine Tanissa gave more information on the question:
the simulation.
So if i were to reopen it and continue running it, where would i do that from?

-- 
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 #706729]: RAM usage

2023-05-22 Thread Carine Tanissa
Question #706729 on Yade changed:
https://answers.launchpad.net/yade/+question/706729

Status: Answered => Open

Carine Tanissa is still having a problem:
>From the Terminal not from python.
I tried adding the script to my python code, it did not show the RAM usage. 
This is my script:
# -*- coding: utf-8 -*-
"""
Created on Thu May 18 15:08:40 2023

@author: Carine
"""

from __future__ import print_function
from yade import plot, polyhedra_utils, qt
import numpy as np
wire = False


##
# Need to define polyhedral material for 
Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys() to work


m = PolyhedraMat() #defines polyhedral properties
m.density = 2600 #kg/m^3 
m.Ks = 130E3
m.Kn = 160E3 #N/m
m.frictionAngle = 0.54 #tan(31)=0.6, so 31 is 0.54 rad and the input is in rad 
O.materials.append(m) #adds material to yade

##
# Defining polyhedra shapes in terms of their vertices so technically defining 
vertices, dimaters are 1 mm

t1_coords = (
(0.00033091155911506355, -0.0003242136881048748, -0.00033985697995026614),
(0.00033091155911506355, 0.00038088860029783984, -0.00033985697995026614),
(-0.0003662726180924643, -0.0003242136881048748, -0.00033985697995026614),
(-0.8498849969921465, -0.0003242136881048748, 0.0003440300800075135),
(0.00033091155911506355, 0.95674950813, 0.0003055457315613278),
(0.00033091155911506355, 0.00038088860029783984, 0.00025920106521738856),
(-0.0003662726180924643, 0.00038088860029783984, 0.00020493952283110147),
(-0.0003662726180924643, -0.0003242136881048748, 0.00032033663438746235)
)


t2_coords = (
(-0.00014309681589806823, -0.0002272260744496193, 0.00038401015387691325),
(0.000358010967088001, -0.0002272260744496193, 0.00038401015387691325),
(0.0006643612513710932, -0.0002272260744496193, -0.00011312310165154156),
(0.9399535164170355, -0.0002272260744496193, -0.0004453308199780648),
(0.00028983044257111084, 0.6624457321674196, -0.0002657890485909965),
(-0.0003263752923764808, 0.9806342306798776, -0.00021177708099387714),
(-0.00014309681589806823, 0.0005961347452425924, 0.5063802822300939),
(-0.00027303541351821494, 0.0002667732486219123, 0.00018065628098092602),
(0.00037721690590733186, -0.964985942102914, 0.0003057083518969001),
(-0.00047649283929694435, -0.0002272260744496193, -0.00011312310165154156)
)


t3_coords = (
(0.0002600238357760947, 0.0002851848128988758, -0.00024701557197894438),
(0.00016012830358156934, 0.0003484895606572876, -0.00018513953373961826),
(-0.00016008801057746095, 0.0003484895606572876, -0.00018513953373961826),
(-0.00026000224348968266, 0.0002851848128988758, -0.00024701557197894438),
(-0.00038471948905778405, 0.0002025288577517229, -0.915820081211398),
(-0.00038471948905778405, -0.00020256899286437123, -0.915820081211398),
(-0.00023030565260400093, -0.00040365230950484085, 0.0002613542406089658),
(-0.00016008801057746095, -0.000500774842940389, 0.00018311089846328836),
(0.00016012830358156934, -0.000500774842940389, 0.00018311089846328836),
(0.00023034594560810932, -0.00040365230950484085, 0.0002613542406089658),
(0.00038475978206189245, -0.00020256899286437123, -0.915820081211398),
(0.00038475978206189245, 0.0002025288577517229, -0.915820081211398),
(0.00023034594560810932, 0.00040361217439219253, 0.0002613542406089658),
(0.00016012830358156934, 0.000500734707827741, 0.00018311089846328836),
(-0.00016008801057746095, 0.000500734707827741, 0.00018311089846328836),
(-0.00023030565260400093, 0.00040361217439219253, 0.0002613542406089658),
(-0.00016008801057746095, 0.0002025288577517229, 0.0004286664300572351),
(-0.00016008801057746095, -0.00020256899286437123, 0.0004286664300572351),
(0.00016012830358156934, -0.00020256899286437123, 0.0004286664300572351),
(0.00016012830358156934, 0.0002025288577517229, 0.0004286664300572351),
(0.00016012830358156934, 0.0002025288577517229, -0.0004030812475869826),
(-0.00016008801057746095, 0.0002025288577517229, -0.0004030812475869826),
(-0.00016008801057746095, -0.00020256899286437123, -0.0004030812475869826),
(0.00016012830358156934, -0.00020256899286437123, -0.0004030812475869826),
(0.0002600238357760947, -0.0002852249480115241, -0.00024701557197894438),
(0.00016012830358156934, -0.000348529695769936, -0.00018513953373961826),
(-0.00016008801057746095, -0.000348529695769936, -0.00018513953373961826),
(-0.00026000224348968266, -0.0002852249480115241, -0.00024701557197894438)
)



t4_coords = (
(0.000425451497911189, 0.000410663686410634, 0.000414950888597802),
(0.000568476283629213, 0.000328088287631944, 0.00033237549181911),
(0.000568476283629213, -0.00032837342517883, 0.00033237549181911),
(0.00042

[Yade-users] [Question #706729]: RAM usage

2023-05-19 Thread Carine Tanissa
New question #706729 on Yade:
https://answers.launchpad.net/yade/+question/706729

How can i check the RAM usage per simulation?

-- 
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 #706716]: saving the simulation

2023-05-19 Thread Carine Tanissa
Question #706716 on Yade changed:
https://answers.launchpad.net/yade/+question/706716

Status: Answered => Open

Carine Tanissa is still having a problem:
where do the folder save?

-- 
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 #706716]: saving the simulation

2023-05-18 Thread Carine Tanissa
New question #706716 on Yade:
https://answers.launchpad.net/yade/+question/706716

How can i save my simulation at certain time steps so that i can later open it 
and rereun it from a certain point?

-- 
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 #706709]: Segmentation error

2023-05-18 Thread Carine Tanissa
New question #706709 on Yade:
https://answers.launchpad.net/yade/+question/706709

My code runs perfectly fine until i add the VTK exporter, it then runs a few 
steps and then shows a segmentation error.
Can you please help with the error?

Here is my code:
from __future__ import print_function
from yade import plot, polyhedra_utils
import numpy as np
wire = False


##
# Need to define polyhedral material for 
Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys() to work


m = PolyhedraMat() #defines polyhedral properties
m.density = 0.026 #kg/mm^3 
m.Ks = 130E6
m.Kn = 160E6#Pa
m.frictionAngle = 0.6 #rad
O.materials.append(m) #adds material to yade


##
# Defining polyhedra shapes in terms of their vertices so technically defining 
vertices, dimaters are 1 cm

t1_coords =   ((0.33091155911506355, -0.3242136881048748, 
-0.33985697995026614),
   (0.33091155911506355, 0.38088860029783984, 
-0.33985697995026614),
   (-0.3662726180924643, -0.3242136881048748, 
-0.33985697995026614),
   (-0.08498849969921465, -0.3242136881048748, 
0.3440300800075135),
   (0.33091155911506355, 0.095674950813, 
0.3055457315613278),
   (0.33091155911506355, 0.38088860029783984, 
0.25920106521738856),
   (-0.3662726180924643, 0.38088860029783984, 
0.20493952283110147),
   (-0.3662726180924643, -0.3242136881048748, 
0.32033663438746235))


t2_coords = ((-0.14309681589806823, -0.2272260744496193, 
0.38401015387691325),
(0.358010967088001, -0.2272260744496193, 
0.38401015387691325),
(0.6643612513710932, -0.2272260744496193, 
-0.11312310165154156),
(0.09399535164170355, -0.2272260744496193, 
-0.4453308199780648),
(0.28983044257111084, 0.06624457321674196, 
-0.2657890485909965),
(-0.3263752923764808, 0.09806342306798776, 
-0.21177708099387714),
(-0.14309681589806823, 0.5961347452425924, 
0.05063802822300939),
(-0.27303541351821494, 0.2667732486219123, 
0.18065628098092602),
(0.37721690590733186, -0.0964985942102914, 
0.3057083518969001),
(-0.47649283929694435, -0.2272260744496193, 
-0.11312310165154156))


t3_coords =((0.2600238357760947, 0.2851848128988758, 
-0.24701557197894438),
   (0.16012830358156934, 0.3484895606572876, 
-0.18513953373961826),
   (-0.16008801057746095, 0.3484895606572876, 
-0.18513953373961826),
   (-0.26000224348968266, 0.2851848128988758, 
-0.24701557197894438),
   (-0.38471948905778405, 0.2025288577517229, 
-0.0915820081211398),
   (-0.38471948905778405, -0.20256899286437123, 
-0.0915820081211398),
   (-0.23030565260400093, -0.40365230950484085, 
0.2613542406089658),
   (-0.16008801057746095, -0.500774842940389, 
0.18311089846328836),
   (0.16012830358156934, -0.500774842940389, 
0.18311089846328836),
   (0.23034594560810932, -0.40365230950484085, 
0.2613542406089658),
   (0.38475978206189245, -0.20256899286437123, 
-0.0915820081211398),
   (0.38475978206189245, 0.2025288577517229, 
-0.0915820081211398),
   (0.23034594560810932, 0.40361217439219253, 
0.2613542406089658),
   (0.16012830358156934, 0.500734707827741, 
0.18311089846328836),
   (-0.16008801057746095, 0.500734707827741, 
0.18311089846328836),
   (-0.23030565260400093, 0.40361217439219253, 
0.2613542406089658),
   (-0.16008801057746095, 0.2025288577517229, 
0.4286664300572351),
   (-0.16008801057746095, -0.20256899286437123, 
0.4286664300572351),
   (0.16012830358156934, -0.20256899286437123, 
0.4286664300572351),
   (0.16012830358156934, 0.2025288577517229, 
0.4286664300572351),
   (0.16012830358156934, 0.2025288577517229, 
-0.4030812475869826),
   (-0.16008801057746095, 0.2025288577517229, 
-0.4030812475869826),
   (-0.16008801057746095, -0.20256899286437123, 
-0.4030812475869826),
   (0.16012830358156934, -0.20256899286437123, 
-0.4030812475869826),
   (0.2600238357760947, -0.2852249480115241, 
-0.24701557197894438),
   (0.16012830358156934, -0.348529695769936, 
-0.18513953373961826),
   (-0.16008801057746095, -0.348529695769936, 
-0.18513953373961826),
   (-0.26000224348968266, -0.2852249480115241, 
-0.24701557197894438))



t4_coords =((0.4254514979111890, 0.4106636864106340 
,0.4149508885978020),
(0.5684762836292130, 0.3280882876319440, 

Re: [Yade-users] [Question #706695]: do_intersect (yade: Polyhedron)

2023-05-18 Thread Carine Tanissa
Question #706695 on Yade changed:
https://answers.launchpad.net/yade/+question/706695

Status: Open => Solved

Carine Tanissa confirmed that the question is solved:
Changing material properties fixed my problem. Thanks

-- 
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 #706695]: do_intersect (yade: Polyhedron)

2023-05-18 Thread Carine Tanissa
Question #706695 on Yade changed:
https://answers.launchpad.net/yade/+question/706695

Status: Needs information => Open

Carine Tanissa gave more information on the question:
Hi,
my OS is: Ubuntu within Windows Subsystem for Linux v. 2
Yade Version: 2022.01a
CGAL: I am not sure how to check the CGAL version.

-- 
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 #706669]: Polyhedral packing

2023-05-17 Thread Carine Tanissa
Question #706669 on Yade changed:
https://answers.launchpad.net/yade/+question/706669

Status: Open => Solved

Carine Tanissa confirmed that the question is solved:
I figured it out

-- 
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 #706695]: do_intersect (yade: Polyhedron)

2023-05-17 Thread Carine Tanissa
New question #706695 on Yade:
https://answers.launchpad.net/yade/+question/706695

I am trying to create a gravity deposition of 4 predefined polyhedral shapes in 
a box and then remove the side of the box, however, as the polyhedra deposit i 
always get the following error: "Polyhedra_support.cpp:234 bool 
yade::do_intersect(yade::Polyhedron, yade::Polyhedron, std::vector&): 
Unhandled switch case:0, function do_inte"

When the error pops up, the rest of the polyhedra stop moving.

I would appreciate help on this.

This is my code:

from __future__ import print_function
from yade import plot, polyhedra_utils
import numpy as np
wire = False


##
# Need to define polyhedral material for 
Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys() to work


m = PolyhedraMat() #defines polyhedral properties
m.density = 2600 #kg/m^3 
m.Ks = 13
m.Kn = 16 #Pa
m.frictionAngle = 0.6 #rad
O.materials.append(m) #adds material to yade


##
# Defining polyhedra shapes in terms of their vertices so technically defining 
vertices, dimaters are 1 cm

t1_coords =   ((0.33091155911506355, -0.3242136881048748, 
-0.33985697995026614),
   (0.33091155911506355, 0.38088860029783984, 
-0.33985697995026614),
   (-0.3662726180924643, -0.3242136881048748, 
-0.33985697995026614),
   (-0.08498849969921465, -0.3242136881048748, 
0.3440300800075135),
   (0.33091155911506355, 0.095674950813, 
0.3055457315613278),
   (0.33091155911506355, 0.38088860029783984, 
0.25920106521738856),
   (-0.3662726180924643, 0.38088860029783984, 
0.20493952283110147),
   (-0.3662726180924643, -0.3242136881048748, 
0.32033663438746235))


t2_coords = ((-0.14309681589806823, -0.2272260744496193, 
0.38401015387691325),
(0.358010967088001, -0.2272260744496193, 
0.38401015387691325),
(0.6643612513710932, -0.2272260744496193, 
-0.11312310165154156),
(0.09399535164170355, -0.2272260744496193, 
-0.4453308199780648),
(0.28983044257111084, 0.06624457321674196, 
-0.2657890485909965),
(-0.3263752923764808, 0.09806342306798776, 
-0.21177708099387714),
(-0.14309681589806823, 0.5961347452425924, 
0.05063802822300939),
(-0.27303541351821494, 0.2667732486219123, 
0.18065628098092602),
(0.37721690590733186, -0.0964985942102914, 
0.3057083518969001),
(-0.47649283929694435, -0.2272260744496193, 
-0.11312310165154156))


t3_coords =((0.2600238357760947, 0.2851848128988758, 
-0.24701557197894438),
   (0.16012830358156934, 0.3484895606572876, 
-0.18513953373961826),
   (-0.16008801057746095, 0.3484895606572876, 
-0.18513953373961826),
   (-0.26000224348968266, 0.2851848128988758, 
-0.24701557197894438),
   (-0.38471948905778405, 0.2025288577517229, 
-0.0915820081211398),
   (-0.38471948905778405, -0.20256899286437123, 
-0.0915820081211398),
   (-0.23030565260400093, -0.40365230950484085, 
0.2613542406089658),
   (-0.16008801057746095, -0.500774842940389, 
0.18311089846328836),
   (0.16012830358156934, -0.500774842940389, 
0.18311089846328836),
   (0.23034594560810932, -0.40365230950484085, 
0.2613542406089658),
   (0.38475978206189245, -0.20256899286437123, 
-0.0915820081211398),
   (0.38475978206189245, 0.2025288577517229, 
-0.0915820081211398),
   (0.23034594560810932, 0.40361217439219253, 
0.2613542406089658),
   (0.16012830358156934, 0.500734707827741, 
0.18311089846328836),
   (-0.16008801057746095, 0.500734707827741, 
0.18311089846328836),
   (-0.23030565260400093, 0.40361217439219253, 
0.2613542406089658),
   (-0.16008801057746095, 0.2025288577517229, 
0.4286664300572351),
   (-0.16008801057746095, -0.20256899286437123, 
0.4286664300572351),
   (0.16012830358156934, -0.20256899286437123, 
0.4286664300572351),
   (0.16012830358156934, 0.2025288577517229, 
0.4286664300572351),
   (0.16012830358156934, 0.2025288577517229, 
-0.4030812475869826),
   (-0.16008801057746095, 0.2025288577517229, 
-0.4030812475869826),
   (-0.16008801057746095, -0.20256899286437123, 
-0.4030812475869826),
   (0.16012830358156934, -0.20256899286437123, 
-0.4030812475869826),
   (0.2600238357760947, -0.2852249480115241, 
-0.24701557197894438),
   (0.16012830358156934, -0.348529695769936, 
-0.18513953373961826),
   (-0.16008801057746095, 

Re: [Yade-users] [Question #706653]: Modifying the size of potential particles

2023-05-17 Thread Carine Tanissa
Question #706653 on Yade changed:
https://answers.launchpad.net/yade/+question/706653

Status: Answered => Solved

Carine Tanissa confirmed that the question is solved:
Thanks

-- 
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 #706652]: Running code with 4 threads

2023-05-17 Thread Carine Tanissa
Question #706652 on Yade changed:
https://answers.launchpad.net/yade/+question/706652

Status: Answered => Solved

Carine Tanissa confirmed that the question is solved:
Thank you!

-- 
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 #706669]: Polyhedral packing

2023-05-16 Thread Carine Tanissa
New question #706669 on Yade:
https://answers.launchpad.net/yade/+question/706669

How can i make a packing of different polyhedral shapes say: 

t1 = 
polyhedron(((0.5278440831053800,-0.5152781319696540,-0.5395945447868700),(0.5278440831053800,0.5967529419883090,-0.5395945447868700),(-0.5841869908525840,-0.5152781319696540,-0.5395945447868700),(-0.105625876390,-0.5152781319696540,0.5724365291710940),(0.5278440831053800,0.1511248363276710,0.5076772368899830),(0.5278440831053800,0.5967529419883090,0.4300323561976360),(-0.5841869908525840,0.5967529419883090,0.3398847071241780),
(-0.5841869908525840,-0.5152781319696540,0.5336416065810580)),color=(0,1,0),wire=wire)

and

t2 = 
polyhedron(((-0.2465620095971660,-0.3923464486607380,0.66351391105310500),(0.6138246537971790,-0.3923464486607380,0.6635139110531050),(0.9006202082619610,-0.3923464486607380,-0.1968727533412390),(0.0402335448676159,-0.3923464486607380,-0.7704638622708030),(0.4957323663705040,0.1137633534535820,-0.4667979806022110),(-0.5554187616361600,0.2694894455656820,-0.3733623249349510),(-0.2465620095971660,1.0416313236631700,0.0899228021235415),(-0.4759984531689910,0.4680402147336070,0.3193592456953670),(0.6547954471492910,-0.0850654975199005,0.5406015299967700),(-0.8201531185267290,-0.3923464486607380,-0.1968727533412390)),color=(0,1,1),wire=wire)

having 200 particles of t1 and 300 of t2?

-- 
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 #706560]: Removing a box side

2023-05-16 Thread Carine Tanissa
Question #706560 on Yade changed:
https://answers.launchpad.net/yade/+question/706560

Status: Needs information => Solved

Carine Tanissa confirmed that the question is solved:
Thanks, it worked

-- 
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 #706653]: Modifying the size of potential particles

2023-05-15 Thread Carine Tanissa
Question #706653 on Yade changed:
https://answers.launchpad.net/yade/+question/706653

Description changed to:
In the following code, how can i make the sizes of the bottom face of the box 
10 times what it currently is, and increase the length of sides A and C of the 
box ten times as well:
# -*- encoding=utf-8 -*-
# CWBoon 2015

from yade import pack
import math

import os
import errno
try:
   os.mkdir('./vtk/')
except OSError as exc:
   if exc.errno != errno.EEXIST:
  raise
   pass


Gl1_PotentialParticle().store=True

O.engines=[
ForceResetter(),
InsertionSortCollider([PotentialParticle2AABB()],verletDist=0.01, 
avoidSelfInteractionMask=2),
InteractionLoop(
[Ig2_PP_PP_ScGeom(twoDimension=False, unitWidth2D=1.0, 
calContactArea=True, areaStep=5)],
[Ip2_FrictMat_FrictMat_KnKsPhys(kn_i=1e8, ks_i=1e7, Knormal = 
1e8, Kshear = 1e7, useFaceProperties=False, viscousDamping=0.05)],
[Law2_SCG_KnKsPhys_KnKsLaw(label='law',neverErase=False)]
),

NewtonIntegrator(damping=0.0,exactAsphericalRot=True,gravity=[0,-9.81,0]),

PotentialParticleVTKRecorder(fileName='./vtk/cubePPscaled',label='vtkRecorder',twoDimension=False,iterPeriod=5000,sampleX=50,sampleY=50,sampleZ=50,maxDimension=0.2)
]


powderDensity = 2000
distanceToCentre= 0.5
meanSize = 1.0
wallThickness = 0.5*meanSize
O.materials.append(FrictMat(young=-1,poisson=-1,frictionAngle=radians(0.0),density=powderDensity,label='frictionless'))
 #The normal and shear stifness values are determined in the IPhys functor, 
thus the young, poisson parameters of the FrictMat are not used.
lengthOfBase = 9.0*meanSize
heightOfBase = 14.0*meanSize
sp=pack.SpherePack()
mn,mx=Vector3(-0.5*(lengthOfBase-wallThickness),0.5*meanSize,-0.5*(lengthOfBase-wallThickness)),Vector3(0.5*(lengthOfBase-wallThickness),7.0*heightOfBase,0.5*(lengthOfBase-wallThickness))
R=sqrt(3.0)*distanceToCentre
sp.makeCloud(mn,mx,R,0,100,False)


count= 0
r=0.05*meanSize
for s in sp:
b=Body()
b.mask=1
b.aspherical=True
wire=False
color=Vector3(random.random(),random.random(),random.random())
highlight=False
b.shape=PotentialParticle(k=0.2, r=r, R=R, a=[1,-1,0,0,0,0], 
b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r],
 isBoundary=False, color=color, wire=wire, highlight=highlight, 
minAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabbRotated=1.02*Vector3(distanceToCentre,distanceToCentre,distanceToCentre),
 
minAabbRotated=1.02*Vector3(distanceToCentre,distanceToCentre,distanceToCentre),
 AabbMinMax=True, id=count)
V=(2*distanceToCentre)**3 # (approximate) Volume of cuboid
geomInert=(1./6.)*V*(2*distanceToCentre)**2 # (approximate) Principal 
inertia of cuboid to its centroid
utils._commonBodySetup(b, V, Vector3(geomInert,geomInert,geomInert), 
material='frictionless', pos=[0,0,0], fixed=False)
b.state.pos = s[0] #s[0] stores center
b.state.ori = 
Quaternion((random.random(),random.random(),random.random()),random.random()) 
#s[2]
O.bodies.append(b)
count=count+1


#Bottom faces of the box
r=0.1*wallThickness
bbb=Body()
bbb.mask=3
wire=False
color=[0,0.5,1]
highlight=False
bbb.shape=PotentialParticle(k=0.1, r=0.1*wallThickness, 
R=0.2*lengthOfBase,a=[1,-1,0,0,0,0], b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[lengthOfBase/2.0-r,lengthOfBase/2.0-r,0.5*wallThickness-r,0.5*wallThickness-r,lengthOfBase/2.0-r,lengthOfBase/2.0-r],
 
id=count,isBoundary=True,color=color,wire=wire,highlight=highlight,AabbMinMax=True,
 
minAabb=1.02*Vector3(lengthOfBase/2.0,0.5*wallThickness,lengthOfBase/2.0),maxAabb=1.02*Vector3(lengthOfBase/2.0,0.5*wallThickness,lengthOfBase/2.0),maxAabbRotated=1.02*Vector3(lengthOfBase/2.0,0.5*wallThickness,lengthOfBase/2.0),minAabbRotated=1.02*Vector3(lengthOfBase/2.0,0.5*wallThickness,lengthOfBase/2.0),fixedNormal=False)
length=lengthOfBase/1.
V=length*length*wallThickness
geomInertX=(1./12.)*V*(length**2+wallThickness**2)
geomInertY=(1./12.)*V*(length**2+length**2)
geomInertZ=(1./12.)*V*(length**2+wallThickness**2)
utils._commonBodySetup(bbb, V, Vector3(geomInertX,geomInertY,geomInertZ), 
material='frictionless', pos=[0,0,0], fixed=True)
bbb.state.pos = [0.0,0,0]
lidID = O.bodies.append(bbb)
count=count+1


#Vertical faces A-B-C-D of the box
bA=Body()
bA.mask=3
wire=False
color=[0,0.5,1]
highlight=False
bA.shape=PotentialParticle(k=0.1, r=0.1*wallThickness, 
R=0.5*heightOfBase,a=[1,-1,0,0,0,0], b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[0.5*wallThickness-r,0.5*wallThickness-r,0.5*heightOfBase-r,0.5*heightOfBase-r,0.5*lengthOfBase-r,0.5*lengthOfBase-r],
 
id=count,isBoundary=True,color=color,wire=wire,highlight=highlight,AabbMinMax=True,
 

[Yade-users] [Question #706653]: Modifying the size of potential particles

2023-05-15 Thread Carine Tanissa
New question #706653 on Yade:
https://answers.launchpad.net/yade/+question/706653

In the following code, how can i make the sizes of the bottom face of the box 
10 times what it currently is, and increase the length of sides A and C of the 
box:
# -*- encoding=utf-8 -*-
# CWBoon 2015

from yade import pack
import math

import os
import errno
try:
   os.mkdir('./vtk/')
except OSError as exc:
   if exc.errno != errno.EEXIST:
  raise
   pass


Gl1_PotentialParticle().store=True

O.engines=[
ForceResetter(),
InsertionSortCollider([PotentialParticle2AABB()],verletDist=0.01, 
avoidSelfInteractionMask=2),
InteractionLoop(
[Ig2_PP_PP_ScGeom(twoDimension=False, unitWidth2D=1.0, 
calContactArea=True, areaStep=5)],
[Ip2_FrictMat_FrictMat_KnKsPhys(kn_i=1e8, ks_i=1e7, Knormal = 
1e8, Kshear = 1e7, useFaceProperties=False, viscousDamping=0.05)],
[Law2_SCG_KnKsPhys_KnKsLaw(label='law',neverErase=False)]
),

NewtonIntegrator(damping=0.0,exactAsphericalRot=True,gravity=[0,-9.81,0]),

PotentialParticleVTKRecorder(fileName='./vtk/cubePPscaled',label='vtkRecorder',twoDimension=False,iterPeriod=5000,sampleX=50,sampleY=50,sampleZ=50,maxDimension=0.2)
]


powderDensity = 2000
distanceToCentre= 0.5
meanSize = 1.0
wallThickness = 0.5*meanSize
O.materials.append(FrictMat(young=-1,poisson=-1,frictionAngle=radians(0.0),density=powderDensity,label='frictionless'))
 #The normal and shear stifness values are determined in the IPhys functor, 
thus the young, poisson parameters of the FrictMat are not used.
lengthOfBase = 9.0*meanSize
heightOfBase = 14.0*meanSize
sp=pack.SpherePack()
mn,mx=Vector3(-0.5*(lengthOfBase-wallThickness),0.5*meanSize,-0.5*(lengthOfBase-wallThickness)),Vector3(0.5*(lengthOfBase-wallThickness),7.0*heightOfBase,0.5*(lengthOfBase-wallThickness))
R=sqrt(3.0)*distanceToCentre
sp.makeCloud(mn,mx,R,0,100,False)


count= 0
r=0.05*meanSize
for s in sp:
b=Body()
b.mask=1
b.aspherical=True
wire=False
color=Vector3(random.random(),random.random(),random.random())
highlight=False
b.shape=PotentialParticle(k=0.2, r=r, R=R, a=[1,-1,0,0,0,0], 
b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r],
 isBoundary=False, color=color, wire=wire, highlight=highlight, 
minAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabbRotated=1.02*Vector3(distanceToCentre,distanceToCentre,distanceToCentre),
 
minAabbRotated=1.02*Vector3(distanceToCentre,distanceToCentre,distanceToCentre),
 AabbMinMax=True, id=count)
V=(2*distanceToCentre)**3 # (approximate) Volume of cuboid
geomInert=(1./6.)*V*(2*distanceToCentre)**2 # (approximate) Principal 
inertia of cuboid to its centroid
utils._commonBodySetup(b, V, Vector3(geomInert,geomInert,geomInert), 
material='frictionless', pos=[0,0,0], fixed=False)
b.state.pos = s[0] #s[0] stores center
b.state.ori = 
Quaternion((random.random(),random.random(),random.random()),random.random()) 
#s[2]
O.bodies.append(b)
count=count+1


#Bottom faces of the box
r=0.1*wallThickness
bbb=Body()
bbb.mask=3
wire=False
color=[0,0.5,1]
highlight=False
bbb.shape=PotentialParticle(k=0.1, r=0.1*wallThickness, 
R=0.2*lengthOfBase,a=[1,-1,0,0,0,0], b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[lengthOfBase/2.0-r,lengthOfBase/2.0-r,0.5*wallThickness-r,0.5*wallThickness-r,lengthOfBase/2.0-r,lengthOfBase/2.0-r],
 
id=count,isBoundary=True,color=color,wire=wire,highlight=highlight,AabbMinMax=True,
 
minAabb=1.02*Vector3(lengthOfBase/2.0,0.5*wallThickness,lengthOfBase/2.0),maxAabb=1.02*Vector3(lengthOfBase/2.0,0.5*wallThickness,lengthOfBase/2.0),maxAabbRotated=1.02*Vector3(lengthOfBase/2.0,0.5*wallThickness,lengthOfBase/2.0),minAabbRotated=1.02*Vector3(lengthOfBase/2.0,0.5*wallThickness,lengthOfBase/2.0),fixedNormal=False)
length=lengthOfBase/1.
V=length*length*wallThickness
geomInertX=(1./12.)*V*(length**2+wallThickness**2)
geomInertY=(1./12.)*V*(length**2+length**2)
geomInertZ=(1./12.)*V*(length**2+wallThickness**2)
utils._commonBodySetup(bbb, V, Vector3(geomInertX,geomInertY,geomInertZ), 
material='frictionless', pos=[0,0,0], fixed=True)
bbb.state.pos = [0.0,0,0]
lidID = O.bodies.append(bbb)
count=count+1


#Vertical faces A-B-C-D of the box
bA=Body()
bA.mask=3
wire=False
color=[0,0.5,1]
highlight=False
bA.shape=PotentialParticle(k=0.1, r=0.1*wallThickness, 
R=0.5*heightOfBase,a=[1,-1,0,0,0,0], b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[0.5*wallThickness-r,0.5*wallThickness-r,0.5*heightOfBase-r,0.5*heightOfBase-r,0.5*lengthOfBase-r,0.5*lengthOfBase-r],
 
id=count,isBoundary=True,color=color,wire=wire,highlight=highlight,AabbMinMax=True,
 

[Yade-users] [Question #706652]: Running code with 4 threads

2023-05-15 Thread Carine Tanissa
New question #706652 on Yade:
https://answers.launchpad.net/yade/+question/706652

How can i edit this code to run it in parallel using 4 threads:


from yade import pack, plot
import math

# 7-15. The code block is trying to create a directory named "vtk" if it 
doesn't exist already. This directory is used for storing VTK files.

import os
import errno
try:
   os.mkdir('./vtk/')
except OSError as exc:
   if exc.errno != errno.EEXIST:
  raise
   pass


#Enable the storage of potential particles in the simulation.

Gl1_PotentialParticle().store=True

O.engines=[
ForceResetter(),
InsertionSortCollider([PotentialParticle2AABB()],verletDist=0.01, 
avoidSelfInteractionMask=2),
InteractionLoop(
[Ig2_PP_PP_ScGeom(twoDimension=False, unitWidth2D=1.0, 
calContactArea=True, areaStep=5)],
[Ip2_FrictMat_FrictMat_KnKsPhys(kn_i=1e8, ks_i=1e7, Knormal = 
1e8, Kshear = 1e7, useFaceProperties=False, viscousDamping=0.05)],
[Law2_SCG_KnKsPhys_KnKsLaw(label='law',neverErase=False)]
),

NewtonIntegrator(damping=0.1,exactAsphericalRot=True,gravity=[0,-9.81,0]),
# call the checkUnbalanced function (defined below) every 2 seconds
PyRunner(command='checkUnbalanced()', realPeriod=2),
# call the addPlotData function every 200 steps
PyRunner(command='addPlotData()', iterPeriod=100),

PotentialParticleVTKRecorder(fileName='./vtk/cubePPscaled',label='vtkRecorder',twoDimension=False,iterPeriod=1000,sampleX=50,sampleY=50,sampleZ=50,maxDimension=0.2)
]

#Define the density of the powder material.
powderDensity = 2000
#Define the distance to the center for particles.
distanceToCentre= 0.5
# Define the mean size of particles.
meanSize = 1.
#Calculate the wall thickness based on the mean size.
wallThickness = 0.5*meanSize
#this material represents frictionless particles and sets some parameters such 
as density.
O.materials.append(FrictMat(young=-1,poisson=-1,frictionAngle=radians(0.0),density=powderDensity,label='frictionless'))
 #The normal and shear stifness values are determined in the IPhys functor, 
thus the young, poisson parameters of the FrictMat are not used.
lengthOfBase = 9.0*meanSize
heightOfBase = 14.0*meanSize
# create empty sphere packing
# sphere packing is not equivalent to particles in simulation, it contains only 
the pure geometry
sp=pack.SpherePack()
mn,mx=Vector3(-0.5*(lengthOfBase-wallThickness),0.5*meanSize,-0.5*(lengthOfBase-wallThickness)),Vector3(0.5*(lengthOfBase-wallThickness),7.0*2*heightOfBase,0.5*(lengthOfBase-wallThickness))
R=sqrt(3.0)*distanceToCentre
sp.makeCloud(mn,mx,R,0,700,False)

#initialize the counter variable
count= 0
#Calculate the radius of particles based on the mean size.
r=0.05*meanSize

for s in sp:
b=Body()
b.mask=1
b.aspherical=True
wire=False
color=Vector3(random.random(),random.random(),random.random())
highlight=False
b.shape=PotentialParticle(k=0.2, r=r, R=R, a=[1,-1,0,0,0,0], 
b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r],
 isBoundary=False, color=color, wire=wire, highlight=highlight, 
minAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabbRotated=1.02*Vector3(distanceToCentre,distanceToCentre,distanceToCentre),
 
minAabbRotated=1.02*Vector3(distanceToCentre,distanceToCentre,distanceToCentre),
 AabbMinMax=True, id=count)
V=(2*distanceToCentre)**3 # (approximate) Volume of cuboid
geomInert=(1./6.)*V*(2*distanceToCentre)**2 # (approximate) Principal 
inertia of cuboid to its centroid
utils._commonBodySetup(b, V, Vector3(geomInert,geomInert,geomInert), 
material='frictionless', pos=[0,0,0], fixed=False)
b.state.pos = s[0] #s[0] stores center
b.state.ori = 
Quaternion((random.random(),random.random(),random.random()),random.random()) 
#s[2]
O.bodies.append(b)
count=count+1
# for s in sp:
 #creates a new instance of the Body class to represent a particle.
 #  b=Body()
 #Assigns a mask value of 1 to the body.
 #  b.mask=1
 # Sets the body as aspherical, meaning it has a non-spherical shape.
 #  b.aspherical=True
 #Specifies whether the body is displayed as a wireframe or not
 #  wire=False
 # Generates a random RGB color for the body.
 #  color=Vector3(random.random(),random.random(),random.random())
 #highlight = False: Specifies whether the body should be highlighted or not
 #  highlight=False
 # Defines the shape of the body using a PotentialParticle shape. It 
specifies various parameters such as radius (r), outer radius (R), shape 
coefficients (a, b, c, d), color, and AABB (Axis-Aligned Bounding Box) 
dimensions.
 #k=0.2: The spring constant (k) determines the stiffness of the 
interactions 

Re: [Yade-users] [Question #706182]: Visualizing cubes

2023-05-11 Thread Carine Tanissa
Question #706182 on Yade changed:
https://answers.launchpad.net/yade/+question/706182

Status: Answered => Solved

Carine Tanissa confirmed that the question is solved:
Thanks!

-- 
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 #706560]: Removing a box side

2023-05-11 Thread Carine Tanissa
Question #706560 on Yade changed:
https://answers.launchpad.net/yade/+question/706560

Status: Answered => Open

Carine Tanissa is still having a problem:
Thanks,

For the cubePPscaled.py example where would i add O.bodies.erase(bodyID) to 
remove bD once the particles are all deposited in the box?
I was adding O.bodies.erase(bD) after 
def removeLid():
global lidID
if (O.bodies[lidID]):
O.bodies.erase(lidID)   
but i am getting an error.

Can you please tell me where to incorporate it?
Thanks.

Here s the unedited code:
# -*- encoding=utf-8 -*-
# CWBoon 2015

from yade import pack
import math

# 7-15. The code block is trying to create a directory named "vtk" if it
doesn't exist already. This directory is used for storing VTK files.

import os
import errno
try:
   os.mkdir('./vtk/')
except OSError as exc:
   if exc.errno != errno.EEXIST:
  raise
   pass

#Enable the storage of potential particles in the simulation.

Gl1_PotentialParticle().store=True

O.engines=[
ForceResetter(),
InsertionSortCollider([PotentialParticle2AABB()],verletDist=0.01, 
avoidSelfInteractionMask=2),
InteractionLoop(
[Ig2_PP_PP_ScGeom(twoDimension=False, unitWidth2D=1.0, 
calContactArea=True, areaStep=5)],
[Ip2_FrictMat_FrictMat_KnKsPhys(kn_i=1e8, ks_i=1e7, Knormal = 
1e8, Kshear = 1e7, useFaceProperties=False, viscousDamping=0.05)],
[Law2_SCG_KnKsPhys_KnKsLaw(label='law',neverErase=False)]
),

NewtonIntegrator(damping=0.0,exactAsphericalRot=True,gravity=[0,-9.81,0]),

PotentialParticleVTKRecorder(fileName='./vtk/cubePPscaled',label='vtkRecorder',twoDimension=False,iterPeriod=5000,sampleX=50,sampleY=50,sampleZ=50,maxDimension=0.2)
]


#Define the density of the powder material.
powderDensity = 2000
#Define the distance to the center for particles.
distanceToCentre= 0.5
# Define the mean size of particles.
meanSize = 1.
#Calculate the wall thickness based on the mean size.
wallThickness = 0.5*meanSize
#this material represents frictionless particles and sets some parameters such 
as density.
O.materials.append(FrictMat(young=-1,poisson=-1,frictionAngle=radians(0.0),density=powderDensity,label='frictionless'))
 #The normal and shear stifness values are determined in the IPhys functor, 
thus the young, poisson parameters of the FrictMat are not used.
lengthOfBase = 9.0*meanSize
heightOfBase = 14.0*meanSize
# create empty sphere packing
# sphere packing is not equivalent to particles in simulation, it contains only 
the pure geometry
sp=pack.SpherePack()
mn,mx=Vector3(-0.5*(lengthOfBase-wallThickness),0.5*meanSize,-0.5*(lengthOfBase-wallThickness)),Vector3(0.5*(lengthOfBase-wallThickness),7.0*heightOfBase,0.5*(lengthOfBase-wallThickness))
R=sqrt(3.0)*distanceToCentre
sp.makeCloud(mn,mx,R,0,100,False)

#initialize the counter variable
count= 0
#Calculate the radius of particles based on the mean size.
r=0.05*meanSize

for s in sp:
b=Body()
b.mask=1
b.aspherical=True
wire=False
color=Vector3(random.random(),random.random(),random.random())
highlight=False
b.shape=PotentialParticle(k=0.2, r=r, R=R, a=[1,-1,0,0,0,0], 
b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r],
 isBoundary=False, color=color, wire=wire, highlight=highlight, 
minAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabbRotated=1.02*Vector3(distanceToCentre,distanceToCentre,distanceToCentre),
 
minAabbRotated=1.02*Vector3(distanceToCentre,distanceToCentre,distanceToCentre),
 AabbMinMax=True, id=count)
V=(2*distanceToCentre)**3 # (approximate) Volume of cuboid
geomInert=(1./6.)*V*(2*distanceToCentre)**2 # (approximate) Principal 
inertia of cuboid to its centroid
utils._commonBodySetup(b, V, Vector3(geomInert,geomInert,geomInert), 
material='frictionless', pos=[0,0,0], fixed=False)
b.state.pos = s[0] #s[0] stores center
b.state.ori = 
Quaternion((random.random(),random.random(),random.random()),random.random()) 
#s[2]
O.bodies.append(b)
count=count+1


#Bottom faces of the box
r=0.1*wallThickness
bbb=Body()
bbb.mask=3
wire=False
color=[0,0.5,1]
highlight=False
bbb.shape=PotentialParticle(k=0.1, r=0.1*wallThickness, 
R=0.2*lengthOfBase,a=[1,-1,0,0,0,0], b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[lengthOfBase/6.0-r,lengthOfBase/6.0-r,0.5*wallThickness-r,0.5*wallThickness-r,lengthOfBase/6.0-r,lengthOfBase/6.0-r],
 
id=count,isBoundary=True,color=color,wire=wire,highlight=highlight,AabbMinMax=True,
 
minAabb=1.02*Vector3(lengthOfBase/6.0,0.5*wallThickness,lengthOfBase/6.0),maxAabb=1.02*Vector3(lengthOfBase/6.0,0.5*wallThickness,lengthOfBase/6.0),maxAabbRotated=1.02*Vector3(lengthOfBase/6.0,0.5*wallThickness,len

[Yade-users] [Question #706560]: Removing a box side

2023-05-09 Thread Carine Tanissa
New question #706560 on Yade:
https://answers.launchpad.net/yade/+question/706560

How to drop particles in the box to a certain void ratio and then remove one 
side of the box and see them roll?

-- 
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 #706078]: The VTK recorder is not creating any file

2023-04-11 Thread Carine Tanissa
Question #706078 on Yade changed:
https://answers.launchpad.net/yade/+question/706078

Carine Tanissa gave more information on the question:
Děkuji.

In fact i was able to visualize more simple simulations using vtk and Paraview.
I believe I am having issues compiling here.

I made followed the steps from: https://yade-
dem.org/doc/installation.html#source-code

When i get to the cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk step
however, i get the following every time:

cMake Error at
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230
(message): Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR
EIGEN3_VERSION_OK) (Required is at least version "2.91.0") Call Stack
(most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594
(_FPHSA_FAILURE_MESSAGE) cMake/FindEigen3.cmake:76
(find_package_handle_standard_args) CMakeLists.txt:187 (FIND_PACKAGE)

or

CMake Error: The source /home/carine/trunk/CMakeLists.txt does not match
the source /usr/share/clang/scan-build-14/CMakeLists.txt used to
generate cache. Re-run cmake with a different source directory.

how do i solve this?

and after this step, should i just run my code and yade should be able
to display the simulation?


Děkuju!

-- 
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 #706078]: The VTK recorder is not creating any file

2023-04-11 Thread Carine Tanissa
Question #706078 on Yade changed:
https://answers.launchpad.net/yade/+question/706078

Status: Needs information => Open

Carine Tanissa gave more information on the question:
Děkuji.

In fact i was able to visualize more simple simulations using vtk and Paraview.
I believe I am having issues compiling here.

I made followed the steps from: https://yade-
dem.org/doc/installation.html#source-code

When i get to the cmake -DCMAKE_INSTALL_PREFIX=../install ../trunk step
however, i get the following every time:

cMake Error at
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230
(message): Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR
EIGEN3_VERSION_OK) (Required is at least version "2.91.0") Call Stack
(most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594
(_FPHSA_FAILURE_MESSAGE) cMake/FindEigen3.cmake:76
(find_package_handle_standard_args) CMakeLists.txt:187 (FIND_PACKAGE)

or

CMake Error: The source /home/carine/trunk/CMakeLists.txt does not match
the source /usr/share/clang/scan-build-14/CMakeLists.txt used to
generate cache. Re-run cmake with a different source directory.

how do i solve this?

and after this step, should i just run my code and yade should be able
to display the simulation?


Děkuju!

-- 
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 #706182]: Visualizing cubes

2023-04-11 Thread Carine Tanissa
New question #706182 on Yade:
https://answers.launchpad.net/yade/+question/706182

I am using the following code from the examples to model cube deposition in a 
box, but i am not able to visualize it or export it to vtk.
This is my code:

# -*- encoding=utf-8 -*-
# 2022 © Vasileios Angelidakis 

# Duplicate script of cubePBscaled.py, simplified using the "potential_utils" 
module.

from yade import pack, 
from potential_utils import * 
import math

recordVTK=True
# 

if recordVTK:
# Create vtk directory
import os
import errno
try:
os.mkdir('./vtk/')
except OSError as exc:
if exc.errno != errno.EEXIST:
raise
pass


O.engines=[
ForceResetter(),
InsertionSortCollider([PotentialBlock2AABB()],verletDist=0.01),
InteractionLoop(
[Ig2_PB_PB_ScGeom(twoDimension=False, unitWidth2D=1.0, 
calContactArea=True)],
[Ip2_FrictMat_FrictMat_KnKsPBPhys(kn_i=1e8, ks_i=1e7, 
Knormal=1e8, Kshear=1e7, useFaceProperties=False, viscousDamping=0.2)],
[Law2_SCG_KnKsPBPhys_KnKsPBLaw(label='law',neverErase=False, 
allowViscousAttraction=True, traceEnergy=False)]
),

NewtonIntegrator(damping=0.0,exactAsphericalRot=True,gravity=[0,-9.81,0]),
# save data for Paraview
VTKRecorder(fileName='3d-vtk-', recorders=['all'], iterPeriod=1000),
]

powderDensity = 2000
meanSize = 1.0
distanceToCentre = meanSize/2.
wallThickness = 0.5*meanSize

O.materials.append(FrictMat(young=-1,poisson=-1,frictionAngle=radians(0.0),density=powderDensity,label='frictionless'))
 #The normal and shear stifness values are determined in the IPhys functor, 
thus the young, poisson parameters of the FrictMat are not used.
lengthOfBase = 9.0*meanSize
heightOfBase = 14.0*meanSize
sp=pack.SpherePack()
mn,mx=Vector3(-0.5*(lengthOfBase-wallThickness),0.5*meanSize,-0.5*(lengthOfBase-wallThickness)),Vector3(0.5*(lengthOfBase-wallThickness),7.0*heightOfBase,0.5*(lengthOfBase-wallThickness))
R=sqrt(3.0)*distanceToCentre
sp.makeCloud(mn,mx,R,0,100,False)


r=0.01*meanSize
for s in sp:
color=Vector3(random.random(),random.random(),random.random())
# PB_utils.cuboid
b=cuboid(material=O.materials['frictionless'], edges=[1.0,1.0,1.0], 
r=r, R=0.0, center=s[0], mask=1, isBoundary=False, fixed=False, color=color)
b.state.ori = 
Quaternion((random.random(),random.random(),random.random()),random.random()) 
#s[2]
O.bodies.append(b)

#Bottom faces of the box
r=0.1*wallThickness
color=[0,0.5,1]


# Centroids of particles forming the bottom face of the box
center= [[   0,   0, 0],
 [-lengthOfBase/3.0,  0, 0],
 [ lengthOfBase/3.0,  0, 0],

 [0,  0, -lengthOfBase/3.0],
 [-lengthOfBase/3.0,  0, -lengthOfBase/3.0],
 [ lengthOfBase/3.0,  0, -lengthOfBase/3.0],

 [0,  0,  lengthOfBase/3.0],
 [-lengthOfBase/3.0,  0,  lengthOfBase/3.0],
 [ lengthOfBase/3.0,  0,  lengthOfBase/3.0]
]


edges=[lengthOfBase/3.,wallThickness,lengthOfBase/3.]

lidID=len(O.bodies)
for i in range(0,9):
O.bodies.append( cuboid(material=O.materials['frictionless'], 
edges=edges, r=r, R=0.0, center=center[i], mask=3, isBoundary=True, fixed=True, 
color=color) )


# Vertical faces A-B-C-D of the box
center= [ [   0,0.5*heightOfBase,0.5*lengthOfBase],
  [   0,0.5*heightOfBase,   -0.5*lengthOfBase],
  [ 0.5*lengthOfBase,   0.5*heightOfBase,   0],
  [-0.5*lengthOfBase,   0.5*heightOfBase,   0]
]


edges=  [ [ lengthOfBase,  heightOfBase,  wallThickness],
  [ lengthOfBase,  heightOfBase,  wallThickness],
  [wallThickness,  heightOfBase,   lengthOfBase],
  [wallThickness,  heightOfBase,   lengthOfBase]
]

transparentID=len(O.bodies)
for i in range(0,4):
O.bodies.append( cuboid(material=O.materials['frictionless'], 
edges=edges[i], r=r, R=0.0, center=center[i], mask=3, isBoundary=True, 
fixed=True, color=color) )
O.bodies[transparentID].shape.wire=True


escapeNo=0
def myAddPlotData():
global escapeNo
global wallThickness
global meanSize
uf=utils.unbalancedForce()
if isnan(uf):
uf = 1.0
KE = utils.kineticEnergy()

for b in O.bodies:
if b.state.pos[1] < -5.0*meanSize and 
len(b.state.blockedDOFs)==0: #i.e. fixed==False
escapeNo = escapeNo+1
O.bodies.erase(b.id)
if O.iter>15000:
removeLid()


Re: [Yade-users] [Question #706078]: The VTK recorder is not creating any file

2023-04-04 Thread Carine Tanissa
Question #706078 on Yade changed:
https://answers.launchpad.net/yade/+question/706078

Description changed to:
I am trying to run the cubePBscaled.py example.
To visualize it, I need to use Paraview.
When I use the vtk recorder and specify a file name, it creates the file but it 
is empty.
Can anyone help solve the issue?
Thanks

This is the code:
# -*- encoding=utf-8 -*-
# CWBoon 2015

# Uses the following algorithm:
# CW Boon, GT Houlsby, S Utili (2012).  A new algorithm for contact detection 
between convex polygonal and polyhedral particles in the discrete element 
method.  Computers and Geotechnics 44, 73-82. 

#Display is saved to a vtk file in the "vtk folder" and the user is
required to load it using ParaView.  Control the frequency of printing a
vtk file using vtkRecorder.iterPeriod in python

#To use this script:
#Compile with
#ENABLE_POTENTIAL_BLOCKS=ON, and add  sudo apt-get install
#coinor-clp, 
#coinor-libclp-dev, 
#coinor-libclp1, 
#coinor-libosi1v5


from yade import pack
import math

import os
import errno
try:
os.mkdir('./vtk/')
except OSError as exc:
if exc.errno != errno.EEXIST:
raise
pass


O.engines=[
ForceResetter(),
InsertionSortCollider([PotentialBlock2AABB()],verletDist=0.01, 
avoidSelfInteractionMask=2),
InteractionLoop(
[Ig2_PB_PB_ScGeom(twoDimension=False, unitWidth2D=1.0, 
calContactArea=True)],
[Ip2_FrictMat_FrictMat_KnKsPBPhys(kn_i=1e8, ks_i=1e7, 
Knormal=1e8, Kshear=1e7, useFaceProperties=False, viscousDamping=0.2)],
[Law2_SCG_KnKsPBPhys_KnKsPBLaw(label='law',neverErase=False, 
allowViscousAttraction=True, traceEnergy=False)]
),
#GlobalStiffnessTimeStepper(),

NewtonIntegrator(damping=0.0,exactAsphericalRot=True,gravity=[0,-9.81,0]),

PotentialBlockVTKRecorder(fileName='./vtk/cubePBscaled',iterPeriod=50,twoDimension=False,sampleX=50,sampleY=50,sampleZ=50,maxDimension=0.2,label='vtkRecorder')
]


powderDensity = 2000
distanceToCentre = 0.5
meanSize = 1.0
wallThickness = 0.5*meanSize
O.materials.append(FrictMat(young=-1,poisson=-1,frictionAngle=radians(0.0),density=powderDensity,label='frictionless'))
 #The normal and shear stifness values are determined in the IPhys functor, 
thus the young, poisson parameters of the FrictMat are not used.
lengthOfBase = 9.0*meanSize
heightOfBase = 14.0*meanSize
sp=pack.SpherePack()
mn,mx=Vector3(-0.5*(lengthOfBase-wallThickness),0.5*meanSize,-0.5*(lengthOfBase-wallThickness)),Vector3(0.5*(lengthOfBase-wallThickness),7.0*heightOfBase,0.5*(lengthOfBase-wallThickness))
R=sqrt(3.0)*distanceToCentre
sp.makeCloud(mn,mx,R,0,100,False)


r=0.01*meanSize
for s in sp:
b=Body()
b.mask=1
b.aspherical=True
wire=False
color=Vector3(random.random(),random.random(),random.random())
highlight=False
b.shape=PotentialBlock(k=0.0, r=r, R=0.0, a=[1,-1,0,0,0,0], 
b=[0,0,1,-1,0,0], c=[0,0,0,0,1,-1], 
d=[distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r,distanceToCentre-r],
 isBoundary=False, color=color,
wire=wire, highlight=highlight, 
minAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
maxAabb=sqrt(3)*Vector3(distanceToCentre,distanceToCentre,distanceToCentre), 
AabbMinMax=True, fixedNormal=False, id=len(O.bodies))
utils._commonBodySetup(b, b.shape.volume, b.shape.inertia, 
material='frictionless',pos=s[0], fixed=False)
b.state.pos = s[0] #s[0] stores center
b.state.ori = 
Quaternion((random.random(),random.random(),random.random()),random.random()) 
#s[2]
O.bodies.append(b)


#Bottom faces of the box
r=0.1*wallThickness
bbb=Body()
bbb.mask=3
wire=False
color=[0,0.5,1]
highlight=False
bbb.shape=PotentialBlock(k=0.0, r=r, R=0.0, a=[1,-1,0,0,0,0], b=[0,0,1,-1,0,0], 
c=[0,0,0,0,1,-1], 
d=[lengthOfBase/6.0-r,lengthOfBase/6.0-r,0.5*wallThickness-r,0.5*wallThickness-r,lengthOfBase/6.0-r,lengthOfBase/6.0-r],
 id=len(O.bodies), isBoundary=True, color=color, wire=wire, 
highlight=highlight, AabbMinMax=True, 
minAabb=1.05*Vector3(lengthOfBase/6.0,0.5*wallThickness,lengthOfBase/6.0), 
maxAabb=1.05*Vector3(lengthOfBase/6.0,0.5*wallThickness,lengthOfBase/6.0), 
fixedNormal=False)
utils._commonBodySetup(bbb, bbb.shape.volume, bbb.shape.inertia, 
material='frictionless', pos=[0,0,0], fixed=True)
bbb.state.pos = [0,0,0]
lidID = O.bodies.append(bbb)


b1=Body()
b1.mask=3
wire=False
color=[0,0.5,1]
highlight=False
b1.shape=PotentialBlock(k=0.0, r=r, R=0.0, a=[1,-1,0,0,0,0], b=[0,0,1,-1,0,0], 
c=[0,0,0,0,1,-1], 
d=[lengthOfBase/6.0-r,lengthOfBase/6.0-r,0.5*wallThickness-r,0.5*wallThickness-r,lengthOfBase/6.0-r,lengthOfBase/6.0-r],
 id=len(O.bodies), isBoundary=True, color=color, wire=wire, 
highlight=highlight, AabbMinMax=True, 
minAabb=1.05*Vector3(lengthOfBase/6.0,0.5*wallThickness,lengthOfBase/6.0), 
maxAabb=1.05*Vector3(lengthOfBase/6.0,0.5*wallThickness,lengthOfBase/6.0), 

Re: [Yade-users] [Question #706078]: The VTK recorder is not creating any file

2023-04-04 Thread Carine Tanissa
Question #706078 on Yade changed:
https://answers.launchpad.net/yade/+question/706078

Summary changed to:
The VTK recorder is not creating any file

Description changed to:
I am trying to run the cubePBscaled.py example.
To visualize it, I need to use Paraview.
When I use the vtk recorder and specify a file name, it creates the file but it 
is empty.
Can anyone help solve the issue?
Thanks

-- 
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 #706078]: I am unsure where the vtk folders are saved and how to open them in paraview

2023-04-04 Thread Carine Tanissa
New question #706078 on Yade:
https://answers.launchpad.net/yade/+question/706078

I am trying to run the cubePBscaled.py example.
However, to visualize it i need to use Paraview.
I am unsure where the vtk folder is getting saved tho.
Can anyone help solve the issue?
Thanks

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