Re: [Yade-users] [Question #708388]: Axis rotation

2023-11-07 Thread Przemek
Question #708388 on Yade changed:
https://answers.launchpad.net/yade/+question/708388

Przemek posted a new comment:
Ok :)

-- 
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 #708388]: Axis rotation

2023-11-07 Thread Przemek
New question #708388 on Yade:
https://answers.launchpad.net/yade/+question/708388

Hi,
I want use in my code angles which describes rotation of axis to create new 
constitutive law. Could anybody provide me information how I can do it in 
simplest way?

Regards,
Przemek

-- 
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 #707869]: Problem with Cohesive Frictional Contact law

2023-09-08 Thread Przemek
Question #707869 on Yade changed:
https://answers.launchpad.net/yade/+question/707869

Przemek posted a new comment:
I wondered if I can use this model to simulate fracture... Maybe you can
suggest a beter model?

-- 
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 #707869]: Problem with Cohesive Frictional Contact law

2023-09-08 Thread Przemek
Question #707869 on Yade changed:
https://answers.launchpad.net/yade/+question/707869

Przemek posted a new comment:
So, I can't use this model here, yes? I don't see appropriate law in the
CFC code...

-- 
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 #707869]: Problem with Cohesive Frictional Contact law

2023-09-08 Thread Przemek
New question #707869 on Yade:
https://answers.launchpad.net/yade/+question/707869

Hi, 
I've problem with Cohesive Frictional Contact  law. I'm trying to run a 
simulation but I receive:

 InteractionLoop:178 virtual void yade::InteractionLoop::action(): 
None of given Law2 functors can handle interaction #23+24, types geom:ScGeom=1 
and phys:CohFrictPhys=6 (LawDispatcher::getFunctor2D returned empty functor)

Does the problem with my script or with something else?

#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function

import math

from future import standard_library

standard_library.install_aliases()
from yade import plot, pack, timing, qt, export
import time, sys, os, copy
import numpy as np
import gts


# default parameters or from table
readParamsFromTable(
noTableOk=True,  # unknownOk=True,
young=70e9,
poisson=0.3,
density=2700,
frictionAngle=radians(30),
normalCohesion=300e6,
shearCohesion=300e6/sqrt(3),
intRadius=1.5,
damping=.4,

sphereRadius=1e-3,
length=100e-3,
width=50e-3,
thickness=4e-3
)

from yade.params.table import *

if 'description' in list(O.tags.keys()): O.tags['id'] = O.tags['id'] + 
O.tags['description']

aluminiumId = O.materials.append(
CohFrictMat(
young=young,
poisson=poisson,
density=density,
frictionAngle=frictionAngle,
normalCohesion=normalCohesion,
shearCohesion=shearCohesion,
momentRotationLaw=True
)
)

r = sphereRadius
partI=pack.inAlignedBox((0, 0, -thickness/2-r/2), (width+r, length, 
thickness/2+r/2))
partII=pack.inAlignedBox((width, 0, -thickness/2-r/2), (length+r, width, 
thickness/2+r/2))
sample = partI|partII
O.bodies.append(pack.regularHexa(sample,radius=r,gap=0.))

load = []

for b in O.bodies:
for b in O.bodies:
if b.state.pos[1] > (length-3*r):  # support
b.state.blockedDOFs = 'xyzXYZ'
b.shape.color = (0, 1, 1)
elif b.state.pos[0] > (length-2*r):  # load
load.append(b.id)
b.state.blockedDOFs = 'z'
b.shape.color = (0, 1, 1)
else:
b.shape.color = (0, 0, 1)
b.state.blockedDOFs = 'z'

O.dt = PWaveTimeStep()*1e-1


O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius)]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius)],
[Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True, 
setCohesionOnNewContacts=True)],
[Law2_ScGeom6D_CohFrictPhys_CohesionMoment()],
),
NewtonIntegrator(damping=damping),
PyRunner(iterPeriod=1, command='updateParameters()'),
PyRunner(command='addPlotData()', iterPeriod=1),
#PyRunner(iterPeriod=100, command='recordVTK()')
]

O.step()
print(len(O.interactions))

def updateParameters():
for i in range(len(load)):
O.bodies[load[i]].state.vel = Vector3(-100e0, 0, 0)

def addPlotData():
for b in O.bodies:
b.shape.color = scalarOnColorScale(b.state.stress[0, 0], -300e6, 300e6)


def recordVTK():
txtfilename = 'L_shape/L_test' + str(O.iter) + '.txt'
vtkfilename = 'L_shape/L_test' + str(O.iter) + '.vtk'
export.textExt(txtfilename, format='x_y_z_r_attrs', 
attrs=['b.state.oldTemp',
   
'b.state.stress[0,0]','b.state.stress[0,1]','b.state.stress[0,2]',
   
'b.state.stress[1,1]','b.state.stress[1,2]','b.state.stress[2,2]','O.time'],
   comment='temperature, S_11, S_12, S_13, S_22, S_23, S_33, 
Time')
export.text2vtk(txtfilename, vtkfilename)


qt.View()
#plot.plots={'eps':('sigma')}
#plot.plot()
#O.run()

Kind regards,
Przemek

-- 
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 #706106]: Load the data to plot

2023-04-10 Thread Przemek
Question #706106 on Yade changed:
https://answers.launchpad.net/yade/+question/706106

Przemek posted a new comment:
Hi,

Thank you both. Now I get how to do that.

BR
Przemek

-- 
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 #706106]: Load the data to plot

2023-04-09 Thread Przemek
Question #706106 on Yade changed:
https://answers.launchpad.net/yade/+question/706106

Przemek posted a new comment:
Hi,

I'm sorry for my incomprehensible question. Let me explain.

I generated data for analytical solution which I want to compare with
DEM result simultaneously to proceeded simulation, e.g.

i1 - data from txt file
t1 - data from txt file
t2 - data from simulation

plot.plots={'i1':('t1, t2')}

BR
Przemek

-- 
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 #706106]: Load the data to plot

2023-04-06 Thread Przemek
New question #706106 on Yade:
https://answers.launchpad.net/yade/+question/706106

Hi,

I have a question about plotting the results from file. I generated some data 
and now I want to load them to compare with DEM simulation in real time. How I 
can do that?

BR
Przemek 

-- 
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 #700192]: Autosave

2022-01-13 Thread Przemek
Question #700192 on Yade changed:
https://answers.launchpad.net/yade/+question/700192

Przemek posted a new comment:
Hi,
I checked the data right after loading it. Right, the position of all the 
bodies is correct. But it is a problem because after the first iteration,  
bodies that has been in contact with the plane, probably loses this information 
about interactions and passes through it.
I will check it for the case with smaller number of particles.

BR
Przemek

-- 
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 #700192]: Autosave

2022-01-12 Thread Przemek
Question #700192 on Yade changed:
https://answers.launchpad.net/yade/+question/700192

Przemek posted a new comment:
Hello,
thanks for the hint. 
I checked it and it works to some extent for me. In the plane compression 
simulation, after loading the simulation, a number of spheres are above the 
plane. 
What was not in the simulation before shutdown and save.

I wonder if this is a c ++ or python writing problem.

BR
Przemek

-- 
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 #700192]: Autosave

2022-01-12 Thread Przemek
New question #700192 on Yade:
https://answers.launchpad.net/yade/+question/700192

Hi,
I have a question. Is there a way to add autosave functionality to the 
simulation? It will be helpful in the event, eg. a power failure. And how to 
load this simulations later?
There is an example [1] but it relates to a slightly different situation. Where 
the entry is at the end of the section calculation.
Any ideas? :)
Thanks!

