Hi Jan, > > do you agree with following implementation of computing stress tensor > of periodic cell? > > 1) compute sigma_ij = (1/V) sum(l_i f_j) as two matrices (contribution > of normal and shear forces, as Chiara wrote it cen be useful, > everything computed in one for loop). Every other function will be > computed from these results Yes, as long as the average user can get total stress without the need to think about the possible splits. I agree that the split can be very interesting, but it would be a pitty to make things unnecessarily complicated.
This sort of interface, for instance, would be nice: getStress() -> total stress getStress(0.1) -> total stress with user-specified volume=0.1, when default does not apply getStress(0.1,normal=True) -> only fn getStress(threshold=X) -> split weak/strong getStress(0.1,threshold=X,normal=True) etc. > 2) provide two functions, symmetric getCauchyStress and original > non-symmetric getCosseratStress The brute Sum(f_i*l_j) is used for Cauchy stress usually. This expression has no obvious reason for being symmetric (and for one contact alone, it is not symmetric, obviously). However, there is a proof that the sum will be symmetric at static equilibrium. Since I'm not sure what Cosserat stress is, I (as a user) would tend to use the Cauchy one, but then it would not give the expected sum(fi*lj)... This is a bit confusing. Since the relation sij = sum(fi*lj)/V is often named after Love (1927) or Weber (1966), or both (there is no unique naming unfortunately), LoveStress (or LWStress or whatever of this kind) could maybe help disambiguation. It also has the advantage of defining precisely how it is computed (it is not force/surface on a boundary, which could be another way to get it, it is a sum on internal interactions). There is already one function named along this line in the code: https://github.com/yade/trunk/blob/master/pkg/dem/Shop.hpp#L118 ... but it's not wrapped under this name in python: https://www.yade-dem.org/doc/yade.utils.html?highlight=stress#yade.utils.bodyStressTensors We still miss a name for the symmetric part of this Love-Weber stress. I don't find any good suggestion. Do you know authors who introduced it? It could give the name. > 3) all functions wold be methods of Cell class Not a very good place since cell is not instantiated by default (it is here only if the simulation is periodic). Try typing O.cell.someFunction() in an empty yade session, it will return an error. Shop/utils (like current stress functions) is a good place, no? It is imported by default so we can simply type "getStress()" (no need to import nor to add moduleName.getStress()). Cheers Bruno _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp

