Histogram information

Dear Developers!
I used histogram to grab more info about different variables.
as figure attached.

On x-axis of figure there is orientation. I have question about the unit of this variable. As I am unable to understand that variable.
Thanks.

I think the orientation is a unit vector, and you are looking at the x-component of it, which ranges from -1 to 1.

Is there any way to relate/convert orientation vector with degree or radian?

Converting components into angles is basic trig, something like

atan2(y, x)

I have query regarding orientation of particles at the end of simulation.

  1. I have 3 dim domain, in which flow of gas in y direction (XZ plane). I am confuse, which axis will be used as reference axis to predict the orientation of particles.
  2. Is it means that -1 equals to -90 degree and 1 equals 90 degree?
    Your insight will be highly appreciated.
    Thanks

I’m not sure what you mean by “reference axis”.

The orientation is a vector, it has 3 components. The plot you posted is the x-component.

Orientation vector of (x,y,z) = (1,0,0) means it is pointing along the x-axis in the positive direction
Orientation vector of (x,y,z) = (-1,0,0) means it is pointing along the x-axis in the negative direction

You need to look at all 3 components to determine the angle.

Also note that for a particle shape which is not rotationally symmetric, the orientation vector does not completely determine the particle’s orientation - you need to look at the quaternion. (Fully describing the particle orientation requires an axis and a rotation about that axis. For rotationally symmetric bodies the rotation about the axis is irrelevant and can be ignored).

Please attach your project files if you have further questions.

1 Like

Sir @cgw you are right.
Actually, I’m interested to find out the orientation in degree (at x-axis between 0 to 90) of non-spherical particles at the end of sim and present them as histogram. Just as

I am confuse how I can proceed further. My case file attached for your insight.
ar1.67_2023-08-22T085910.703684.zip (9.5 MB)

The projection of the orientation vector on the x-axis is just cos(θ) where θ is the angle between the vector and the x-axis (since orientation is a unit vector), so I think you just need to use the “acos” function to get the angle.

1 Like

Thanks for your insight.
Here the obtained angle will be in radian or degree.?

Arccos function usually returns radians.

1 Like

@cgw hopefully you are fine.
In above picture we have orientation at specific time step (as we select vtk write time). Is there any way to take time average particle orientation throughout the simulation.?

As far as I know, MFiX has time-averaging for monitors but not for histograms. (And furthermore particle orientation is not available on the monitors menu… perhaps this should be added.) So you cannot do this directly in MFiX.

It’s possible you could do this in Paraview but I’m not sure.

If Paraview doesn’t do it, you’re going to have to write some code to extract data from the PVD files and do the time-averaging yourself. I suggest Python for this.
See for example Saving data as .csv files for some example code.

1 Like