Przemek

[1] 
https://gitlab.com/yade-dev/trunk/blob/master/examples/simple-scene/save-then-reload.py

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

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


Re: [Yade-users] [Question #699796]: Delete interaction

2021-12-10 Thread Przemek
Question #699796 on Yade changed:
https://answers.launchpad.net/yade/+question/699796

Status: Answered => Solved

Przemek confirmed that the question is solved:
It is solved! :)

-- 
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 #699796]: Delete interaction

2021-12-10 Thread Przemek
Question #699796 on Yade changed:
https://answers.launchpad.net/yade/+question/699796

Przemek posted a new comment:
Hi there,

I added this section which returns "false" and now it works. Thanks for
your help!

BR
Przemek

-- 
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 #699796]: Delete interaction

2021-12-09 Thread Przemek
Question #699796 on Yade changed:
https://answers.launchpad.net/yade/+question/699796

Przemek posted a new comment:
Hi Jan,

thanks for the hint. Already found the mistake I made when modifying the Cpm 
model.
Karol, thank you for your help, too.

BR
Przemek

-- 
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 #699796]: Delete interaction

2021-12-09 Thread Przemek
Question #699796 on Yade changed:
https://answers.launchpad.net/yade/+question/699796

Przemek posted a new comment:
Hi Karol,

Yes, but that is in Python. I need it in C++, because I want to
implement it in my Law code :)

BR
Przemek

-- 
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 #699796]: Delete interaction

2021-12-08 Thread Przemek
New question #699796 on Yade:
https://answers.launchpad.net/yade/+question/699796

Hi there, 
I have a question about deleting the interaction. Maybe it is a trivial 
question but I can't find the answer to it. I want to implement it in my 
constitutive law.
Simple example. A surface (box or facet) contacts with the sphere and compress 
it. After that surface moves back, so the normal stress equals zero at a 
crucial point. But I still have an interaction between these bodies. How to 
delete it?
My code is based on CpmPhys.

BR
Przemek

-- 
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 #699075]: Error after launching the program

2021-10-13 Thread Przemek
Question #699075 on Yade changed:
https://answers.launchpad.net/yade/+question/699075

Status: Needs information => Solved

Przemek confirmed that the question is solved:
It works.

-- 
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 #699075]: Error after launching the program

2021-10-13 Thread Przemek
Question #699075 on Yade changed:
https://answers.launchpad.net/yade/+question/699075

Przemek posted a new comment:
Hi Karol,

I don't load saved simulation. I started new one.
But like Jan suggested, I make fresh cmake and now it works.
Thanks!

Przemek

-- 
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 #699075]: Error after launching the program

2021-10-13 Thread Przemek
Question #699075 on Yade changed:
https://answers.launchpad.net/yade/+question/699075

Przemek posted a new comment:
Ok, I will do it.

> Could you share them?

Ofcourse, but currently I'm working on them. So maybe it will be better
to share them after validation and verification :)

-- 
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 #699075]: Error after launching the program

2021-10-13 Thread Przemek
Question #699075 on Yade changed:
https://answers.launchpad.net/yade/+question/699075

Przemek posted a new comment:
Hi,

it is compiled Yade (if you remember I'm trying to use DEM in my thesis
:) )

Right now I can't start yade alone. It's wierd...

I'm working only on my files with new laws. But earlier it worked
correctly, and now... error.

> These errors comes from wrongly linked executable after compilation,
meaning that the program requires Gl1_CpmPhys, but it does not know what
it is (it was compiled, but not linked correctly).

But where I should change the path. I don't change any headers before
the last compiling.

BR
Przemek

-- 
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 #699075]: Error after launching the program

2021-10-13 Thread Przemek
New question #699075 on Yade:
https://answers.launchpad.net/yade/+question/699075

Hi,

I have a problem with some kind of error after launching the simulation.

Welcome to Yade 2021-04-06.git-54b855f 
Using python version: 3.8.10 (default, Sep 28 2021, 16:10:42) 
[GCC 9.3.0]
Traceback (most recent call last):
  File "/home/przemek/DEMlab/install/bin/yade", line 151, in 
import yade
  File 
"/home/przemek/DEMlab/install/lib/x86_64-linux-gnu/yade-2021-04-06.git-54b855f/py/yade/__init__.py",
 line 75, in 
from yade import boot
ImportError: 
/home/przemek/DEMlab/install/lib/x86_64-linux-gnu/yade-2021-04-06.git-54b855f/libdem.so:
 undefined symbol: _ZTVN4yade11Gl1_CpmPhysE

I don't know why it appear, because earlier it worked.
Do you have any suggestions?

BR
Przemek

-- 
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 #698253]: Access to body material properties

2021-08-26 Thread Przemek
Question #698253 on Yade changed:
https://answers.launchpad.net/yade/+question/698253

Przemek posted a new comment:
Hi,

sorry for my late reply but I was on holiday :)

Ye, you have absolutely right. I will make this separate engine but
maybe after the defense of my thesis :)

Thanks for your help and explanations!

BR
Przemek

-- 
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 #698253]: Access to body material properties

2021-08-12 Thread Przemek
Question #698253 on Yade changed:
https://answers.launchpad.net/yade/+question/698253

Przemek posted a new comment:
-> Does your new computation directly influences the integration - position and 
velocity update?
If no, then (in the case of "clean" code) NewtonIntegrator is a bad place for 
such code.

It is a good question because it doesn't affect those values yet. But in
the future, I want to add the thermal expansion effect, so it could
change the particle position due to the change of radius.

Thanks for help :)

BR
Przemek

-- 
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 #698253]: Access to body material properties

2021-08-11 Thread Przemek
Question #698253 on Yade changed:
https://answers.launchpad.net/yade/+question/698253

Przemek posted a new comment:
Yes, I'm developing a thermal model in Yade. Regarding the integration, I want 
to sum all of the temperature increments which are derived from the 
interactions between spheres. Because I began my journey with Yade I used 
NewtonIntegrator to do this. 
I want to write my thesis as soon as possible, so maybe I do "the cleaning" 
after that :)
Thank you for your comments. Can we stay in touch? 

BR
Przemek

-- 
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 #698253]: Access to body material properties

2021-08-11 Thread Przemek
Question #698253 on Yade changed:
https://answers.launchpad.net/yade/+question/698253

Przemek posted a new comment:
Hi,

yes, I included it. What do you mean by "more natural" refactoring?
Recently I'll use this code in my thesis, but I also want to share it with 
others.

