[Yade-users] [Question #706787]: Materials changes after first step

2023-05-24 Thread mohsen
New question #706787 on Yade:
https://answers.launchpad.net/yade/+question/706787

In the name of God
Hi every one!
I encountered an strange problem. When i add some spheres bonded to each other 
using CohFrictMat in a triaxial box, exactly after addition of bonded 
particles, the wall material type changes from 'walls' to 'cube'. here is the 
MWE:

from yade import pack

### DEFINING VARIABLES AND MATERIALS ###


# The following 5 lines will be used later for batch execution

ConPre=-10
ConPre1=-5000
key='t_20%_25_100' # put you simulation's name here
targetPorosity = 0.38#the porosity we want for the packing
compFricDegree = 30 # initial contact friction during the confining phase (will 
be decreased during the REFD compaction process)
finalFricDegree = 30 # contact friction during the deviatoric loading

young=1e9 # contact stiffness
mn,mx=Vector3(0,0,0),Vector3(.3,.3,.3) # corners of the initial packing
O.materials.append(CohFrictMat(young=1e9,poisson=0.2,density=1500,isCohesive=False,frictionAngle=0,label='walls'))

## create walls around the packing
walls=aabbWalls([mn,mx],thickness=0)
wallIds=O.bodies.append(walls)

## create materials for spheres and plates
O.materials.append(CohFrictMat(young=1e6,poisson=0.48,density=1500,label='cube',frictionAngle=radians(compFricDegree),
isCohesive=True,
normalCohesion=5000,
shearCohesion=5000,
momentRotationLaw=True
))

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(.3,.3,.3),rMean=.05,distributeMass=False,seed=1)

#
### DEFINING ENGINES ###


triax=TriaxialStressController(
maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth)
finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth)
thickness = 0,
stressMask = 7,
internalCompaction=False, # If true the confining pressure is generated by 
growing particles
)

newton=NewtonIntegrator(damping=.1)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.12),Ig2_Box_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(
setCohesionNow=True,
setCohesionOnNewContacts=False,
)],

[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),Law2_ScGeom_FrictPhys_CundallStrack()]
),
triax,
newton,
]

triax.goal1=triax.goal2=ConPre1
triax.goal3=ConPre1
O.dt=0
yade.qt.Controller()

for x in [.1,.2]:
for y in [.1,.2]:
for z in [.1,.2]:
s = utils.sphere((x,y,z),.08,material='cube')
O.bodies.append(s)

###By adding the following lines to the terminal, the walls disppeared

#O.step()

-- 
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 #706786]: Can I add properties and color into export text file?

2023-05-24 Thread Huan
New question #706786 on Yade:
https://answers.launchpad.net/yade/+question/706786

Hi,
I am trying to save the position, properties, and color(haven't made yet not 
sure how to). Can I export it into one text file for future importing uses for 
example I will import the text when I implement gravity deposition?

import random
import math
from yade import geom, pack, utils, plot, ymport, export
import numpy as np

# Materials Properties
gravel = CohFrictMat(young = 1e7, poisson = 0.25, density = 2700, label = 
'gravel')
asphalt_binder = CohFrictMat(young = 1e7, poisson = 0.25, density = 1060, 
normalCohesion = 2e5, shearCohesion = 2e5, label = 'asphalt_binder')

# add properties
O.materials.append(gravel)
O.materials.append(asphalt_binder)

# Define cylinder with funnel parameters
center = (0, 0, 0)
diameter = 0.102
height = 0.18

# create cylindrical body with radius 0.102 m and height 0.064 m
cylinder = geom.facetCylinder(center=center, radius=diameter/2, height=height, 
segmentsNumber=80, wallMask=6)

# add cylinder to simulation
O.bodies.append(cylinder)

# Define cylinder with funnel parameters
center1 = (0,0,height/2)
dBunker = 0.4
dOutput = 0.102
hBunker = 0
hOutput = 0.15
hPipe = 0

# create funnel as a bunker with diameter 0.102 m, height 0.064 m
funnel = geom.facetBunker(center=center1, dBunker=dBunker, dOutput=dOutput, 
hBunker=hBunker,hOutput=hOutput, hPipe=hPipe, segmentsNumber=80, wallMask=4)

# add funnel to simulation
O.bodies.append(funnel)

