← Back to team overview

yade-users team mailing list archive

Re: [Question #701836]: size vs. hSize vs. hSize0 vs. refSize in "Cell"

 

Question #701836 on Yade changed:
https://answers.launchpad.net/yade/+question/701836

    Status: Open => Answered

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

> how to directly represent the strain value such as stress?
> I thought the "cell" class would contain the strain information, right?

right [1,2,3,4] (and more getSomething methods, see [5] as linked from
docs)

> However, I can't decide which parameter should be used to represent
the strain value.

It is up to you, depending on what "the strain value" mean to you and your purposes [5].
[2] is probably a good start if you do not know.

> From the YADE documentation, the "Cell" class has the following
parameters: size, hSize, hSize0, and refSize. But I don't think I can
fully distinguish them.

You can print the values and try to set the values to see the effect.
If the documentation is not sufficient, feel free to open an issue on gitlab or even improve it yourself.

###
O.periodic = True
O.cell.hSize = Matrix3(9,1,2, 3,8,4, 5,6,7)
print("size",O.cell.size)
print("refSize",O.cell.refSize)
print("hSize",O.cell.hSize)
print("hSize0",O.cell.hSize0)
#
O.engines = [NewtonIntegrator()]
O.dt = 1
O.cell.velGrad = Matrix3(1,2,3, 4,5,6, 7,8,9)
O.step()
O.step()
#
print("size",O.cell.size)
print("refSize",O.cell.refSize)
print("hSize",O.cell.hSize)
print("hSize0",O.cell.hSize0)
#
O.cell.hSize = Matrix3(9,1,2, 3,8,4, 5,6,7) # no problem, intended to set hSize
O.cell.refSize = Vector3(1,2,3) # warning: Setting Cell.refSize is deprecated
#O.cell.size = Vector3() # AttributeError: can't set attribute
#O.cell.hSize0 = Matrix3() # AttributeError: can't set attribute
###

Also source code [6,7] can be useful.

Cheers
Jan

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Cell.getDefGrad
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Cell.getSmallStrain
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Cell.getLagrangianStrain
[4] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Cell.getEulerianAlmansiStrain
[5] https://en.wikipedia.org/wiki/Finite_strain_theory
[6] https://gitlab.com/yade-dev/trunk/-/blob/master/core/Cell.hpp
[7] https://gitlab.com/yade-dev/trunk/-/blob/master/core/Cell.cpp

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