BR
Przemek

-- 
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 #698253]: Access to body material properties

2021-08-10 Thread Przemek
Question #698253 on Yade changed:
https://answers.launchpad.net/yade/+question/698253

Przemek posted a new comment:
Hi,

I solved the problem. Thanks!

BR
Przemek

-- 
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 #698253]: Access to body material properties

2021-08-09 Thread Przemek
Question #698253 on Yade changed:
https://answers.launchpad.net/yade/+question/698253

Przemek posted a new comment:
Hi Jan,

thank you for reply. I modified code:

State*state = b->state.get();
CpmMat* mat = dynamic_cast(b->material.get());
const Body::id_t& id= b->getId();
Vector3r  f = Vector3r::Zero();
Vector3r  m = Vector3r::Zero();
state->oldTemp = state->temp;
state->Cp = mat->CP1 + mat->CP2 * state->oldTemp + mat->CP3 * 
pow(state->oldTemp,2);
state->k = mat->K1 + mat->K2 * state->oldTemp + mat->K3 * 
pow(state->oldTemp, 2) + mat->K4 * pow(state->oldTemp, 3);

But now I get those messages:

/home/przemek/DEMlab/trunk/pkg/dem/NewtonIntegrator.cpp: In member function 
‘virtual void yade::NewtonIntegrator::action()’:
/home/przemek/DEMlab/trunk/pkg/dem/NewtonIntegrator.cpp:181:3: error: ‘CpmPhys’ 
was not declared in this scope; did you mean ‘IPhys’?
  181 |   CpmPhys* mat = dynamic_cast(b->material.get());
  |   ^~~
  |   IPhys
/home/przemek/DEMlab/trunk/pkg/dem/NewtonIntegrator.cpp:181:12: error: ‘mat’ 
was not declared in this scope; did you mean ‘math’?
  181 |   CpmPhys* mat = dynamic_cast(b->material.get());
  |^~~
  |math
/home/przemek/DEMlab/trunk/pkg/dem/NewtonIntegrator.cpp:181:31: error: 
‘CpmPhys’ does not name a type; did you mean ‘IPhys’?
  181 |   CpmPhys* mat = dynamic_cast(b->material.get());
  |       ^~~
  |   IPhys
/home/przemek/DEMlab/trunk/pkg/dem/NewtonIntegrator.cpp:181:38: error: expected 
‘>’ before ‘*’ token
  181 |   CpmPhys* mat = dynamic_cast(b->material.get());
  |  ^
/home/przemek/DEMlab/trunk/pkg/dem/NewtonIntegrator.cpp:181:38: error: expected 
‘(’ before ‘*’ token
  181 |   CpmPhys* mat = dynamic_cast(b->material.get());
  |      ^
  |  (
/home/przemek/DEMlab/trunk/pkg/dem/NewtonIntegrator.cpp:181:39: error: expected 
primary-expression before ‘>’ token
  181 |   CpmPhys* mat = dynamic_cast(b->material.get());
  |   ^
/home/przemek/DEMlab/trunk/pkg/dem/NewtonIntegrator.cpp:181:59: error: expected 
‘)’ before ‘;’ token
  181 |   CpmPhys* mat = dynamic_cast(b->material.get());
  |   ^
  |   )
