.vtk format for 3D microstructures
.vtk format for 3D microstructures
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
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 475 times
Re: .vtk format for 3D microstructures
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
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 439 times
Re: .vtk format for 3D microstructures
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
Anyways,
Thanks a lot.
Ali
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
Anyways,
Thanks a lot.
Ali
Re: .vtk format for 3D microstructures
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
Can you post the name of such VTK file ?
Cheers,
Ralph
Re: .vtk format for 3D microstructures
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
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
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
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
Yes, That's it. Thanks so much.
Cheers,
Ali
Cheers,
Ali