def makeRandomBlocks(diameter, gridsize, minz, numblocks):
bunkerLimit = diameter/2
#
# Make grid blocks inside a bunker
#
grid = np.arange(-bunkerLimit, bunkerLimit, gridsize)
inGrid = []
for yi in grid:
for xi in grid:
c = [[xi, yi], [xi+gridsize, yi], [xi+gridsize, yi+gridsize], [xi, 
yi+gridsize]]
#
# Check if the block corners are outside of the bunker or not
#
out = False
for p in c:
r = (p[0]**2 + p[1]**2)**0.5
if r > bunkerLimit:
out = True
#
# If the block is inside the bunker, keep it
#
if not out:
inGrid.append(c)
layer = math.ceil(numblocks / len(inGrid))
blocks = []
for l in range(layer):
for g in inGrid:
zi = minz + l*gridsize
p1 = g[0].copy()
p1.append(zi)
p2 = g[2].copy()
p2.append(zi+gridsize)
blocks.append([p1, p2])
random.shuffle(blocks)
return blocks

minZ = 2.35
dbunker = 0.4
gridSize = dbunker/8
numblocks = 51
blockList = makeRandomBlocks(dbunker, gridSize, minZ, numblocks)

for i in range(numblocks):
print("Making cloud block", i+1, "/", numblocks)
corner = blockList.pop()
sp = pack.SpherePack()

# 15.75 mm 13 particles
if (i < 13): 
n1 = sp.makeCloud(minCorner=corner[0], maxCorner=corner[1], 
rMean=0.01575/2, num=1)
 
# 11 mm 51 particles 
n2 = sp.makeCloud(minCorner=corner[0], maxCorner=corner[1], rMean=0.011/2, 
num=1)
 
# 7.125 mm 51x11 = 561 particles
n3 = sp.makeCloud(minCorner=corner[0], maxCorner=corner[1], 
rMean=0.007125/2, num=11)

# 3.555 mm 51x100 = 5,100 particles 
n4 = sp.makeCloud(minCorner=corner[0], maxCorner=corner[1], 
rMean=0.003555/2, num=100)

# 1.77 mm 51x360 = 18,360 particles 
n5 = sp.makeCloud(minCorner=corner[0], maxCorner=corner[1], 
rMean=0.00177/2, num=360)

# 0.6 mm 51x19000 = 969,000 particles 
n6 = sp.makeCloud(minCorner=corner[0], maxCorner=corner[1], rMean=0.0006/2, 
num=19000)

# 0.3 mm 51x78510 = 4,004,010 particles 
n7 = sp.makeCloud(minCorner=corner[0], maxCorner=corner[1], rMean=0.0003/2, 
num=78510)

sp.toSimulation()

# give properties to sphere
for i in range(n1,n6):
O.bodies[i].mat = gravel
for i in range(n6, n7):
O.bodies[i].mat = asphalt_binder

# Save body IDs and materials to a text file
with open("body_properties.txt", "w") as file:
for b in O.bodies:
file.write(f"{b.id} {b.mat}\n")

export.text("testCloud.txt")

-- 
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:
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 Jan Stránský
Question #706758 on Yade changed:
https://answers.launchpad.net/yade/+question/706758

Status: Open => Needs information

Jan Stránský requested more information:
> How would i incorporate it into this code

it depends on what, when, how, ... it should do..

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 #706781]: Polyhedra VTK Exporter

2023-05-24 Thread Jan Stránský
Question #706781 on Yade changed:
https://answers.launchpad.net/yade/+question/706781

Status: Open => Needs information

Jan Stránský requested more information:
Hello,

it is impossible to say without a reproducible example, system version,
yade version, ... [1]

By the way, any difference from [2]?

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://answers.launchpad.net/yade/+question/706709

-- 
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 Jan Stránský
Question #706709 on Yade changed:
https://answers.launchpad.net/yade/+question/706709

Status: Open => Needs information

Jan Stránský requested more information:
instead of
yade script.py
run
catchsegv yade script.py
and provide the output

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 #706766]: How to get Micro-strain field from a 2D simulation in YADE

2023-05-24 Thread Karol Brzezinski
Question #706766 on Yade changed:
https://answers.launchpad.net/yade/+question/706766

Karol Brzezinski proposed the following answer:
Hi Leonard,

Try this (please note that I am using python 3, so the call pf print function 
is modified):
##
### 2D MWE #
from __future__ import division
from yade import pack, plot, export, ymport