make[2]: *** [CMakeFiles/dem.dir/build.make:583: 
CMakeFiles/dem.dir/pkg/dem/NewtonIntegrator.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:247: CMakeFiles/dem.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

How to declare the CpmMat in NewtonIntegrator?

BR
Przemek

-- 
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 #698253]: Access to body material properties

2021-08-06 Thread Przemek
Question #698253 on Yade changed:
https://answers.launchpad.net/yade/+question/698253

Przemek posted a new comment:
I modified my code and I removed showed lines from .cpp file. I add them
to a NewtonIntegrator.cpp file

State*state = b->state.get();
//Material* mat   = b->material.get();
const Body::id_t& id= b->getId();
Vector3r  f = Vector3r::Zero();
Vector3r  m = Vector3r::Zero();
state->oldTemp = state->temp;
b->material->CP1
state->Cp = CP1 + scene->CP2 * state->oldTemp + scene->CP3 * 
pow(state->oldTemp,2);
state->k = K1 + K2 * state->oldTemp + K3 * pow(state->oldTemp, 
2) + K4 * pow(state->oldTemp, 3);

But I still have a problem how to get the constants CP1, CP2, etc. to compute 
the heat capacity...
 
BR
Przemek

-- 
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 #698253]: Access to body material properties

2021-08-05 Thread Przemek
New question #698253 on Yade:
https://answers.launchpad.net/yade/+question/698253

Hi,

I have a problem with the access to some properties which are assigned to a 
particle (sphere). Could you help me to solve the problem? Here are segments of 
code.

From .hpp file:

class CpmMat : public FrictMat {
public:
shared_ptr newAssocState() const override { return 
shared_ptr(new CpmState); }
bool  stateTypeOk(State* s) const override { return 
(bool)dynamic_cast(s); }

// clang-format off
YADE_CLASS_BASE_DOC_ATTRS_CTOR(CpmMat,FrictMat,"Concrete material, for 
use with other Cpm classes. \n\n.. 
note::\n\n\t:yref:`Density` is initialized to 4800 
kgm⁻³automatically, which gives approximate 2800 kgm⁻³ on 0.5 density 
packing.\n\nConcrete Particle Model (CPM)\n\n\n:yref:`CpmMat` is particle 
material, :yref:`Ip2_CpmMat_CpmMat_CpmPhys` averages two particles' materials, 
creating :yref:`CpmPhys`, which is then used in interaction resultion by 
:yref:`Law2_ScGeom_CpmPhys_Cpm`. :yref:`CpmState` is associated to 
:yref:`CpmMat` and keeps state defined on particles rather than interactions 
(such as number of completely damaged interactions).\n\nThe model is contained 
in externally defined macro CPM_MATERIAL_MODEL, which features damage in 
tension, plasticity in shear and compression and rate-dependence. For 
commercial reasons, rate-dependence and compression-plasticity is not present 
in reduced version of the model, used when CPM_MATERIAL_MODEL is not defined. 
The full model will be described in detail in my (Václav Šmilauer) thesis along 
with calibration procedures (rigidity, poisson's ratio, compressive/tensile 
strength ratio, fracture energy, behavior under confinement, rate-dependent 
behavior).\n\nEven the public model is useful enough to run simulation on 
concrete samples, such as :ysrc:`uniaxial tension-compression 
test`.",
((Real,sigOld,0.,,"normal stress from previous iteration [Pa]"))
((Real,tauOld,0.,,"shear stress from previous iteration [Pa]"))
((Real,Sy_0,NaN,,"initial yield strength [Pa]"))
((Real,oldSy,0.,,"yield point form previous iteration [Pa]"))
((Real,cumStr,0.,,"cummulative plastic strain [-]"))
((Real,H,0.,,"hardening parameter [Pa]"))
((Real,density,2700.,,"density [kg/m3]"))
((Real,CP1,0.,,"heat capacity constant"))
((Real,CP2,0.,,"heat capacity constant"))
((Real,CP3,0.,,"heat capacity constant"))
((Real,K1,0.,,"thermal conductivity constant"))
((Real,K2,0.,,"thermal conductivity constant"))
((Real,K3,0.,,"thermal conductivity constant"))
((Real,K4,0.,,"thermal conductivity constant")),
createIndex();



And from .cpp file:

FOREACH(shared_ptr B, *scene2->bodies)
{
CpmPhys* mat = dynamic_cast(B->material.get());
const Real&   CP1(mat->CP1);
const Real&   CP2(B->material.CP2);
const Real&   CP3(B->material.CP3);
const Real&   K1(B->material.K1);
const Real&   K2(B->material.K2);
const Real&   K3(B->material.K3);
const Real&   K4(B->material.K4);

if (!B) continue;
const Body::id_t& id = B->getId();
// add damaged contacts that have already been deleted
CpmState* state = dynamic_cast(B->state.get());
if (!state) continue;
state->stress= bodyStats[id].stress;
Sphere* sphere = dynamic_cast(B->shape.get()); // from 
that ok???
if (!sphere) continue;
Real& r   = sphere->radius;
state->stress = bodyStats[id].stress / (4 / 3. * Mathr::PI * r 
* r * r / .62) * .5;
//state->oldTemp = state->temp; // przypisanie wartosci 
temperatury
        state->Cp = CP1 + CP2 * state->temp + CP3 * pow(state->temp,2);
state->k = K1 + K2 * state->temp + K3 * pow(state->temp, 2) + 
K4 * pow(state->temp, 3);
}

And here is the example message form terminal:

/home/przemek/DEMlab/trunk/pkg/dem/ConcretePM.cpp:492:33: error: ‘class 
boost::shared_ptr’ has no member named ‘K2’
  492 |  const Real&   K2(B->material.K2);

Have you any suggestions?

BR
Przemek

-- 
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 #697837]: Problem with CpmStateUpdater

2021-07-04 Thread Przemek
Question #697837 on Yade changed:
https://answers.launchpad.net/yade/+question/697837

Przemek posted a new comment:
Hi,

You have right... I don't lauch this updater in my python code. My fault ;) 
Thanks a lot!

BR
Przemek

-- 
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 #697837]: Problem with CpmStateUpdater

2021-07-04 Thread Przemek
New question #697837 on Yade:
https://answers.launchpad.net/yade/+question/697837

Hi everyone,

I have a problem with CpmStateUpdater. I don't know why, but if I want to get 
the stress tensor (matrix) it is always zero matrix. It looks like, that the 
updater doesn't launch. Did you have that problem before?
Here is a code (with some modifications)...

CREATE_LOGGER(CpmStateUpdater);
//Real CpmStateUpdater::maxOmega=0.;
//Real CpmStateUpdater::avgRelResidual=0.;

void CpmStateUpdater::update(Scene* _scene)
{
// declaration of ‘scene’ shadows a member of ‘yade::CpmStateUpdater’ 
[-Werror=shadow]
Scene*scene2 = _scene ? _scene : 
Omega::instance().getScene().get();
vector bodyStats;
bodyStats.resize(scene2->bodies->size());
//  assert(bodyStats[0].nCohLinks == 0); // should be initialized by dfault 
ctor
//Matrix3r identity= Matrix3r::Identity(); // ??
//  Matrix3r incr;
FOREACH(const shared_ptr& I, *scene2->interactions)
{
if (!I) continue;
if (!I->isReal()) continue;
shared_ptr phys = YADE_PTR_DYN_CAST(I->phys);
if (!phys) continue;
const Body::id_t   id1 = I->getId1(), id2 = I->getId2();
GenericSpheresContact* geom = 
YADE_CAST(I->geom.get());

const Vector3r& n  = geom->normal;
const Real& Fn = phys->Fn;
const Vector3r& Fs = phys->Fs;
LOG_FATAL("Fn: "<refLength<<" ");
//stress[i,j] += 
geom->refLength*(Fn*n[i]*n[j]+0.5*(Fs[i]*n[j]+Fs[j]*n[i]));
//stress += 
geom->refLength*(Fn*outer(n,n)+.5*(outer(Fs,n)+outer(n,Fs)));
Matrix3r stress = phys->refLength * (Fn * n * n.transpose() + 
.5 * (Fs * n.transpose() + n * Fs.transpose()));
//  LOG_FATAL("Stress: "< B, *scene2->bodies)
{
if (!B) continue;
const Body::id_t& id = B->getId();
// add damaged contacts that have already been deleted
CpmState* state = dynamic_cast(B->state.get());
if (!state) continue;
state->stress= bodyStats[id].stress;
Sphere* sphere = dynamic_cast(B->shape.get()); // from 
that ok???
if (!sphere) continue;
Real& r   = sphere->radius;
state->stress = bodyStats[id].stress / (4 / 3. * Mathr::PI * r 
* r * r / .62) * .5;
}
}


#undef YADE_VERIFY
#undef NNAN
#undef NNANV


And from .hpp file:

class CpmStateUpdater : public PeriodicEngine {
struct BodyStats {
Matrix3r stress;
BodyStats()
: stress(Matrix3r::Zero())
{
}
};

public:
virtual void action() override { update(scene); }
void update(Scene* rb = NULL);
// clang-format off
YADE_CLASS_BASE_DOC_ATTRS_CTOR(CpmStateUpdater,PeriodicEngine,"Update 
:yref:`CpmState` of bodies based on state variables in :yref:`CpmPhys` of 
interactions with this bod. In particular, bodies' colors and 
:yref:`CpmState::normDmg` depending on average :yref:`damage` 
of their interactions and number of interactions that were already fully broken 
and have disappeared is updated. This engine contains its own loop (2 loops, 
more precisely) over all bodies and should be run periodically to update colors 
during the simulation, if desired.",
,
        initRun=true;
);
// clang-format on
DECLARE_LOGGER;
};
REGISTER_SERIALIZABLE(CpmStateUpdater);

} // namespace yade

BR
Przemek

-- 
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 #693691]: Sphere-Facets penetrationDepth

2020-10-29 Thread Przemek
Question #693691 on Yade changed:
https://answers.launchpad.net/yade/+question/693691

Status: Answered => Solved

Przemek confirmed that the question is solved:
Thanks Jan Stránský, 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


[Yade-users] [Question #693691]: Sphere-Facets penetrationDepth

2020-10-28 Thread Przemek
New question #693691 on Yade:
https://answers.launchpad.net/yade/+question/693691

Hello,

Can I have a question about the calculation of penetration depth in the case of 
an interaction sphere with two facets?
How it works?

Code below:

import math

# Spheres
color = [0.21, 0.22, 0.1]
r = 1.
sf = 3  # scale factor
trans = 0.2

sphere1 = sphere([0.8, 0., 0.], r, color=color, fixed=fixed),
sphere2 = sphere([2.6, 0., 0.], r, color=color, fixed=fixed),
sphere3 = sphere([0.8, -1.8, 0.], r, color=color, fixed=fixed),
sphere4 = sphere([0.8, -3.6, 0.], r, color=color, fixed=fixed),
side1 = facet(vertices=[(0.0, -2*r*sf, 0.),
   (0.0, trans, 2*r*sf),
   (0.0, trans, -2*r*sf)], fixed=True, wire=True),
side2 = facet(vertices=[(0.0, 2*r*sf, 0.),
   (0.0, trans, 2*r*sf),
   (0.0, trans, -2*r*sf)], fixed=True, wire=True)
O.bodies.append(sphere3)
O.bodies.append(side1)
O.bodies.append(side2)
O.bodies.append(sphere2)
O.bodies.append(sphere1)
O.bodies.append(sphere4)

# Solver
O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb(), Bo1_Facet_Aabb()]),
   InteractionLoop(
   [Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom(), 
Ig2_Facet_Sphere_ScGeom()],
   [Ip2_FrictMat_FrictMat_FrictPhys()],
   [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.1),
   PyRunner(command='intCounter()', realPeriod=1),
   PyRunner(command='testVF()', realPeriod=1)
]
# Make a step
O.step()

#for i in O.interactions:
#print(i.geom.penetrationDepth)
#print(i.geom.contactPoint)


from yade import pack, qt

v = qt.View()
v.axes = True



Sphere1 has interaction with Side1 and Side2. 

BR
Przemek



-- 
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 #690433]: UNV Reader

2020-05-04 Thread Przemek
Question #690433 on Yade changed:
https://answers.launchpad.net/yade/+question/690433

Status: Answered => Solved

Przemek confirmed that the question is solved:
No it works. 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 #690433]: UNV Reader

2020-05-04 Thread Przemek
Question #690433 on Yade changed:
https://answers.launchpad.net/yade/+question/690433

Przemek posted a new comment:
*Now

-- 
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 #690433]: UNV Reader

2020-05-04 Thread Przemek
New question #690433 on Yade:
https://answers.launchpad.net/yade/+question/690433

Hi,

I have a problm with UNV reader. When I want to import a geometry an error 
occurs:

363 if returnConnectivityTable:
364 return unvReader.facets, unvReader.nodes, 
unvReader.elements
--> 365 return facets
366 
367 

NameError: global name 'facets' is not defined


I have Yade 1.20.0 version.
What could be the reason of this problem?

BR
Przemek

-- 
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 #690127]: Missing particles in VTK

2020-04-27 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
Hi,

now it works! Thanks a lot! :)

BR
Przemek

-- 
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 #690127]: Missing particles in VTK

2020-04-26 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
Yes, you have right. But why in paraview more than one parcicle are
missed? And this issue is also in case with less particles, e.g. when
the vtk file contain 675 particles three of them are not visible...

-- 
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 #690127]: Missing particles in VTK

2020-04-26 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
Hi Jan,

here is a txt file:

#format x_y_z_r_attrs
# x y z r temp
0   0   0   0.1121.0635
0   0   0.2 0.1121.0627
0   0   0.4 0.1121.0635
0   0.2 0   0.1121.0687
0   0.2 0.2 0.1121.0682
0   0.2 0.4 0.1121.0687
0   0.4 0   0.1121.0743
0   0.4 0.2 0.1121.0739
0   0.4 0.4 0.1121.0743
0   0.6 0   0.1121.0799
0   0.6 0.2 0.1121.0795
0   0.6 0.4 0.1121.0799
0   0.8 0   0.1121.0854
0   0.8 0.2 0.1121.085
0   0.8 0.4 0.1121.0854
0   1   0   0.1121.0907
0   1   0.2 0.1121.0902
0   1   0.4 0.1121.0907
0   1.2 0   0.1121.0957
0   1.2 0.2 0.1121.0953
0   1.2 0.4 0.1121.0957
0   1.4 0   0.1121.1005
0   1.4 0.2 0.1121.1
0   1.4 0.4 0.1121.1005
0   1.6 0   0.1121.105
0   1.6 0.2 0.1121.1046
0   1.6 0.4 0.1121.105
0   1.8 0   0.1121.1092
0   1.8 0.2 0.1121.1088
0   1.8 0.4 0.1121.1092
0   2   0   0.1121.1132
0   2   0.2 0.1121.1128
0   2   0.4 0.1121.1132
0   2.2 0   0.1121.1169
0   2.2 0.2 0.1121.1165
0   2.2 0.4 0.1121.1169
0   2.4 0   0.1121.1204
0   2.4 0.2 0.1121.12
0   2.4 0.4 0.1121.1204
0   2.6 0   0.1121.1236
0   2.6 0.2 0.1121.1232
0   2.6 0.4 0.1121.1236
0   2.8 0   0.1121.1266
0   2.8 0.2 0.1121.1261
0   2.8 0.4 0.1121.1266
0   3   0   0.1121.1293
0   3   0.2 0.1121.1288
0   3   0.4 0.1121.1293
0   3.2 0   0.1121.1317
0   3.2 0.2 0.1121.1313
0   3.2 0.4 0.1121.1317
0   3.4 0   0.1121.134
0   3.4 0.2 0.1121.1335
0   3.4 0.4 0.1121.134
0   3.6 0   0.1121.1359
0   3.6 0.2 0.1121.1355
0   3.6 0.4 0.1121.1359
0   3.8 0   0.1121.1377
0   3.8 0.2 0.1121.1373
0   3.8 0.4 0.1121.1377
0   4   0   0.1121.1393
0   4   0.2 0.1121.1388
0   4   0.4 0.1121.1393
0   4.2 0   0.1121.1406
0   4.2 0.2 0.1121.1402
0   4.2 0.4 0.1121.1406
0   4.4 0   0.1121.1418
0   4.4 0.2 0.1121.1414
0   4.4 0.4 0.1121.1418
0   4.6 0   0.1121.1429
0   4.6 0.2 0.1121.1424
0   4.6 0.4 0.1121.1429
0   4.8 0   0.1121.1438
0   4.8 0.2 0.1121.1434
0   4.8 0.4 0.1121.1438
0   5   0   0.1121.1449
0   5   0.2 0.1121.1445
0   5   0.4 0.1121.1449
0.2 0   0   0.1121.0691
0.2 0   0.2 0.1121.0685
0.2 0   0.4 0.1121.0691
0.2 0.2 0   0.1121.0753
0.2 0.2 0.2 0.1121.0751
0.2 0.2 0.4 0.1121.0753
0.2 0.4 0   0.1121.0812
0.2 0.4 0.2 0.1121.0811
0.2 0.4 0.4 0.1121.0812
0.2 0.6 0   0.1121.087
0.2 0.6 0.2 0.1121.0869
0.2 0.6 0.4 0.1121.087
0.2 0.8 0   0.1121.0926
0.2 0.8 0.2 0.1121.0925
0.2 0.8 0.4 0.1121.0926
0.2 1   0   0.1121.0979
0.2 1   0.2 0.1121.0978
0.2 1   0.4 0.1121.0979
0.2 1.2 0   0.1121.103
0.2 1.2 0.2 0.1121.1029
0.2 1.2 0.4 0.1121.103
0.2 1.4 0   0.1121.1078
0.2 1.4 0.2 0.1121.1077
0.2 1.4 0.4 0.1121.1078
0.2 1.6 0   0.1121.1124
0.2 1.6 0.2 0.1121.1123
0.2 1.6 0.4 0.1121.1124
0.2 1.8 0   0.1121.1166
0.2 1.8 0.2 0.1121.1166
0.2 1.8 0.4 0.1121.1166
0.2 2   0   0.1121.1207
0.2 2   0.2 0.1121.1206
0.2 2   0.4 0.1121.1207
0.2 2.2 0   0.1121.1244
0.2 2.2 0.2 0.1121.1243
0.2 2.2 0.4 0.1121.1244
0.2 2.4 0   0.1121.1279
0.2 2.4 0.2 0.1121.1278
0.2 2.4 0.4 0.1121.1279
0.2 2.6 0   0.1121.1311
0.2 2.6 0.2 0.1121.131
0.2 2.6 0.4 0.1121.1311
0.2 2.8 0   0.11

Re: [Yade-users] [Question #690127]: Missing particles in VTK

2020-04-24 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
Hi Jan,

this is txt file for 36 particles:

#format x_y_z_r_attrs
# x y z r temp
0   0   0   0.5521.4949
0   1   0   0.5521.551
0   2   0   0.5521.6028
0   3   0   0.5521.6451
0   4   0   0.5521.6783
0   5   0   0.5521.7061
1   0   0   0.5521.5679
1   1   0   0.5521.6467
1   2   0   0.5521.7066
1   3   0   0.5521.7512
1   4   0   0.5521.7824
1   5   0   0.5521.8009
2   0   0   0.5521.6728
2   1   0   0.5521.7612
2   2   0   0.5521.8258
2   3   0   0.5521.8707
2   4   0   0.5521.8994
2   5   0   0.5521.914
3   0   0   0.5521.8076
3   1   0   0.5521.8995
3   2   0   0.5521.9645
3   3   0   0.5522.0063
3   4   0   0.5522.0305
3   5   0   0.5522.0419
4   0   0   0.5521.9781
4   1   0   0.5522.0649
4   2   0   0.5522.1265
4   3   0   0.5522.1597
4   4   0   0.5522.1744
4   5   0   0.5522.181
5   0   0   0.5522.2016
5   1   0   0.5522.2554
5   2   0   0.5522.3168
5   3   0   0.5522.3314
5   4   0   0.5522.3264
5   5   0   0.5522.3268

And generated vtk:

# vtk DataFile Version 3.0.
comment
ASCII

DATASET POLYDATA
POINTS 35 double
0 1 0
0 2 0
0 3 0
0 4 0
0 5 0
1 0 0
1 1 0
1 2 0
1 3 0
1 4 0
1 5 0
2 0 0
2 1 0
2 2 0
2 3 0
2 4 0
2 5 0
3 0 0
3 1 0
3 2 0
3 3 0
3 4 0
3 5 0
4 0 0
4 1 0
4 2 0
4 3 0
4 4 0
4 5 0
5 0 0
5 1 0
5 2 0
5 3 0
5 4 0
5 5 0

POINT_DATA 35
SCALARS radius double 1
LOOKUP_TABLE default
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55
0.55

SCALARS temp double 1
LOOKUP_TABLE default
21.551
21.6028
21.6451
21.6783
21.7061
21.5679
21.6467
21.7066
21.7512
21.7824
21.8009
21.6728
21.7612
21.8258
21.8707
21.8994
21.914
21.8076
21.8995
21.9645
22.0063
22.0305
22.0419
21.9781
22.0649
22.1265
22.1597
22.1744
22.181
22.2016
22.2554
22.3168
22.3314
22.3264
22.3268

-- 
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 #690127]: Missing particles in VTK

2020-04-24 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
 I just tried to use this:

vtkExporter = export.VTKExporter('/tmp/vtkExporterTesting')
vtkExporter.exportSpheres(what=dict(dist='b.state.pos.norm()'))

But I had an error:

ValueErrorTraceback (most recent call last)
/usr/bin/yade in ()

/usr/bin/yade in tempCalc()
202 
203 vtkExporter = export.VTKExporter('vtkExporterTesting')
--> 204 vtkExporter.exportSpheres(what=dict(dist='b.state.pos.norm()'))
205 
206 #export.textExt('test.txt', format='x_y_z_r_attrs', 
attrs=['b.getTemp()'], comment='temp')

/usr/lib/x86_64-linux-gnu/yade/py/yade/export.py in exportSpheres(self, ids, 
what, comment, numLabel, useRef)
428 outFile.write("%g\n"%(b.shape.radius))
429 # write additional data from 'what' param
--> 430 for name,command in what: # for each name...
431 test = eval(command) # ... eval one example to 
see what type (float, Vector3, Matrix3) the result is ...
432 # ... and write appropriate header line and 
loop over all bodies and write appropriate vtk line(s)

ValueError: too many values to unpack

Yade [2]: 
---
KeyboardInterrupt Traceback (most recent call last)
/usr/lib/x86_64-linux-gnu/yade/py/yade/__init__.py in refreshEvent(self)
198 def yzxSlot(self): self.setViewAxes((-1,0,0),(0,0,1))
199 def zxySlot(self): self.setViewAxes((0,-1,0),(1,0,0))
--> 200 def refreshEvent(self):
201 self.refreshValues()
202 self.activateControls()

KeyboardInterrupt:

In case when I used export to txt file, I get:

#format x_y_z_r_attrs
# x y z r temp
0   0   0   0.5540
1   0   0   0.5542.3553
2   0   0   0.5544.7105
3   0   0   0.5547.0658
4   0   0   0.5549.421

And after text2vtk:

# vtk DataFile Version 3.0.
comment
ASCII

DATASET POLYDATA
POINTS 4 double
1 0 0
2 0 0
3 0 0
4 0 0

POINT_DATA 4
SCALARS radius double 1
LOOKUP_TABLE default
0.55
0.55
0.55
0.55

SCALARS temp double 1
LOOKUP_TABLE default
42.3553
44.7105
47.0658
49.421

So, in txt I have 5 particles and in vtk file 4... wierd...

-- 
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 #690127]: Missing particles in VTK

2020-04-24 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
The code works but there is problem only with export data from the text file to 
vtk. Like i wrote, in txt file I had 36 particles and after convertion one 
particle was missed. 
I don't know what is the reason of it.

-- 
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 #690127]: Missing particles in VTK

2020-04-24 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
It is long :)

