HI @Matteo
How do you compute that ?
Best,
I use paraview for Windows. I opened the two .vtk files, then I visualize Von Mises stress. After that I should use a programmable filter, suggested on a previous topic, but it doesn’t work.
Hi @Matteo ,
Ok, but what computation would you like to do ? How do you want to combine the files ?
Best,
I would like to merge the stress tensor components, in order to visualize the resultant stresses. I don’t know if it’s correct.
This is a shot in the dark (because I think we are all still confused about what “merge the stress tensor components” means), but if you need to combine data from two .vtk files, perhaps the Append Attributes
filter will do what you want. See this for more discussion: Difference between 2 Datasets
Basically, the OP is looking for something like this but one of his 2 data sets contains modified geometry/mesh: Results superposition
Exactly
If the meshes of the 2 datasets don’t match, then you can use Resample with Dataset
to map the field from one dataset to another dataset.
I tried, following this tutorial: ParaView map, resample, and combine different datasets [On Demand 3] - YouTube
But it didn’t work
these are the two .vtk files, as you can see they differ from the bearings. I want to ‘‘sum’’ the von mises stresses for every single point(the components of the stress tensor, von mises stress is a scalar value) of the two different analysis, and visualize the result.
Can you elaborate on what happened and what went wrong? Were the results not as expected? What were the results? Did ParaView crash? Was there a rip in the space-time continuum? Did ParaView try to sell you an extended car warranty?
The description so far still sounds like combining the data with resampling. If we don’t know what goes wrong and don’t have the data there is not much we can do.
What I expected was to visualize at the same time the red internal ring (high stress value) of the first pic and the white portion around the upper hole (considerable stress value) of the second one (the pics are shown in the previous reply).
So, if it ran correctly, I would see ONE assembly with both remarkable values (I took them as an example, the stresses on every point should be the sum). It isn’t what I get.
It would be a lot easier to help you if you could share your data.
I can think of a couple of ways you might be able to achieve this. One would be to combine the fields with Resample with Dataset
as described before and then use the Calculator
filter to find the maximum between the two von mises fields.
These are the .vtk files:
Yes, combining the fields of the two datasets into one and then taking the max seems to do the trick. (There were a few steps to first rename, then resample, and then append the fields.
Here is a state file of what I did:
max-von-mises.pvsm (1.1 MB)
As I can see from the pic,it is exactly what I wanted, thank you. I have a few question after opening the file, beacuse it’s the first time I face Paraview:
1- How are applied the different ‘‘Append attributes’’? I would like to know the steps, especially for the last one, and the difference with the other with an arrow;
2-As I can see, the calculator finds the max value for every point. But can be eventually summed A von mises and B von mises?
Thank you for your patience.
Here are the full steps of what I did:
PassArrays
to both A and B inputs and remove all the arrays except for von Mises Stress
. This is optional, but made things a little easier later.RenameArrays
to both A and B pipelines to rename the fields to A von Mises Stress
and B von Mises Stress
, respectively. This makes it possible to differentiate the two arrays as we start combining the fields into one mesh.Resample With Dataset
filter. Set the Source Data Arrays
input to the A pipeline and the Destination Mesh
to the B pipeline. I chose the B pipeline for the destination mesh because there are small parts of the A mesh outside of the B mesh, so the resample worked better to apply to the B mesh.Resample With Dataset
now has A von Mises Stress
on the B mesh. To get the B fields back, select both the ResampleWithDataset
and the RenameArrays
for the B pipeline in the pipeline browser and add the Append Attributes
filter. This will combine both fields into a single mesh, which is the whole point of this exercise.Calculator
filter to AppendAttributes
. To get the max stress, set the expression to max("A von Mises Stress", "B von Mises Stress")
. To get the sum, set the expression to "A von Mises Stress" + "B von Mises Stress"
.Hello, again. I am trying to sum every stress component. So, I started with the ‘‘xx stress’’. I did the same steps you suggested, but it ends with an error:
test_1.pvsm (1.1 MB)
You have the Resample With Dataset
filter attached to the wrong inputs. It should be attached to the Rename Arrays
filters, but instead it is directly attached to the readers. Because of this, it is not getting the A_xx
named array.
Here is a fixed state file:
test_1_fixed.pvsm (1.1 MB)
Thank you. I have a very last question. I would like to implement this equation on paraview:
where, for example, σyy is, the sum of the y-stresses of the two cases A&B, of the following save state:
SCRIPT_CORRECT_STRESS.pvsm (1010.4 KB)
Is there a better way than writing on calculator: sqrt(0.5*(((A_YY+B_YY)-(A_ZZ+B_ZZ))^2+… ?
Isn’t it better to sum von Mises stresses directly ?