calculix / ccx2paraview

CalculiX to Paraview converter (frd to vtk/vtu). Makes possible to view and postprocess CalculiX analysis results in Paraview. Generates Mises and Principal components for stress and strain tensors.
GNU General Public License v3.0
91 stars 18 forks source link

Export tensors as tensors #13

Closed peterheppel closed 4 years ago

peterheppel commented 4 years ago

Hi there. Thanks for this utility. It's great to find something which simply works without hassle. (ubuntu 16.04) Here's a feature suggestion: Its great to have the derived stress quantities, but if we want to do things like 3D glyph plots of stress we would need the stress tensor. Of course we can reconstruct it with the programmable filter but it would be great not to need that. One small question: does ccx2paraview assume that the node numbering and/or element numbering are contiguous? I work from CAD files and end up zapping a lot of element sets. This leaves gaps and I suspect that ccx2paraview doesnt allow that.

Best,Peter

imirzov commented 4 years ago

Dear Peter,

I don't believe in suspects. If ccx2paraview doesn't work for contiguous nodes/elements numbering, - please, attach some logs.

And yep, it's great to do things like 3D glyph plots. But how? Do you have an example model? I'm not a Paraview user.

peterheppel commented 4 years ago

Dear Ihor, I checked out the ‘suspicion’ and I was wrong. The model which led to the suspicion was trash in other ways. Sorry. Here is a test suite in which I have changed the numbering of one of the standard ccx tests

Re: glyphs and things in Paraview. Excuse me if I tell you things which you know.

The way paraview works is that after you load your data, you can display it directly or you can build up a tree of ‘Filters’ to change what is shown and how. Each filter modifies the data or how it is represented. For example to smooth out (and lose detail) you might add a PointDatatoCellData filter to the dataset, then add a CellDatatoPointData filter to that. Or you can use the Glyph filter for a vector plot.

Paraview expects data on the cells and nodes to be either scalar, vector (2 or 3) , or tensor(2,2) or (3,3) . A glyph plot of stress (for example) will only come out right in 3D if the stress is a 3x3 tensor.

The ccx stress components are the lower triangle of the stress tensor which is {{Sxx, Sxy,Sxz},{Syz,Syy,Syz},{Szx,Szy,Szz}} where Sxy=Syz, etc. Formally, this quantity is the Cauchy stress tensor. It is symmetric. https://en.wikipedia.org/wiki/Cauchy_stress_tensor

I’m not sure whether when there are *ORIENTATIONS ccx maps stress to the global axes before writing.

What you might like to do is to export the stress and strain tensors as their own datasets, in addition to the specific quantities which ccx displays As a work-around, if I feel the need I can use the pv ‘Programmable Python Filter’ to build up the stress tensor from the six components. Thanks for a great utility! Peter

Peter Heppel Technology Fellow Studio Gang 1520 W. Division Street Chicago, IL 60642 +1 872 315 2211 +1 773 502 4336 cell +1 773 384 1212 studiogang.com<../../../../../dgraham/AppData/Local/Microsoft/Windows/INetCache/Content.Outlook/2324AUMM/studiogang.com>

This transmission may contain information that is privileged, confidential, or exempt from disclosure. If you are not the intended recipient, your disclosure, copying, distribution, or use of the information contained herein is prohibited. If you received this transmission in error, contact the sender and delete the material.

