Closed AndiMD closed 7 years ago
Yeah, should not be too hard to implement. Now we have:
K += w*k*dN'*dN
where k
is scalar, but what we are looking for is A = [kx 0 0; 0 ky 0; 0 0 kz], or in isotropic case k*I. I think the following will to the trick:
A = [kx 0 0; 0 ky 0; 0 0 kz]
K += w*dN'*A*dN
Should we just allow a general (positive definite?) Matrix A
as conductivity parameter? A
could be Scalar (isotropic), Matrix 2x2 (2d) or 3x3 (3d) for update!(field, "thermal conductivity", A)
.
K += w*dN'*A*dN
should be valid for both Scalar and Matrix A
(execution speed might suffer a bit for Scalar A
)
Yes, there should be no problem for setting matrix as a field variable. Probably it's not even poor performance solution. So basically if we just make a minor change to that single line we should get anisotropic conductivity. I would not think too much about assembly performance, it can always be optimized.
A more general solver for the heat equation would be nice. See for example Equations (35,37): https://en.wikiversity.org/wiki/Introduction_to_finite_elements/Weak_form_of_heat_equation