num_spheres=1000

rate=-0.01
damp=0.6
stabilityThreshold=0.001
young=5e6
confinement=6.7e3

mn,mx=Vector3(0,0,0.02),Vector3(1,2,0.02)

O.materials.append(FrictMat(young=young, poisson=0.5, 
frictionAngle=radians(30), density=2600, label='spheres'))
O.materials.append(FrictMat(young=young, poisson=0.5, frictionAngle=0, 
density=0, label='walls'))
walls=aabbWalls([Vector3(0,0,0),Vector3(1,2,0.04)],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

sp=pack.SpherePack()
sp.makeCloud(mn,mx,-1,0.,num_spheres,False, 0.75,seed=1)

O.bodies.append([sphere(center,rad,material='spheres') for center,rad in
sp])

Gl1_Sphere.quality=3

for b in O.bodies:
if isinstance(b.shape,Sphere):
b.state.blockedDOFs='zXY'
b.shape.color=[1,1,1]

triax=TriaxialStressController(
thickness = 0,
stressMask = 7,
internalCompaction=False,
)

newton=NewtonIntegrator(damping=damp)

O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb()]),
InteractionLoop([Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()], 
[Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()]),
GlobalStiffnessTimeStepper(active=1, timeStepUpdateInterval=100, 
timestepSafetyCoefficient=0.8),
triax,
newton
]

triax.goal1=triax.goal2=triax.goal3=-confinement

while 1:
  O.run(1000, True)
  unb=unbalancedForce()
  print('unbF:',unb,' meanStress: 
',-triax.meanStress,'top:',-triax.stress(triax.wall_top_id)[1],'left:',-triax.stress(triax.wall_left_id)[0],'front:',-triax.stress(triax.wall_front_id)[2])
  if unbhttps://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.00033237549181911),
(0.000425451497911189, 

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

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

Description changed to:
Hello.

Can you please provide any information how to implement undrained condition 
with flow engine? When I change boundary condition in example script 
(oedometric.py) and put fluidBulkModulus=0.1  (compressible scheme) I 
cannot achive undrained behavior. 
Kind regards, Fedor

-- 
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-05-24 Thread Fedor
Question #706740 on Yade changed:
https://answers.launchpad.net/yade/+question/706740

Description changed to:
Hello.

Can you please provide any information how to implement undrained condition 
with flow engine? When I change boundary condition in example script 
(oedometric.py) and put fluidBulkModulus=0.1  (compressible scheme) I 
cannot achieve undrained behavior. 
Kind regards, Fedor

-- 
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 #706779]: Wall disappearing

2023-05-24 Thread Jan Stránský
Question #706779 on Yade changed:
https://answers.launchpad.net/yade/+question/706779

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

If I set non-zero O.dt, the walls remain.

> although the walls are added to simulation before the definition of
material labeled as 'cube', however when the script is run, their
material type is shown as 'cube'. here is the MWE:

The MWE shows nothing about materials..
If I check in console or the script
for b in O.bodies: print(b.mat.label)
I get 6x "wall" and 8x "cube"

> the second strange thing

please open separate problem for separate question ([1], point 5)

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

-- 
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 #706779]: Wall disappearing

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

mohsen posted a new comment:
Another thing that happen and may help to solve the problem, is that if
the stressMask changed, for example to 4 (loading along z axis), just
the walls with the normal vector parallel to z (bodies 4 and 5)
disappear.

-- 
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 #706779]: Wall disappearing

2023-05-24 Thread mohsen
New question #706779 on Yade:
https://answers.launchpad.net/yade/+question/706779

In the name of God
Hi every one!
I encountered an strange problem. when i add some spheres bonded to each other 
using CohFrictMat in a triaxial box, by the first step the walls disappeared. 
what is wrong?
the second strange thing is that although the walls are added to simulation 
before the definition of material labeled as 'cube', however when the script is 
run, their material type is shown as 'cube'. here is the MWE:


from yade import pack

###   DEFINING VARIABLES AND MATERIALS   ###


# The following 5 lines will be used later for batch execution

ConPre=-10
ConPre1=-5000
key='t_20%_25_100' # put you simulation's name here
targetPorosity = 0.38#the porosity we want for the packing
compFricDegree = 30 # initial contact friction during the confining phase (will 
be decreased during the REFD compaction process)
finalFricDegree = 30 # contact friction during the deviatoric loading

young=1e9 # contact stiffness
mn,mx=Vector3(0,0,0),Vector3(.3,.3,.3) # corners of the initial packing
O.materials.append(CohFrictMat(young=1e9,poisson=0.2,density=1500,isCohesive=False,frictionAngle=0,label='walls'))

## create walls around the packing
walls=aabbWalls([mn,mx],thickness=0)
wallIds=O.bodies.append(walls)


## create materials for spheres and plates
O.materials.append(CohFrictMat(young=1e6,poisson=0.48,density=1500,label='cube',frictionAngle=radians(compFricDegree),
isCohesive=True,
normalCohesion=5000,
shearCohesion=5000,
momentRotationLaw=True
))

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(.3,.3,.3),rMean=.05,distributeMass=False,seed=1)


