JuliaFEM / JuliaFEM.jl

The JuliaFEM software library is a framework that allows for the distributed processing of large Finite Element Models across clusters of computers using simple programming models. It is designed to scale up from single servers to thousands of machines, each offering local computation and storage.
http://juliafem.github.io/JuliaFEM.jl/latest/
MIT License
250 stars 66 forks source link

Heat Equation Solver Features: Anisotropic conductivity, transient solution #114

Closed AndiMD closed 7 years ago

AndiMD commented 7 years ago

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

ahojukka5 commented 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
AndiMD commented 7 years ago

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)

ahojukka5 commented 7 years ago

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.

AndiMD commented 7 years ago

I have implemented this in my anisoHeat branch. Seems to work, results look identical to Code_Aster. I'm still trying to figure out a better test case (especially the 3d-variant has lots of cells).

aniso aniso3d