`j`

: Next unread message`k`

: Previous unread message`j a`

: Jump to all threads`j l`

: Jump to MailingList overview

Robert Cimrman

26 Nov
2014
26 Nov
'14

10:32 p.m.

On 11/26/2014 07:10 PM, Ronghai Wu wrote:

Hi Robert,

Should I prescribe Dijkl to each vertex like the prestress, or only need to prescribe to each element?

Ideally, it would be to evaluate/prescribe Dijkl in the coordinates that are passed to the material function - those coordinates are the quadrature points, where the Dijkl is needed. In the last version of your script, the prestress is not prescibed in vertices. Instead, it is prescribed to each element - it is just repeated to all the points that fall to each element. So if having Dijkl piece-wise constant (over elements) is ok for you, you can define in exactly the same way as the prestress - define it in elements (centres) and repeat n_qp times using np.repeat().

Besides, if using strain = pb.evaluate('ev_cauchy_strain.2.Omega(u)', mode='el_avg'), the shear value in strain is sigma_xy or 2*sigma_xy?

See [1].

[1] http://sfepy.org/doc-devel/src/sfepy/terms/terms_elastic.html#sfepy.terms.te...

Cheers, r.

Regards Ronghai

在 2014年11月26日星期三UTC+1下午3时14分44秒，Robert Cimrman写道： >

On 11/26/2014 02:39 PM, Ronghai Wu wrote:

Hi Robert,

Now I encounter a more complicated case. What if the stiffness tensor is not constant, but a function of eta, as shown in PDF "non-constant elastic tensor.pdf". Is it possible to implement it based on the modified code "Ronghai.py"?

So eta is a known function of position? This can be done by a material parameter given by a user-defined function again [1], just like you do the prestress.

The function would be something like:

def get_d(ts, coors, mode=None, **kwargs): if mode == 'qp': x = coors[:, 0] y = coors[:, 1]

```
value = ...
return {'D' : value}
```

and in the code, use something like:

d_fun = Function('d_fun', get_d) m = Material('m', function=d_fun)

Also, if you need to work with the elastic tensors, use dw_lin_elastic term instead of dw_lin_elastic_iso.

r. [1] http://sfepy.org/doc-devel/users_guide.html#defining-material-parameters

Regards Ronghai