-- 
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 #690127]: Missing particles in VTK

2020-04-24 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
import math
import numpy as np
from scipy.sparse.linalg import spsolve
from numpy.linalg import norm
from numpy.linalg import inv
from yade import pack, export

# Properties and parameters
kappa = 10.  # heat conductivity
beta = 1.
T_inf = 20.  # ambient temperature
q_v = 0.5e1  # heat flux
convection1 = 0.  # x-position of convection
convection2 = 0.  # y-position of convection

tPoint = [2, 2, 0]
avTemp = 0

# Plate dimension
boxMax = (5.0, 5.0, 0.5)
# Spheres
color = [0.21, 0.22, 0.1]
sphereRadius = 0.1  # cm
r = 0.11
ndiv_x = boxMax[0] / (2 * sphereRadius) + 1
ndiv_y = boxMax[1] / (2 * sphereRadius) + 1
ndiv_z = boxMax[2] / (2 * sphereRadius) + 1
nbSpheres = (int(ndiv_x), int(ndiv_y), int(ndiv_z))
num = 0
for i in range(nbSpheres[0]):
for j in range(nbSpheres[1]):
for jj in range(nbSpheres[2]):
x = (2.0 * sphereRadius * i)
y = (2.0 * sphereRadius * j)
z = (2.0 * sphereRadius * jj)
num += 1
plate = utils.sphere([x, y, z], r, color=color, fixed=fixed)
O.bodies.append(plate)
conv1 = box(center=(convection1, boxMax[1] / 2, boxMax[2] / 2), extents=(0., 
boxMax[1] / 2 + sphereRadius, boxMax[2] / 2 + sphereRadius),
fixed=True, wire=True, mask=3),
conv2 = box(center=(boxMax[0] / 2, convection2, boxMax[2] / 2), 
extents=(boxMax[0] / 2 + sphereRadius, 0., boxMax[2] / 2 + sphereRadius),
fixed=True, wire=True, mask=3),
heat1 = facet(vertices=[(boxMax[0] + sphereRadius, -sphereRadius, 
-sphereRadius),
(boxMax[0] + sphereRadius, boxMax[0] + sphereRadius, 
-sphereRadius),
(boxMax[0] + sphereRadius, -sphereRadius, boxMax[2] + 
sphereRadius)], fixed=True, wire=True, mask=55)
heat2 = facet(vertices=[(boxMax[0] + sphereRadius, boxMax[0] + sphereRadius, 
boxMax[2] + sphereRadius),
(boxMax[0] + sphereRadius, boxMax[0] + sphereRadius, 
-sphereRadius),
(boxMax[0] + sphereRadius, -sphereRadius, boxMax[2] + 
sphereRadius)], fixed=True, wire=True, mask=55)
O.bodies.append(heat1)
O.bodies.append(heat2)
O.bodies.append(conv1)
O.bodies.append(conv2)
nBox = 2  # number of boxes