#
###   DEFINING ENGINES   ###


triax=TriaxialStressController(
maxMultiplier=1.+2e4/young, # spheres growing factor (fast growth)
finalMaxMultiplier=1.+2e3/young, # spheres growing factor (slow growth)
thickness = 0,
stressMask = 7,
internalCompaction=False, # If true the confining pressure is generated by 
growing particles
)

newton=NewtonIntegrator(damping=.1)

O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor=1.12),Ig2_Box_Sphere_ScGeom6D()],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(
setCohesionNow=True,
setCohesionOnNewContacts=False,
)],

[Law2_ScGeom6D_CohFrictPhys_CohesionMoment(),Law2_ScGeom_FrictPhys_CundallStrack()]
),
triax,
newton,
]

triax.goal1=triax.goal2=ConPre1
triax.goal3=ConPre1
O.dt=0
yade.qt.Controller()

for x in [.1,.2]:
for y in [.1,.2]:
for z in [.1,.2]:
s = utils.sphere((x,y,z),.08,material='cube')
O.bodies.append(s)

###By adding the following lines to the terminal, the walls disppeared

#O.step()


-- 
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 #706774]: Gradation curve of assembly made of clumps

2023-05-24 Thread Ruidong LI
Question #706774 on Yade changed:
https://answers.launchpad.net/yade/+question/706774

Status: Answered => Solved

Ruidong LI confirmed that the question is solved:
Thank you so much. That solved my problem.

-- 
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 #706774]: Gradation curve of assembly made of clumps

2023-05-24 Thread Jan Stránský
Question #706774 on Yade changed:
https://answers.launchpad.net/yade/+question/706774

Status: Open => Answered

Jan Stránský proposed the following answer:
> what I need is the calculation of the gradation curve in general

In general it is same as you would do it experimentally.
For a set of defined "passing" sizes, you count particles smaller than that 
size.
See implementation of psd function [2]

> And I don't know how to calculate the size of a clump. More specially,
I don't know which length can represent the size of the clump and be
used for gradation calculation. The length of the longest axis?

Depends on your definition.
Calculation then should not be too difficult.

Longest axis is one choice.
For real sieve analysis, probably the longest size is not the most important, 
as it would pass "perpendicularly" to the longest axis? So maybe the second 
longest principal axes? Or longest dimension perpendicular to the longest axis? 
I don't know..
There are more options.

> I have shared some STL files for your reference

Please see [1], section "Please, no external links!".
An artificial simple example should be enough.

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask
[2] https://gitlab.com/yade-dev/trunk/-/blob/master/py/utils.py#L1089

-- 
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 #706485]: Consolidation of Peat Soil Using Discrete Element Method

2023-05-24 Thread Launchpad Janitor
Question #706485 on Yade changed:
https://answers.launchpad.net/yade/+question/706485

Status: Needs information => Expired

Launchpad Janitor expired the question:
This question was expired because it remained in the 'Needs information'
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 #706774]: Gradation curve of assembly made of clumps

2023-05-24 Thread Ruidong LI
Question #706774 on Yade changed:
https://answers.launchpad.net/yade/+question/706774

Status: Needs information => Open

Ruidong LI gave more information on the question:
Hello, Jan.

Actually,  what I need is the calculation of the gradation curve in
general. I have an assembly of clumps generated based on imported stl
files. And I would like to obtain the gradation curve of the assembly. I
am new to the numerical simulation. And I don't know how to calculate
the size of a clump. More specially, I don't know which length can
represent the size of the clump and be used for gradation calculation.
The length of the longest axis?  I have shared some STL files for your
reference [1].

