- Thank you received: 0
Saving solution (magnetostatics) to .vtk - extremely large files
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
6 years 3 months ago #686
by creativeworker
Hello,
i'd like to save my solution of the ngsolve calculation to a .vtk file to prepare some nice graphics with ParaView. The problem is a magnetostatic one and has about 600.000 elements.
The export is lasting forever and producing extremely large files. (way over 20 GB)
i use the following code:
Is there something wrong with the concept of exporting the solution?
Can i reduce the resolution of the numbers?
Many thanks in advance for your support!
With best regards
i'd like to save my solution of the ngsolve calculation to a .vtk file to prepare some nice graphics with ParaView. The problem is a magnetostatic one and has about 600.000 elements.
The export is lasting forever and producing extremely large files. (way over 20 GB)
i use the following code:
Code:
# VTKOutput object
vtk = VTKOutput(ma=mesh,
coefs=[u],
names = ["vectorfield"],
filename="result",
subdivision=3)
# Exporting the results:
vtk.Do()
Is there something wrong with the concept of exporting the solution?
Can i reduce the resolution of the numbers?
Many thanks in advance for your support!
With best regards
6 years 3 months ago #688
by schruste
Replied by schruste on topic Saving solution (magnetostatics) to .vtk - extremely large files
Hi creativeworker,
The VTK-legacy format (what is used here) is really consuming a lot of disk space (we haven't implemented the VTK binary format which would spare a lot of space). Your example snippet is fine. However, you are using subdivision=3 which means that every tetrahedron is divided into 8³=512 tetrahedron only for the purpose of visualization. This makes sense for higher order polynomials representing solutions with large variations. However, if you are ok with a low resolution visualization, try subdivision=0 which should give you roughly a file size of around 40 MB.
Best,
Christoph
The VTK-legacy format (what is used here) is really consuming a lot of disk space (we haven't implemented the VTK binary format which would spare a lot of space). Your example snippet is fine. However, you are using subdivision=3 which means that every tetrahedron is divided into 8³=512 tetrahedron only for the purpose of visualization. This makes sense for higher order polynomials representing solutions with large variations. However, if you are ok with a low resolution visualization, try subdivision=0 which should give you roughly a file size of around 40 MB.
Best,
Christoph
The following user(s) said Thank You: creativeworker, gcdiwan
- creativeworker
- Topic Author
- Offline
- Senior Member
Less
More
- Thank you received: 0
6 years 3 months ago #689
by creativeworker
Replied by creativeworker on topic Saving solution (magnetostatics) to .vtk - extremely large files
Thank you! This solved it for my purpose. I wasn't aware of the extreme effect of the subdivision parameter. FYI: The file has now 160MB.
Time to create page: 0.111 seconds