###
def convComp():
betaDiffx = 0
betaDiffy = 0
for b in O.bodies:
if isinstance(b.shape, Sphere):
if b.state.pos[0] == convection1:
betaDiffx += 1
elif b.state.pos[1] == convection2:
betaDiffy += 1
else:
pass
beta_x = beta / betaDiffx
beta_y = beta / betaDiffy
return beta_x, beta_y
###


beta_x = convComp()[0]
beta_y = convComp()[1]

# Solver
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Box_Aabb(), 
Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom(), 
Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.1),
PyRunner(command='intCounter()', realPeriod=1),
PyRunner(command='tempCalc()', realPeriod=1),
PyRunner(command='checkTempPoint(tPoint, sphereRadius)', realPeriod=1)
]
# Make a step
O.step()


###
def intCounter():  # counter of body (Sphere and Facet) real interactions
for b in O.bodies:
if isinstance(b.shape, Sphere) == True:
countI = 0
bInCon = []
for i in O.interactions:
if i.isReal:
if (i.id1 == b.id):
if isinstance(O.bodies[i.id2].shape, Facet) == True:
countI += 1
bInCon.append(i.id2)
else:
pass
elif (i.id2 == b.id):
if isinstance(O.bodies[i.id1].shape, Facet) == True:
countI += 1
bInCon.append(i.id1)
else:
pass
else:
pass
b.realInt(countI)
b.bodiesInContact(bInCon)
elif isinstance(b.shape, Facet) == True:
countI = 0
bInCon = []
for i in O.interactions:
if i.isReal:
if (i.id1 == b.id):
countI += 1
bInCon.append(i.id2)
elif (i.id2 == b.id):
countI += 1
bInCon.append(i.id1)
else:
pass
b.realInt(countI)
b.bodiesInContact(bInCon)
else:
pass
###


###
def volumefraction(fID, sID):
ns = O.bodies[fID].countI
nsd = 0
# Ai = pi * math.pow(r * math.sin

Re: [Yade-users] [Question #690127]: Missing particles in VTK

2020-04-24 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
Sorry by the indentation. It should looks like:

for tp in O.bodies:
if isinstance(tp.shape, Box) == True:
pass
else:
tp.setTemp(T[tp.id])

BR
Przemek

-- 
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 #690127]: Missing particles in VTK

2020-04-24 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Status: Answered => Solved

Przemek confirmed that the question is solved:
Hi Jan,

check the script below:

T = inv(H).dot(F)
 for tp in O.bodies:
 if isinstance(tp.shape, Box) == True:
pass
else:
tp.setTemp(T[tp.id])

-- 
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 #690127]: Missing particles in VTK

2020-04-23 Thread Przemek
Question #690127 on Yade changed:
https://answers.launchpad.net/yade/+question/690127

Przemek posted a new comment:
Hi Jan,

I checked the text file which contents 36 particles and in vtk file 1
particle was missed. For a higher number of particles more of them were
missed.

I will send the script tomorrow when I'll be in work ;)

BR
Przemek

-- 
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 #690127]: Missing particles in VTK

2020-04-23 Thread Przemek
New question #690127 on Yade:
https://answers.launchpad.net/yade/+question/690127

Hi,

I've a problem with exporting to VTK formt. After convertion from text file to 
vtk file some particles are missing.
How can I solve this problem?
I used this code:

export.textExt('test.txt', format='x_y_z_r_attrs', attrs=['b.getTemp()'], 
comment='temp')
export.text2vtk('test.txt', 'test.vtk')

BR
Przemek

-- 
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 #688175]: Contact point coordinates of two bodies

2020-01-22 Thread Przemek
Question #688175 on Yade changed:
https://answers.launchpad.net/yade/+question/688175

Status: Answered => Solved

Przemek confirmed that the question is solved:
Ok, 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 #688174]: Definition of table with zeros arrays

2020-01-22 Thread Przemek
Question #688174 on Yade changed:
https://answers.launchpad.net/yade/+question/688174

Status: Answered => Solved

Przemek confirmed that the question is solved:
Thanks Robert!

-- 
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 #688175]: Contact point coordinates of two bodies

2020-01-22 Thread Przemek
New question #688175 on Yade:
https://answers.launchpad.net/yade/+question/688175

Hi,

is there a simply way to get the coordinates of contact point of two bodies e.g 
sphere-sphere or sphere-box?
Now I'm using this script:

for i in O.interactions:
if not i.isReal: continue
cp = i.geom.contactPoint

I want to made a thermal model, and I need those information to build a thermal 
resistance matrix.

BR
Przemek 

-- 
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 #688174]: Definition of table with zeros arrays

2020-01-22 Thread Przemek
New question #688174 on Yade:
https://answers.launchpad.net/yade/+question/688174

Hello,

is a possibility in Yade to define the table or matrix where the rows would be 
an arrays with zeros values? In Python I'm using numeric library - numpy - and 
here I don't know how to do it.

BR
Przemek 

-- 
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 #686571]: Access to UNV facets

2019-12-03 Thread Przemek
Question #686571 on Yade changed:
https://answers.launchpad.net/yade/+question/686571

Status: Answered => Solved

Przemek confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

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

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


Re: [Yade-users] [Question #686571]: Access to UNV facets

2019-12-03 Thread Przemek
Question #686571 on Yade changed:
https://answers.launchpad.net/yade/+question/686571

Przemek posted a new comment:
Sorry, my last comment was not described precisely. My fault.

I'm using this geometry (rod) in O.engines section, that's why I didn't attach 
it earlier.
It rotates and translates. And I want to apply a function which depends on area 
and position of each facet in current iteration (area is constant, but position 
changes due to the combined motion).
So, I want to have an access to to this data.

I hope that this description is more understandable :)

Przemek

-- 
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 #686571]: Access to UNV facets

2019-12-03 Thread Przemek
Question #686571 on Yade changed:
https://answers.launchpad.net/yade/+question/686571

Przemek posted a new comment:
Thanks Jan, and I have one more question to this topic.

In my script, I used command

rod =
O.bodies.append(ymport.unv('Geometry/tool.unv',scale=1e-3,returnConnectivityTable=False,wire=False,color=toolColor))

to move this geometry. So the facets coordinates changes in every
iteration. Can I connect this two imports to read current position of
each facet?

BR
Przemek

-- 
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 #686571]: Access to UNV facets

2019-12-02 Thread Przemek
New question #686571 on Yade:
https://answers.launchpad.net/yade/+question/686571

Hi,

I have a question about the ymport module. I my script I loaded UNV geometry 
with returnConnectivityTable True value. And now, how I can access to the data 
of facets? 
I wish to use some properties of those facets like, area and coordinates of 
each area center. Is it possible?

BR
Przemek

-- 
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 #685885]: Problem with the combined engine

2019-11-15 Thread Przemek
Question #685885 on Yade changed:
https://answers.launchpad.net/yade/+question/685885

Przemek posted a new comment:
Hi,

now it's working :) Thanks a lot!

-- 
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 #685885]: Problem with the combined engine

2019-11-15 Thread Przemek
Question #685885 on Yade changed:
https://answers.launchpad.net/yade/+question/685885

Przemek posted a new comment:
Sorry, next time I'll adjust to guidelines.

Here is the error:

UnboundLocalError Traceback (most recent call last)
/usr/bin/yade in ()

/usr/bin/yade in updateParameters()
 52 tranVel = 1.0
 53 transEngine = combEngine.comb[0]
---> 54 transEngine.translationAxis = velVec
 55 transEngine.velocity = tranVel
 56 

UnboundLocalError: local variable 'velVec' referenced before assignment

I tried to modify the script by yous suggestions but it still doesn't
work.

STL file: https://www.dropbox.com/s/a7dvy3khefjpl3c/tool.stl?dl=0

-- 
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 #685885]: Problem with the combined engine

2019-11-14 Thread Przemek
New question #685885 on Yade:
https://answers.launchpad.net/yade/+question/685885

Hi,

I'm new with Yade, and I have problem with combined engine. I want to change 
the translationAxis and the velocity after a few iterations but I still have an 
issue about the global variables.
Could you help me?

#!/usr/bin/python
# -*- coding: utf-8 -*-

from __future__ import print_function
from builtins import range
import random
from yade import ymport
from yade import pack, qt

## PhysicalParameters 

## Import geometry 
rod = O.bodies.append(ymport.stl('tool.stl',wire=False,color=[0.31,0.47,0.47]))

# Plate dimension
thickness = 1.0 # cm
width = 5.0 # cm
length = 11.0 # cm
boxMax = (2,2.5,0)

# Spheres
sphereRadius = 0.05 # cm
ndiv_x = length/(2*sphereRadius)
ndiv_y = width/(2*sphereRadius)
ndiv_z = thickness/(2*sphereRadius)
#nbSpheres = (ndiv_x,ndiv_y,ndiv_z)
nbSpheres = (40,40,10)#(110,50,10)
print("Creating %d spheres..."%(nbSpheres[0]*nbSpheres[1]*nbSpheres[2]), end=' 
')
for i in range(nbSpheres[0]):
for j in range(nbSpheres[1]):
for k in range(nbSpheres[2]):
x = boxMax[0]-2.0*sphereRadius*(i)
y = boxMax[1]-2.0*sphereRadius*(j)
z = boxMax[2]-2.0*sphereRadius*(k)
r = random.uniform(sphereRadius,sphereRadius)
fixed = False
color=[0.21,0.22,0.1]
if (i==0 or i==nbSpheres[0]-1 or k==nbSpheres[2]-1 or 
j==0 or j==nbSpheres[1]-1):
fixed = True
color=[0.21,0.22,0.3]

O.bodies.append(sphere([x,y,z],r,color=color,fixed=fixed))
print("done\n")

## Estimate time step
#O.dt=PWaveTimeStep()
O.dt=0.0001

def updateParameters():
aTime = (O.iter*O.dt)
if   aTime>0.005: # fist part
velVec = Vector3(-1,0,0)
tranVel = 1.0
transEngine.translationAxis = velVec
transEngine.velocity = tranVel

## Engines 
O.engines=[
ForceResetter(), # 0
InsertionSortCollider([ # 1
Bo1_Sphere_Aabb(),
Bo1_Facet_Aabb(),
]),
InteractionLoop( # 2
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
CombinedKinematicEngine(ids=rod,label='combEngine') + 
TranslationEngine(translationAxis=(0,0,-1),velocity=0.6) + 
RotationEngine(rotationAxis=(0,0,-1), angularVelocity=20, 
rotateAroundZero=True, zeroPoint=(0,0,0)),
NewtonIntegrator(damping=2.0,gravity=[0,0,-9.81]), # 3
PyRunner(iterPeriod=1, command='updateParameters()'),
# save data from Yade's own 3d view
#qt.SnapshotEngine(fileBase='3d-',iterPeriod=1,label='snapshot'),
#PyRunner(command='finish()',iterPeriod=10)
]

import sys,time

print("Start simulation: ")
nbIter=60


from yade import qt
v=qt.View()
v.eyePosition=(6,2,2); v.upVector=(-.4,-.4,.8); v.viewDir=(-.9,-.25,-.3); 
v.axes=False; v.sceneRadius=20

O.stopAtIter=nbIter
O.run()

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

#for t in xrange(2):
#   start=time.time();O.run(nbIter);O.wait();finish=time.time() 
#   speed=nbIter/(finish-start); print '%g iter/sec\n'%speed
#print "FINISH"
#quit()

BR
Przemek 

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