I’m not exactly new to CalculiX, but I’m struggling to find a reliable pre-to-post-processing workflow. Especially, how to post-process on surface sets.
My current workflow is:
Mesh created in Salome (volume + surface mesh groups)
Imported into PrePoMax, model prepared and solved
Results exported to ParaView either via
ccx2paraview, or
importing .frd into FreeCAD FEM and exporting to .vtu
I can open the .vtu in ParaView without issues. However, I cannot access named boundary surfaces (surface sets available in .inp file). In ParaView I only see the full volume mesh, not selectable boundaries like in OpenFOAM.
What I would like to do:
visualize normal heat flux on arbitrary boundaries
integrate / average heat flux (or other loads) over specific surfaces
ideally work with named surfaces, not purely geometric clipping
I am aware of *SECTION PRINT (which gives correct integrated values in the .dat file), but this feels not enough for visualization.
My questions to the community:
Is there a recommended workflow to make CalculiX surface sets accessible in ParaView?
Any insight or best-practice workflows would be greatly appreciated. (Please be gentle if I am asking a trivial question.)
You would need a multiblock dataset for ParaView to recognize CalculiX’s sets. However, the problem is that sets are not stored in the .frd files. You would have to somehow append them from the .inp file (likely only during conversion to VTK, which is not supported by the converters I know about), but it may not be easy.
I remember that I’ve seen this video some time ago. It is indeed intriguing. I have seen other similar contents where Cubit was used as pre-processor for CalculiX. However, if I understand correctly, cubit is a commercial software. I didnt mention in my initial comment, but I am looking for non-commertial approaches. (I intend to use it for cases larger than 50k elements)
@SergioP thank you for the response. I use tools/quary in results of PreProMax. It allows me to select some faces. But it feels not so capable. I couldn’t find how to interact with the surface sets - which are already created - in results. I intend to ask the same question in PPM forum, I do suspect that I’m not using perhaps the right tools of PPM.
However, paraview is way more powerful post-processing tool and there are already some methods which can import CCX results to paraview. I primarily wish to learn if there are any method where I can read CCX results in paraview, “with” the surface sets are available.
If you are using the Query –> Surface tool then that’s the correct approach. Alternatively, you can use section print, as you’ve already mentioned, but there are no other ways to visualize it in PrePoMax (apart from creating custom history and field outputs).
Sets and surfaces shown in the Results tab are taken from the model definition (they won’t appear if you just read the .frd file itself). And you can’t really do anything with them, they can be only highlighted.
ParaView gives you more options in terms of plot types (e.g. symbol/glyph plots), extractions and conversions, as well as advanced data processing (such as histograms). Unfortunately, named selections/regions are problematic there if your data is not structured properly in advance.
You could also try CalculiX’s native pre-/postprocessor GraphiX. It has some really handy tools and helps with automation. You can read .frd and .inp files there at the same time and work with sets, but export to VTK will likely remain the blocker issue.
I have to admit that I explored GraphiX very briefly.
I initially suspected that Query (or Query alone) might not be the correct approach, based on something I encountered recently.
I was performing a sanity check on a very basic benchmark case: transient heating of a sphere. The model is a half sphere, with:
convection applied on the outer (curved) surface
an adiabatic symmetry condition on the flat surface (no thermal load applied)
The case converged properly. I compared the center point temperature history with the analytical solution, and the agreement is excellent.
However, I expected the FLUX-ALL Query values (average / min / max / nodal sum) on the symmetry surface to be exactly zero, since this boundary is adiabatic. Instead, I observed clearly non-zero values.
After looking more closely, I realized that FLUX-ALL represents the magnitude of the heat-flux vector, not its normal component. Therefore, querying or visualizing FLUX-ALL on that surface does not correspond to the normal heat flux.
In short, my goal was to visualize the normal heat flux on a defined surface set in PreProMax,but I failed. I thought it would be amazing to be able to read the case into paraview, including the surface sets. Then one can do all kinds of integration, visualization etc.
That’s right, you would need to show the proper component of the FLUX field (1, 2 or 3) which happens to be normal to that flat surface. Then the Query tool will use it for integration.
In my particular case, the surface I wanted to inspect was flat and perfectly aligned with the z-plane, but of course this is rarely the case in general.
I assumed there should be a way to visualize the magnitude of the normal heat-flux component (or perhaps I simply couldn’t find it).
A related (but slightly separate) issue is the following: when I query F3 on this adiabatic surface, the average value is indeed small, but not exactly zero. I would expect a perfect 0 or something on the order of 1e-7 or smaller, but I observe values closer to 1
This is still about three orders of magnitude smaller than the maximum heat-flux values in the domain, so it is clearly “small” in a relative sense — but I am trying to understand why it is not very-zero for an adiabatic boundary (apologies for the informal wording). Probably I see the values calculated on element and not on boundary. But I did hope to see a shiny Zero.
Any insight into whether this behavior is expected from CalculiX / PrePoMax, or whether I am misinterpreting the queried quantities, would be greatly appreciated. How do I deal with surface values?
You could try transforming the results to local coordinate system. Only rectangular and cylindrical coordinate systems are supported though (Abaqus also has spherical coordinate systems).
Try querying nodes on that surface - see if those are individual points with higher values, edge of the surface or maybe the whole surface has uniform values.
If its for a single time use, you could get a trial license to handle the export limit. If you are doing commercial work i would rather view cubit as big time saver tool and calculate the costs into the hours you sell.
Another possibility would be to only use the converter. You can import any mesh size and if you got results you can link and convert them to paraview without interference of the 50k export limit. I got a short example here.