Page 1 of 1

.vtk format for 3D microstructures

Posted: Wed Feb 15, 2017 2:30 am
by khajezade
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

Re: .vtk format for 3D microstructures

Posted: Wed Feb 15, 2017 9:48 am
by ralph
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

Re: .vtk format for 3D microstructures

Posted: Thu Feb 16, 2017 7:38 am
by khajezade
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

Re: .vtk format for 3D microstructures

Posted: Thu Feb 16, 2017 10:44 am
by ralph
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

Re: .vtk format for 3D microstructures

Posted: Thu Feb 16, 2017 9:14 pm
by khajezade
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

Re: .vtk format for 3D microstructures

Posted: Fri Feb 17, 2017 10:46 am
by ralph
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

Re: .vtk format for 3D microstructures

Posted: Sat Feb 18, 2017 12:44 am
by khajezade
Yes, That's it. Thanks so much.

Cheers,

Ali