Re: [Yade-users] [Question #652966]: utils.getStressAndTangent()

2017-08-01 Thread Wang Wang
Question #652966 on Yade changed:
https://answers.launchpad.net/yade/+question/652966

Status: Answered => Solved

Wang Wang 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 #652966]: utils.getStressAndTangent()

2017-07-25 Thread Bruno Chareyre
Question #652966 on Yade changed:
https://answers.launchpad.net/yade/+question/652966

Bruno Chareyre proposed the following answer:
3) install yadedaily maybe (see installation page in the doc)

-- 
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 #652966]: utils.getStressAndTangent()

2017-07-25 Thread Jan Stránský
Question #652966 on Yade changed:
https://answers.launchpad.net/yade/+question/652966

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,
yes, getStressAndTangent is missing because of old Yade version, 1.07 is from 
2014-01

apt-get tells it is the newest version in the package repository of your 
operating system (Ubuntu?). To have this functionality:
1) upgrade your system to a newer version
2) compile newer version of Yade from source (but on older system, it is likely 
there will be some problems)

so option 1) is the way to go, but it may be time consuming and you
should backup all your data (I faced several times that during upgrades
I would have lost some data if I did not make backup)

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


[Yade-users] [Question #652966]: utils.getStressAndTangent()

2017-07-24 Thread Wang Wang
New question #652966 on Yade:
https://answers.launchpad.net/yade/+question/652966

from your website, i can see there is a command called 
utlis.getStressAndTangent() which can give a macroscopic Tangent.   However, 
the program with such command has error:

AttributeError: 'module' object has no attribute 'getStressAndTangent'

Yade on my computer is 1.07.0, i am wondering it is the version problem.

And also, if it is the version problem, how can i update the Yade version, for 
i have input " sudo apt-get install yade"  in terminal and it says the version 
is the newest.

You can use such codes to test what i met:
-
#!/usr/bin/python   # This is server.py file

import string
from yade import plot,qt
from yade.pack import *
from yade import pack, plot
import socket   # Import socket module
import numpy# initial the math of matrix compute (needed in ns) 

# initial the global variables
arrcc =[0]*3  # last step strain(commit)
arrtt =[0]*3  # last step strain(trail)
scc=[0]*3 # last step stress
orst=1   # initialize the orginal save document(trial)
check=[0]*1 # I need to calculate the first step when ag=0
check[0]=0
theTangent=(0)
# load the identical package
O.load('/tmp/.gz')  # only load the package, because the O.cell.velGrad is 
not compatible with the peri3dcontroller eigine


#O.periodic=True   ### note!!!  add
O.dt=1e-8 

# see the example of peri3dcontroller, 1.5 is used to speed up the computation
EnlargeFactor=1.5 
EnlargeFactor=1.0
O.engines=[
ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=EnlargeFactor,label='bo1s')]),
InteractionLoop(

[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=EnlargeFactor,label='ig2ss')],
[Ip2_CpmMat_CpmMat_CpmPhys()],[Law2_ScGeom_CpmPhys_Cpm()]),
NewtonIntegrator(),

#VTKRecorder(fileName='3dfirst-vtk-',recorders=['all','cpm'],iterPeriod=4999),

]

O.cell.velGrad=utils.Matrix3(0,0,0,0,0,0,0,0,0)
O.step()
bo1s.aabbEnlargeFactor=ig2ss.interactionDetectionFactor=1.   # 
O.step and change 1.5 back to 1. , because the concrete model is developed in 
the 1. environment


if orst==1:
print "orst1"   

for b in O.bodies:
b.material.young = 1.0001*17e10



orst=2
ag = [0]*3   #  current - last   ie. the changed strain
ag[0] = 0
ag[1]= 0
ag[2] =0
ns=100 
dstrain = utils.Matrix3(ag[0],ag[2],0,0,ag[1],0,0,0,0)  # the goal 
strain xx xy xz, yx yy yz, zx zy zz   
O.cell.velGrad=dstrain/(ns*O.dt)
O.run(ns,True)   
stressValue=utils.getStress()
stressxx=stressValue[0,0]   # the 
return stress xx
stressyy=stressValue[1,1]   # the 
return stress yy
stressxy=(stressValue[0,1]+stressValue[1,0])/2  # the 
return stress xy = (xy + yx)/2

print "stress here from strain[0,0,0] step 1"
print stressxx
print stressyy
print stressxy

theTangent=utils.getStressAndTangent()
print theTangent
O.saveTmp('first')   

-



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