How to output the user-defined vector in .vtp?

hello everyone.
Based on the Discrete element model(DEM), I am trying to output the total force of each particle (FC(:,:slight_smile: in MFIX code) to see the force direction on particles, just like the particle velocity.
And I want to output it by using the array ORIENTATION, so what i do is replacing the array ORIENTATION by FC in file vtp_mod.f, as is shown as below.


while the problem is the output data of FC is zero.
So how can i modify the code and realize this operation?

1 Like

FC is reset to zero after being used in cfnewvalues.f. Not sure what is the side effect if you don’t reset it to zero there. Maybe you can store it into another variable. You may be able to use the ORIENTATION array and comment out its update (it is only used for visualization).

1 Like

Thanks very much. I got it.