From: Ihor Mirzov notifications@github.com Sent: Saturday, August 1, 2020 6:25 AM To: calculix/ccx2paraview ccx2paraview@noreply.github.com Cc: Peter Heppel pheppel@studiogang.com; Author author@noreply.github.com Subject: Re: [calculix/ccx2paraview] not an issue - just a request (#13)

Dear Peter,

I don't believe in suspects. If ccx2paraview doesn't work for contiguous nodes/elements numbering, - please, attach some logs.

And yep, it's great to do things like 3D glyph plots. But how? Do you have an example model? I'm not a Paraview user.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/calculix/ccx2paraview/issues/13#issuecomment-667516662, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQOX6TY2C4NQU75EK4VUUVDR6P3SRANCNFSM4PQFZ32Q.

imirzov commented 4 years ago

stress

Dear Peter,

Now I'm working on version 3.0 of the converter and would like to implement your requested feature. Please, have a look on a test model - stress.zip - it has only one tet element with 4 stress tensors defined at each node. I do not understand what 3D-glyphs are visualizing? I expected 3 arrows per node - each arrow should be aligned to eigenvector of the stress tensor.

What I'm doing wrong? Please, could you post corrected VTU file with a screenshot of how 3D-glyphs should look like.

peterheppel commented 4 years ago

Dear Ihor,

The format of the vtu file looks correct. The only thing is that you need to use the TensorGlyph filter. I think you used the Glyph filter. I modified the stress to make it less uniform. Here is my vtu file and a paraview screenshot. Congratulations! This will be a big help. It opens up all sorts of things like streamline plots, as well as custom processing using Python. If there isn’t already a vonMises stress filter, for example, I could write one for you. Already there

Peter Heppel Technology Fellow Studio Gang 1520 W. Division Street Chicago, IL 60642 +1 872 315 2211 +1 773 502 4336 cell +1 773 384 1212 studiogang.com<../../../../../dgraham/AppData/Local/Microsoft/Windows/INetCache/Content.Outlook/2324AUMM/studiogang.com>

This transmission may contain information that is privileged, confidential, or exempt from disclosure. If you are not the intended recipient, your disclosure, copying, distribution, or use of the information contained herein is prohibited. If you received this transmission in error, contact the sender and delete the material.

From: Ihor Mirzov notifications@github.com Sent: Sunday, August 23, 2020 4:03 PM To: calculix/ccx2paraview ccx2paraview@noreply.github.com Cc: Peter Heppel pheppel@studiogang.com; Author author@noreply.github.com Subject: Re: [calculix/ccx2paraview] Export tensors as tensors (#13)

[stress]https://user-images.githubusercontent.com/4652710/90988416-e0ef8180-e592-11ea-8428-ebefe6e73191.png

Dear Peter,

Now I'm working on version 3.0 of the converter and would like to implement your requested feature. Please, have a look on a test model - stress.ziphttps://github.com/calculix/ccx2paraview/files/5114953/stress.zip - it has only one tet element with 4 stress tensors defined at each node. I do not understand what 3D-glyphs are visualizing? I expected 3 arrows per node - each arrow should be aligned to eigenvector of the stress tensor.

What I'm doing wrong? Please, could you post corrected VTU file with a screenshot of how 3D-glyphs should look like.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/calculix/ccx2paraview/issues/13#issuecomment-678824634, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQOX6T56MDFC2WZWD6TF3RTSCF7XTANCNFSM4PQFZ32Q.

imirzov commented 4 years ago

Sorry, Peter, Where are your files?

peterheppel commented 4 years ago

Peter Heppel Technology Fellow Studio Gang 1520 W. Division Street Chicago, IL 60642 +1 872 315 2211 +1 773 502 4336 cell +1 773 384 1212 studiogang.com<../../../../../dgraham/AppData/Local/Microsoft/Windows/INetCache/Content.Outlook/2324AUMM/studiogang.com>

This transmission may contain information that is privileged, confidential, or exempt from disclosure. If you are not the intended recipient, your disclosure, copying, distribution, or use of the information contained herein is prohibited. If you received this transmission in error, contact the sender and delete the material.

From: Ihor Mirzov notifications@github.com Sent: Tuesday, August 25, 2020 10:12 AM To: calculix/ccx2paraview ccx2paraview@noreply.github.com Cc: Peter Heppel pheppel@studiogang.com; Author author@noreply.github.com Subject: Re: [calculix/ccx2paraview] Export tensors as tensors (#13)

Sorry, Peter, Where are your files?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/calculix/ccx2paraview/issues/13#issuecomment-680085932, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQOX6TZZ353N2OIY4PLTYR3SCPICDANCNFSM4PQFZ32Q.

imirzov commented 4 years ago

Nope :(

Looks like you're using Outlook. Please, visit the thread and have a look on what you're posting.

peterheppel commented 4 years ago

<?xml version="1.0"?>

0 0 0 0 0 0 0 0 0 10 0 0 0 1 0 0 0 1 2 0 0 0 20 0 0 0 2 .3 0 0 0 3 0 0 0 30 0 0 1 1.4 1 2 1.4 1 0 0 2 1 0 1 2 3 4 10

[cid:image003.jpg@01D67AD4.223D0C90]

Peter Heppel Technology Fellow Studio Gang 1520 W. Division Street Chicago, IL 60642 +1 872 315 2211 +1 773 502 4336 cell +1 773 384 1212 studiogang.com<../../../../../dgraham/AppData/Local/Microsoft/Windows/INetCache/Content.Outlook/2324AUMM/studiogang.com>

This transmission may contain information that is privileged, confidential, or exempt from disclosure. If you are not the intended recipient, your disclosure, copying, distribution, or use of the information contained herein is prohibited. If you received this transmission in error, contact the sender and delete the material.

From: Ihor Mirzov notifications@github.com Sent: Tuesday, August 25, 2020 11:34 AM To: calculix/ccx2paraview ccx2paraview@noreply.github.com Cc: Peter Heppel pheppel@studiogang.com; Author author@noreply.github.com Subject: Re: [calculix/ccx2paraview] Export tensors as tensors (#13)

Nope :(

Looks like you're using Outlook. Please, visit the threadhttps://github.com/calculix/ccx2paraview/issues/13 and have a look on what you're posting.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/calculix/ccx2paraview/issues/13#issuecomment-680135584, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQOX6T5NO2B5HQPHV2YPLPTSCPRZLANCNFSM4PQFZ32Q.

peterheppel commented 4 years ago

Did you get the last? I in-lined the VTU and picture

Peter Heppel Technology Fellow Studio Gang 1520 W. Division Street Chicago, IL 60642 +1 872 315 2211 +1 773 502 4336 cell +1 773 384 1212 studiogang.com<../../../../../dgraham/AppData/Local/Microsoft/Windows/INetCache/Content.Outlook/2324AUMM/studiogang.com>

This transmission may contain information that is privileged, confidential, or exempt from disclosure. If you are not the intended recipient, your disclosure, copying, distribution, or use of the information contained herein is prohibited. If you received this transmission in error, contact the sender and delete the material.

From: Ihor Mirzov notifications@github.com Sent: Tuesday, August 25, 2020 11:34 AM To: calculix/ccx2paraview ccx2paraview@noreply.github.com Cc: Peter Heppel pheppel@studiogang.com; Author author@noreply.github.com Subject: Re: [calculix/ccx2paraview] Export tensors as tensors (#13)

Nope :(

Looks like you're using Outlook. Please, visit the threadhttps://github.com/calculix/ccx2paraview/issues/13 and have a look on what you're posting.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/calculix/ccx2paraview/issues/13#issuecomment-680135584, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQOX6T5NO2B5HQPHV2YPLPTSCPRZLANCNFSM4PQFZ32Q.

imirzov commented 4 years ago

Thank you, I've got code of the .vtu file. But no image - please, do not use mail clients. Post directly to GitHub here: https://github.com/calculix/ccx2paraview/issues/13

I've visualized your .vtu file - it doesn't seem to be useful for stress field analysis: tensor_glyph

peterheppel commented 4 years ago

Hi Ihor, That looks correct - and useful. Here is a fuller version ScreenshotParaview

imirzov commented 4 years ago

Looks like I've got it. Thank you! tadam A new release will be soon.

imirzov commented 4 years ago

Dear Peter,

Please, test new version: https://github.com/calculix/ccx2paraview/releases/tag/v3.0.0

peterheppel commented 2 years ago

Hi Ihor,

V 3.0.0 is really nice. I’ve been using it as standard so I can post-process my Calculix work in Paraview.

Here’s a suggestion: It would be great if you could include an integer scalar containing each element’s GROUP, or MATERIAL.

Another dataset which I find really useful is the element’s material tangent stiffness tensor. Easiest for the paraview user would be to provide it in the (deflected) global cartesian frame. This dataset is useful for checking input data for anisotropic materials, as well as for the stuff I do with inverse design of fields of this tensor. But it’s a lot more work to produce, especially with nonlinear materials. It’s almost as useful to see the highest principal value of the stiffness, as a scalar or a vector. (but for the vector you need to do the transformation)

Just thinking aloud. Thanks again for a great utility.

Peter

Peter Heppel Technology Fellow Studio Gang 1520 W. Division Street Chicago, IL 60642 +1 872 315 2211 +1 773 502 4336 cell +1 773 384 1212 studiogang.com<../../../../../dgraham/AppData/Local/Microsoft/Windows/INetCache/Content.Outlook/2324AUMM/studiogang.com>

This transmission may contain information that is privileged, confidential, or exempt from disclosure. If you are not the intended recipient, your disclosure, copying, distribution, or use of the information contained herein is prohibited. If you received this transmission in error, contact the sender and delete the material.

From: Ihor Mirzov @.> Sent: Sunday, August 30, 2020 3:42 PM To: calculix/ccx2paraview @.> Cc: Peter Heppel @.>; Author @.> Subject: Re: [calculix/ccx2paraview] Export tensors as tensors (#13)

Closed #13https://github.com/calculix/ccx2paraview/issues/13.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/calculix/ccx2paraview/issues/13#event-3707609126, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQOX6T5N2EVDN4KV26OAZULSDK2P5ANCNFSM4PQFZ32Q.

imirzov commented 2 years ago

Hi Peter, Thank you for using the utility. I'll save your suggestions to implements sometimes later.

peterheppel commented 2 years ago

Good to hear from you. If I get a chance I might try to add it.

Peter Heppel Technology Fellow Studio Gang 1520 W. Division Street Chicago, IL 60642 +1 872 315 2211 +1 773 502 4336 cell +1 773 384 1212 studiogang.com<../../../../../dgraham/AppData/Local/Microsoft/Windows/INetCache/Content.Outlook/2324AUMM/studiogang.com>

This transmission may contain information that is privileged, confidential, or exempt from disclosure. If you are not the intended recipient, your disclosure, copying, distribution, or use of the information contained herein is prohibited. If you received this transmission in error, contact the sender and delete the material.

From: Ihor Mirzov @.> Sent: Monday, April 18, 2022 8:20 AM To: calculix/ccx2paraview @.> Cc: Peter Heppel @.>; Author @.> Subject: Re: [calculix/ccx2paraview] Export tensors as tensors (#13)

Hi Peter, Thank you for using the utility. I'll save your suggestions to implements sometimes later.

— Reply to this email directly, view it on GitHubhttps://github.com/calculix/ccx2paraview/issues/13#issuecomment-1101403429, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQOX6TZLGDD5DQ3UIIYJPDTVFVOQNANCNFSM4PQFZ32Q. You are receiving this because you authored the thread.Message ID: @.**@.>>