New question #295301 on Yade:
https://answers.launchpad.net/yade/+question/295301
Hello Yade users !
I try to calculate the external work on a sample in tensile test.
In fact, i calculate the external work with this simple formulate
"Wext_incremental=AppliedForce*displacement_incremental".
I want
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Jan Stránský proposed the following answer:
Hi Jabrane,
you came to c++ variables and scopes [2].
to get correct behavior, one option is to change the declaration of dAX
[1]. Currently (Real dAX=) it create
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Status: Open => Answered
Jérôme Duriez proposed the following answer:
Hello,
You tried to modify the source code, that's it ? Did you also modify
UniaxialStrainer.cpp in order to update this new variable "d
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Yor1 posted a new comment:
Hello Jerome and Jan
Thank you of your response.
Jerome, I simulate the tensile test with TriaxialStressController using a
positive strainRate but i doesn't work.
I get sigma=sigma2=
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Jan Stránský proposed the following answer:
Hi Jabrane,
But i have a question how do you know that dAX is a local variable ?
it just comes from how C++ works / is defined, nothing else.
"Real dAX" in cpp file
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Yor1 posted a new comment:
Hello Jan,
The behavior of dAX is related to the line in which i put "this->dAX = dAX"
In fact i put "this->dAX = dAX" just after
https://github.com/yade/trunk/blob/master/pkg/dem/Un
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Jan Stránský proposed the following answer:
Hi Jabrane,
you should put "this->dAX = dAX" to a place such that dAX is not changed
afterwards. e.g. it is changed at
https://github.com/yade/trunk/blob/master/pkg/dem
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Yor1 posted a new comment:
Hi Jan,
Thank you for the answer.
Your alternative work but it doesn't resolve my problem because the external
work obtained is underestimated (i compare it with the elastic energy).
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Jan Stránský proposed the following answer:
>
>
> Your alternative work but it doesn't resolve my problem because the
> external work obtained is underestimated (i compare it with the elastic
> energy).
>
Do you
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Yor1 posted a new comment:
Hi Jan,
This is the script which i use:
from yade import ymport, utils , plot
import math
PACKING='X1Y2Z1_2k'
OUT=PACKING+'_tensionTest_r0002_energy'
DAMP=0.4 s
saveData=100
iterMa
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Jan Stránský proposed the following answer:
Hi Jabrane,
thanks for the script. However, I was mainly interested in how you compute
the elastic energy and the work :-)
Jan
2016-06-16 9:28 GMT+02:00 Yor1 :
> Que
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Yor1 posted a new comment:
Hi Jan,
I compute the elastic energy in the recorder (in the script) with these
lines:
for i in O.interactions:
if not i.isReal : continue
E+=0.5*(i.phys.normalForce.squar
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Jan Stránský proposed the following answer:
Hi Jabrane,
dAX*=.5;
> displacement=2*dAX;
> externalWork += displacement(sumPosForces+sumNegForces)/2;
> externalWork += externalWork;
a few points:
1) displacement
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Yor1 posted a new comment:
Hi Jan,
I calculate the displacement and the external work with these lines:
if(asymmetry==0){ dAX*=.5;displacement=2*max(negIds.size(),posIds.size())*dAX;}
externalWork += displaceme
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Jan Stránský proposed the following answer:
>
> displacement=2*max(negIds.size(),posIds.size())*dAX;
I don't like that the work depends on number of particles, it should not..
Jan
2016-06-16 18:37 GMT+02:00 Y
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Yor1 posted a new comment:
I change the manner that i calculate the displacement
if(asymmetry==0){
dAX*=.5;
for(size_t i=0; idt; // update current
position
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Jan Stránský proposed the following answer:
>
>
>
> if(asymmetry!=1){
> for(size_t i=0; i negCoords[i]-=dAX;
> axisVel(negIds[i]) = -dAX/scene->dt;
Question #295301 on Yade changed:
https://answers.launchpad.net/yade/+question/295301
Yor1 posted a new comment:
Hello Jan !
I modified the computation of the displacement and the external work by
these formula:
displacement += strainRate*originalLength*scene->dt;
externalWork += displacement*(
18 matches
Mail list logo