Hi Kid,
If you want to have the permeability varying with position, you have to define the material parameter using a function [1]- it seems that you assigned your new K2 directly to the material constructor, right?
r. [1[ https://groups.google.com/forum/?_escaped_fragment_=topic/sfepy-devel/6QWAwC...
On 12/29/2016 09:50 AM, Kid Guo wrote:
Hi Robert,
Thank you very much, I have output the value of Kij in my script. In the script, I have give a initial value of K, of course , I assumed it is a homogeneous material, so it has the same value of every cell. Now I have new thinking, if it is a heterogeneous material, that Kij value are different of every cell. I want to give different K value in every cell, for example, in the cell 1, the Kij value is K1 = nm.array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], dtype = nm.float64) in the cell 2, the Kij value is K2 = nm.array([[1.1, 0.0, 0.0], [0.0, 1.2, 0.0], [0.0, 0.0, 10.1]], dtype = nm.float64) etc. The new Kij like this: K2 = nm.array([[[[ 1., 0., 0.], [ 0, 1., 0.], [ 0., 0., 1.]]],
[[[ 1.1, 0., 0.], [ 0, 1.2, 0.], [ 0., 0., 10.1]]]], dtype = nm.float64)
when I give the new value to the problem,it has a error. "ValueError: material parameter array must have three dimensions! ('k' has 4)"
or the K is
K3 = nm.array([[[1.0, 0.0, 0.0],
[1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], [[1.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 3.0]]], dtype = nm.float64)
it said:
"ValueError: incompatible shapes! ((27, 8, 3, 8), out: (27, 1, 3, 3), arr: (54, 8, 3, 3))"
what should I do?
Any idea? Thank you advance.
K.
在 2016年12月28日星期三 UTC+8下午9:14:36,Robert Cimrman写道:
Hi Kid,
you can use
hydraulic_conductivity = ev('ev_integrate_mat.3.Omega(m.k, p)', m=m, mode='el_avg')
...
out['hydraulic_conductivity'] = Struct(name='output_data',
mode='cell', data=hydraulic_conductivity)
Essentially, ev_integrate_mat can be used to integrate any material parameter, check [1] to see what the mode argument means.
r.
[1]
http://sfepy.org/doc-devel/src/sfepy/terms/terms_basic.html#sfepy.terms.term...
On 12/28/2016 09:01 AM, Kid Guo wrote:
Where Ki is the permeability of the i-th compartment and Kij is the general diffusion permeability. how to ouput the Kij of each cell.
在 2016年12月26日星期一 UTC+8下午8:52:44,Kid Guo写道:
Hi,
I have a problem based on "../sfepy/examples/multi_physics/biot.py". In the attached scripy 'block2.py', I have calculated the stress and strain according to the displacement, at the 111 and 112 lines you can
see
it.
Now I want to output the K of every cell, I gave a value of k at the 64 line in this script, it is a 3*3 array. I don't know which function or equation to use, so I was stucked at the 113 line. if I change the K value, will where be some difference results?
Thank you advance
K.