.vtk format for 3D microstructures

ripening phenomena, dislocations, grainboundary topology
Post Reply
khajezade
Posts: 17
Joined: Fri Feb 10, 2017 7:20 am
anti_bot: 333

.vtk format for 3D microstructures

Post by khajezade » Wed Feb 15, 2017 2:30 am

Hi All,

I am new to the MICRESS environment and also new to the forum. I am trying to simulate the grain growth using a synthetic 3D microstructure. I know for 3D microstructures, we need *.vtk format to define the initial microstructure. I am making my microstructure myself and I can convert it to *.vtk file by a very simple python code that I've written. This file can be displayed by Paraview without any problems(I have both Cell-Data and Point-Data). However, to be sure that it can be read by MICRESS, I tried to open it by DP_MICRESS 7.1.2. The following error was prompted:

"The element cannot be loaded because the input file is both binary and ASCII."

I have attached my vtk file. Can I use this file for my simulation? I would appreciate it if anybody can help me with this problem.

Thanks,

Ali
Attachments
input.vtk.zip
(70.02 KiB) Downloaded 417 times

ralph
Posts: 167
Joined: Wed Apr 27, 2011 4:42 pm
anti_bot: 333

Re: .vtk format for 3D microstructures

Post by ralph » Wed Feb 15, 2017 9:48 am

Welcome to the forum, khajezade!

MICRESS does not support the full legacy format of VTK but only a small subset, i.e. DATASET STRUCTURED_POINTS and CELL_DATA (as far as I know). I did not check others explicitly.
If you modify your header like this (see also attached file):

# vtk DataFile Version 3.0
vtk output
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 201 101 101
SPACING 1 1 1
ORIGIN 0 0 0
CELL_DATA 2000000
SCALARS korn float
LOOKUP_TABLE default

Unfortunately, DP_MICRESS 7.1.2 is even more restricted and only support what MICRESS itself writes as VTKs.
I gave it a short try to convert the header of your data to the one MICRESS output VTKs use. But this was not successfull with DP_MICRESS.

So, at the moment, you can read VTKs using the header above with MICRESS and have a look to the results with DP_MICRESS later.

Regards,
Ralph
Attachments
mic_input.zip
(73.95 KiB) Downloaded 378 times

khajezade
Posts: 17
Joined: Fri Feb 10, 2017 7:20 am
anti_bot: 333

Re: .vtk format for 3D microstructures

Post by khajezade » Thu Feb 16, 2017 7:38 am

Hi Ralph;

Thanks for your quick reply. I'll give it a try. The thing that confuses me a lot is that sometimes I write a vtk file but in order to open it with DP_MICRESS, I have to rename the file to one of the example files names :lol: :lol:

Anyways,

Thanks a lot.

Ali

ralph
Posts: 167
Joined: Wed Apr 27, 2011 4:42 pm
anti_bot: 333

Re: .vtk format for 3D microstructures

Post by ralph » Thu Feb 16, 2017 10:44 am

You have to rename the VTK written by MICRESS to open it with DP_MICRESS ?
Can you post the name of such VTK file ?

Cheers,
Ralph

khajezade
Posts: 17
Joined: Fri Feb 10, 2017 7:20 am
anti_bot: 333

Re: .vtk format for 3D microstructures

Post by khajezade » Thu Feb 16, 2017 9:14 pm

No, I mean if you rename one of the MICRESS example files to something else, then you cannot open it by DP_MICRESS! At least on my system (But I have the same issue for both my windows and linux OS). I attached the same file with the same structure but with different names (Please follow the links below). Could you please check it and tell me if you have the same issue?

Attachments:
Example File: https://www.dropbox.com/s/gtwrm23w5z0uf ... 1.vtk?dl=0
Renamed Version: https://www.dropbox.com/s/3se412um8ubj0 ... n.vtk?dl=0
Ali

ralph
Posts: 167
Joined: Wed Apr 27, 2011 4:42 pm
anti_bot: 333

Re: .vtk format for 3D microstructures

Post by ralph » Fri Feb 17, 2017 10:46 am

The error message of DP_MICRESS is misleading. Not to say it is totally wrong ;)
There still has to be a time step number before the file name extension after renaming.
test.vtk : error
test_45.vtk : ok
test_1.vtk : ok
test_1_copy: error

Cheers,
Ralph

khajezade
Posts: 17
Joined: Fri Feb 10, 2017 7:20 am
anti_bot: 333

Re: .vtk format for 3D microstructures

Post by khajezade » Sat Feb 18, 2017 12:44 am

Yes, That's it. Thanks so much.

Cheers,

Ali

Post Reply