Looking forward to your reply. Many thanks.

Ruidong

[1]https://drive.google.com/file/d/1W2P2W0uxf4ktOTbc7lNxdJojZlntXWxO/view?usp=sharing

-- 
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 #706774]: Gradation curve of assembly made of clumps

2023-05-24 Thread Jan Stránský
Question #706774 on Yade changed:
https://answers.launchpad.net/yade/+question/706774

Status: Open => Needs information

Jan Stránský requested more information:
Hello,

please provide a MWE [1]. A few simple clumps and expected result.

Please also state where the actual problem is.
Calculation of gradation curve in general?
Treating of clumps?
...?

Cheers
Jan

[1] https://www.yade-dem.org/wiki/Howtoask

-- 
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 #706766]: How to get Micro-strain field from a 2D simulation in YADE

2023-05-24 Thread Karol Brzezinski
Question #706766 on Yade changed:
https://answers.launchpad.net/yade/+question/706766

Status: Open => Answered

Karol Brzezinski proposed the following answer:
Hi Leonard,

The algorithm in Yade builds a 3D tesselation. It is hard for the
algorithm to build it if all the particles lie on the same plane. Maybe
you could add some 'thickness' to your simulation by creating three
identical sets of particles on three parallel planes.

Of course, it is not efficient to do the simulation this way. But you
can store the information about your particles ("one layer") in separate
files during simulation [1]. After this, you could prepare another
script just for loading the particles into the simulation at certain
positions. However, in the second script, you can load the previously
stored 'layer' three times (two times with shifted position, using the
shift option [2]). That way, you will have some "thickness" of the
sample.

Cheers,
Karol

[1] https://yade-dem.org/doc/yade.export.html?highlight=export#yade.export.text
[2] 
https://yade-dem.org/doc/yade.ymport.html?highlight=ymport#module-yade.ymport

-- 
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 #706774]: Gradation curve of assembly made of clumps

2023-05-24 Thread Ruidong LI
New question #706774 on Yade:
https://answers.launchpad.net/yade/+question/706774

Hello! I would like to know how to calculate the gradation curve of an assembly 
consisting of clumps. Many 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 #706766]: How to get Micro-strain field from a 2D simulation in YADE

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

Status: Answered => Open

Leonard is still having a problem:
Hi Karol,

Thank you for your reply.

Could you please give more hints? Sorry that I didn't get the answer.

Thanks
Leonard

-- 
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 #706768]: Difference between CundallStrack and HertzMindlin

2023-05-24 Thread Jan Stránský
Question #706768 on Yade changed:
https://answers.launchpad.net/yade/+question/706768

Jan Stránský posted a new comment:
Also, in Cundall-Strack model and Hertz-Mindlin law the meaning of 'young' is 
different, so you naturally get different results.
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 #706765]: Batch file question

2023-05-24 Thread Jan Stránský
Question #706765 on Yade changed:
https://answers.launchpad.net/yade/+question/706765

Status: Open => Answered

Jan Stránský proposed the following answer:
> readParamsFromTable(rMean=rMean, rRelFuzz=rRelFuzz,num=num, maxLoad=1e3, 
> minLoad=1e2)
> NameError: name 'rMean' is not defined

Please provide a complete script.
But as the error says, rMean is not defined. I.e. the variable rMean is first 
used at this line, but there is nothing about it before in the script.
I guess similar situation would be with rRelFuzz and num.

You have to either use a literal value:
###
readParamsFromTable(rMean=123,...)
###

or use defined variable, e.g.:
###
rMean = 123
readParamsFromTable(rMean=rMean,...)
from yade.params.table import *
###
but then rMean value is that from readParamsFromTable and the first line does 
not make sense.. e.g.
###
rMean = 123
readParamsFromTable(rMean=234,...)
from yade.params.table import *
print(rMean) # 234
###

The way I used to use it is:
###
readParamsFromTable(
# default values
rMean = 123,
...
)
from yade.params.table import *
###
now you can use rMean variable (imported from yade.params.table) which is 
either the value given from table in batch run or the specified default value 
in case of plain yade run or if the value in table is not given.

> If I understand correctly, I assume that since I print the value in
the stopUnloading part if it run properly it would print the porosity
into the log files

Yes

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