CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [OpenFOAM] Paraview calculating moment (https://www.cfd-online.com/Forums/paraview/205102-paraview-calculating-moment.html)

Aedun August 9, 2018 06:11

Paraview calculating moment
 
Hello

i would like to calculate in paraview moment around some point. I can calculate forces using calculator for each cell and then integrate it. I imagine that if i calcuate distance of each cell to that point and than use it as arm for moment and integrate it will work. But dont how to to do it exactly.

Can you help please ?
Thanks a lot

kandelabr August 9, 2018 06:46

Since torque is r x F you only need r vectors; that would be coords - (Px*ihat + Py*jhat + Pz*khat), if point P(Px, Py, Pz) is your center of rotation. Coords is a vector field available in calculator.

Then you only need a cross product of your calculated forces and r vectors. I believe there's a cross() function in calculator.

But are you sure you want to use ParaView?
I was wrestling with it for a while but then switched to postprocessing in openFoam. Add something like that to controlDict:

Code:

    forces_impeller
    {
        type    forces;
        libs    ("libforces.so");
        patches (impeller_walls);

        rho    rhoInf;
        rhoInf  1000;

        CofR (0 0 0);
    }

If you really need to display the values in paraview you would then need to write a python filter that reads postprocessing data according to current timestep. But that's a completely different problem... :)

Krao October 28, 2019 04:50

Hi Ondrej Novak,

Quote:

Originally Posted by Aedun (Post 702072)
Hello

i would like to calculate in paraview moment around some point. I can calculate forces using calculator for each cell and then integrate it. I imagine that if i calcuate distance of each cell to that point and than use it as arm for moment and integrate it will work. But dont how to to do it exactly.

Can you help please ?
Thanks a lot

Did you figure out how to find the moments using paraview? I have calculated the forces but unable to find the moments. It would be great if you can shed some light on this problem.

Thank you

nik002 October 29, 2019 13:15

Paraview
 
Hello, I also have a problem finding the points calculator but mine is a bit different.
Well I have a simulation of a sphere (tumor) that is growing in a host tissue for a specific time. I want to set a point outside the sphere and calculate different variables like IFP, IFV, THP etc. while the sphere is growing and see how the variable in that point will change. I want my point to be stable ( fixed coordinates x,y,z) and after the calculation I want to plot graphs of each variable.


All times are GMT -4. The time now is 02:43.