Re: [Yade-users] [Question #707025]: Need Help Installing Coupled Calculation Program (Yade and OOFEM) on Ubuntu

2023-06-23 Thread Xue
Question #707025 on Yade changed:
https://answers.launchpad.net/yade/+question/707025

Status: Needs information => Open

Xue gave more information on the question:
Hello Jan,

After installing the coupling program on my Ubuntu 18.04 system, I
encountered the following error (as mentioned in
https://answers.launchpad.net/yade/+question/707018), which seems to be
related to the configuration of Yade2019. In this post,I would like to
inquire if someone would be willing to share a pre-configured image of
the system, so that future users can avoid potential similar troubles.

Regarding your question - how did you try to install it?

Apart from attempting to install it by typing "make all" in the
installation folder on the Ubuntu 18.04 system, I also tried the same
method on Ubuntu 22.04 system, but now I'm getting the error:

"Could NOT find PythonLibs (missing: PYTHON_LIBRARIES
PYTHON_INCLUDE_DIRS) (Required is at least version '2.7')."

This seems to be caused by the presence of both Python 2 and Python 3 in
the system (on the Ubuntu 18.04 system where the coupling program was
successfully installed, I removed Python 3 to resolve the aforementioned
issue, but it caused inconvenience for using later on).

Can you please guide me on how to resolve this issue?

Best regards,
xue

-- 
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 #707018]: libyade.so: undefined symbol

2023-06-23 Thread Xue
Question #707018 on Yade changed:
https://answers.launchpad.net/yade/+question/707018

Status: Needs information => Open

Xue gave more information on the question:
Hello Jan,

The issue I'm facing here is that I'm unable to open the Yade2019
software installed through the demfemcouplingmaster folder on Ubuntu
18.04. It seems to be more related to the configuration of Yade itself.

However, the other issue mentioned in the link you provided is mainly
about whether someone would be willing to share a pre-configured image
of the system. Such sharing would save considerable time and effort for
others who encounter similar installation challenges.

I sincerely appreciate your kind assistance.

xue

-- 
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 #707088]: Dynamic Compaction Can't Repeat

2023-06-23 Thread Huan
New question #707088 on Yade:
https://answers.launchpad.net/yade/+question/707088

Hi,

I'm trying to create a simulation that would have large spherical ball drop and 
hit the clump plate repeatedly 100 times. and calculate the average z and mass 
every time. Also, use export.text to get position of the packing every 10th 
time. However, the calculation would calculated every time the large ball drop 
instead of calculating in after it hit the plate.
-This
 is my 
code
import random
import math
from yade import geom, pack, utils, plot, ymport, export
import numpy as np

# Define cylinder parameters
diameter = 0.102
height = 0.18
center = (0, 0, height/2)

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

# add sphere packing
O.bodies.append(ymport.textExt('packing8.txt',format='x_y_z_r'))

# materials Properties
gravel = CohFrictMat(young = 1e7, poisson = 0.25, density = 2700, label = 
'gravel')
asphalt_binder = CohFrictMat(young = 1e7, poisson = 0.25, density = 1060, 
frictionAngle = radians(40),  normalCohesion = 5e4, shearCohesion = 5e4, label 
= 'asphalt_binder')
weight = CohFrictMat(young = 1e7, poisson = 0.25, density = 11450,frictionAngle 
= radians(0), label = 'weight')

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

# give color and properties to shpere
for body in O.bodies:
   if not isinstance(body.shape, Sphere): 
   continue
   if body.shape.radius == 0.01575/2 :
   body.shape.color = (0,0,1) #blue
   body.material = gravel
   if body.shape.radius == 0.011/2:
   body.shape.color = (1,0,0) #red
   body.material = gravel
   if body.shape.radius == 0.007125/2:
   body.shape.color = (0,1,0) #green
   body.material = gravel
   if body.shape.radius == 0.003555/2:
   body.shape.color = (1,1,0) #yellow
   body.material = gravel
   if body.shape.radius == 0.00160/2 :
   body.shape.color = (1,0,1) #magenta
   body.material = gravel
   if body.shape.radius == 0.0008/2 :
   body.shape.color = (0,0,0) #black
   body.material = asphalt_binder

# add clump plate
clump_bodies = ymport.textExt('clump8.txt',format='x_y_z_r')

# plate properties
clump_plate = CohFrictMat(density = 7500, label = 'clump_plate')

# add properties
O.materials.append(clump_plate)

# define layer
total_clump_bodies = len(clump_bodies)
bodies_per_layer = total_clump_bodies / 8

for i, clump_body in enumerate(clump_bodies):
layer_number = i // bodies_per_layer  # Calculate the layer number for the 
clump body

if layer_number % 2 == 0:
color = (1, 0, 0)  # red for even-numbered layers
else:
color = (1, 1, 1)  # white for odd-numbered layers

clump_body.shape.color = color
clump_body.material = clump_plate

O.bodies.appendClumped(clump_bodies)

# z-coordinate for clump
clump_z = np.mean([clump_body.state.pos[2] for clump_body in clump_bodies])  # 
clump (center of mass) z-coordinate

# create large ball
O.bodies.append(sphere((0, 0, clump_z + 0.25), 0.1/2))

# give color and properties to shpere
for body in O.bodies:
   if not isinstance(body.shape, Sphere): 
   continue
   if body.shape.radius == 0.10/2 :
   body.shape.color = (0.5,0.5,0.5) #grey
   body.material = weight

# define original condition
x = 0
y = 0
window = 0.01575/2

def calculate_zmax(x, y, window):
zmax = float('-inf')  # Initialize zmax to negative infinity

# Define the square region
x_min = x - window
x_max = x + window
y_min = y - window
y_max = y + window

# Iterate over all bodies in the simulation
for body in O.bodies:
if isinstance(body.shape, Sphere) and (body.material == gravel or 
body.material == asphalt_binder or body.material == weight):
sphere_x, sphere_y, sphere_z = body.state.pos  # Get the position 
of the sphere
sphere_radius = body.shape.radius

# Check if the sphere is within the square region
if x_min <= sphere_x <= x_max and y_min <= sphere_y <= y_max:
z = sphere_z + sphere_radius  # Calculate the z-coordinate of 
the top of the sphere

# Update zmax if the current z-coordinate is higher
if z > zmax:
zmax = z 

return zmax

def hundredblows():
# Perform 100 blows of the large ball

for blow_number in range(100):
# Perform the blow
O.run()  # Adjust the number of iterations as needed

# Calculate clump_z
clump_z = np.mean([clump_body.state.pos[2] for clump_body in 
clump_bodies])  # clump (center of mass) z-coordinate

# 

[Yade-users] [Question #707087]: Influence of the parameters of material

2023-06-23 Thread Horation
New question #707087 on Yade:
https://answers.launchpad.net/yade/+question/707087

I was conducting a triaxial test on the argillite, which contained a matrix and 
two inclusions, to investigate its small strain stiffness. I tried to use 
spherical grains and JCF model to simulate this kind of rock. And I seperated 
the particle into three groups and assigned them different material properties 
(Young's modulous and Poisson's ratio). But the results were not desired. 
Because the small strain stiffness of the sample is almost equivalent to the 
sample containg only one material, which is confusing. Theoretically, the 
change of materials in the sample will affect the properties of the rock. How 
can I realize this goal? Could you give me some advice?

from yade import ymport, utils , plot

O.load('isocompact200kpa2.yade.bz2')
O.engines[6].dead=True
# ENGINES ARE DEFINED HERE
try:
os.mkdir('post')
except:
pass

PACKING='121_1k.spheres'
OUT=PACKING+'_1MPa_r0.02'
iterMax=5 # maximum number of iterations
saveVTK=iterMax/5 # Vtk files record interval

YOUNG2=100e9
YOUNG3=50e9
ALPHA2=0.06
ALPHA3=0.27

bodies2=[b for b in O.bodies if 5.0 0.001 and e22 < 0.05:
# O.save('save'+'{:.4f}'.format(e22)+'yade.bz2')
# ini_e22a = e22

#if (e22 - ini_e22b) > 0.5:
print ('unbalanced force: %f, mean stress: %f, s11: %f, s22: %f, s33: %f, 
coordination number: %f, porosity: %f' 
%(unb,mStress,-triax.stress(triax.wall_right_id)[0],-triax.stress(triax.wall_top_id)[1],-triax.stress(triax.wall_front_id)[2],avgNumInteractions(),Porosity))
#Output()
#ini_e22b = e22
plot.saveDataTxt('loadinglog3.txt.bz2')

plot.plots={'e22':('s22',None,'ev')}
plot.plot()
#O.run(iterMax)

-- 
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 #707069]: How to determine if a cohesive link is broken (Law2_ScGeom6D_CohFrictPhys_CohesionMoment)

2023-06-23 Thread Leonard
Question #707069 on Yade changed:
https://answers.launchpad.net/yade/+question/707069

Status: Answered => Solved

Leonard confirmed that the question is solved:
Thanks Robert Caulk, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp