Home › Forum › SOFA › Using SOFA › List of all available fields for VTKExporter?
Tagged: 64_bits, Linux_ubuntu, SOFA_1706
- This topic has 3 replies, 2 voices, and was last updated 7 years, 2 months ago by Hugo.
-
AuthorPosts
-
4 October 2017 at 15:25 #10031MPfeifferBlocked
Hi,
I want to export data each frame using the VTKExporter. So far, I have been able to export the velocity, rest_position and dofs.force. I was wondering if there are more fields which I can export and if there is a list of all the available fields. More specifically, I’d like to export the acceleration and the derivative of the force with respect to time (df/dt) at each vertex. The documentation on state-vectors states that the Mechanical Object holds the acceleration as well, but I cannot find a way to export it. The following doesn’t work, for example (can’t find the field “dofs.acceleration”:
<VTKExporter name="vTKExporter" listening="true" filename="Sim/output" edges="1" triangles="1" quads="1" tetras="1" hexas="1" exportEveryNumberOfSteps="1" pointsDataFields="dofs.velocity dofs.rest_position dofs.acceleration dofs.force" />
Are the only fields which I can export those which are listed in the GUI when I right-click on the mechanical object and chose “Show Data”? If so, is there an easy way to get access to the acceleration?Thanks,
Micha4 October 2017 at 16:38 #10032HugoKeymasterHi Micha,
Yes, only data visible in the GUI can be exported.
That’s most the data of the MechanicalObject. To compute the acceleration (you can’t access it by default), you can use the velocity field v(t) at the current time step and the v(t-dt) at the previous time step and compute : a(t) = (v(t)-v(t-dt)) / dtAbout the export of the force, one question : is your force solved explicitly ?
Best,
Hugo
6 October 2017 at 11:04 #10038MPfeifferBlockedHi Hugo,
All right, the way you describe how to get the acceleration was actually the way I was using so far, I just wasn’t sure if this would let me get the acceleration at the highest possible resolution or if it’s just an approximation and SOFA has a better representation of it somewhere.
As for the force: I’m using an EulerImplicitSolver and a CGLinearSolver to solve the problem. So far I’ve been using the same method as the one you mentioned for the acceleration: f(t)/dt = (f(t) – f(t-dt))/dt
Thanks,
Micha_6 October 2017 at 14:06 #10040HugoKeymasterHi Micha,
as you know for the EulerImplicit integration scheme, you can write the derivatives (v and a) of the position as:
v_{t+h} = v_t + h a_{t+h}
You can therefore write:
a_{t+h} = (v_{t+h} – v_t) / h
or
a_{t} = (v_{t} – v_{t-h}) / hwhere h = dt. This is therefore the analytical value of the acceleration. This is not an approximated value of the acceleration.
Best,
-
AuthorPosts
- You must be logged in to reply to this topic.