Hello everybody,
I am a new user to fenics and have run into an issue that I can not resolve. I hope you can help/guide me.
I am trying to run a simple diffusion analysis on a 2D domain. The domain is obtained from image processing of microstructural images of steel. Hence the domain is split into different regions, where the diffusion coefficients are different. Therefore I need to import the mesh definition, as well as the subdomain definition. I have already looked into forum posts and discussions on how to do this for domains, where subdomains are defined by functions. But in my problem, the subdomain definition is random and hence I do not know how to define my subdomains.
I have stored my mesh in abaqus format (.inp). This is just for me to view the geometry in abaqus. Basically I have the node definitions, element connectivity matrix and information on elements belonging to different subdomains stored as feature vectors in the input file. I have generated this input file, so I have access to all of the nodes, elements and features matrices. All the elements are triangles.
So I have the following information(this is just an example to show you the information I have):
nodes =
[Node no., x, y, z
1, 0.0, 0.0, 0.0;
2, 1.0, 0.0, 0.0; …]
elements =
[Ele no., n1, n2, n3
1, 1, 2, 3;
2, 1, 2, 4; …]
subdomain1 = [1, 2, 3, …] (list of elements belonging to subdomain1)
subdomain2 = [4, 5, 6, …]
diffusion coefficients: D1, D2,…
I have already tried using meshio to convert the .inp file to .xdmf file. It worked and I was able to import the geometry but lost all information on the subdomain definitions. Any help is appreciated.
Thank you in advance.