Coordinate System Orientation
Does anyone know how to get the relative orientation of a local coordinate system in a field function?
I have an overset region in my simulation, which rotates at an arbitrary rate (will eventually be controlled by a macro). I'd like to get the orientation of that region directly (without integrating the rotation rate over time). I thought I could use something with the $$Centroid or $$Position functions, possibly in conjunction with the cross product function, but just get zeros. Any thoughts? Thanks, Ryan |
Have you tried to generate a new coordinat system, and then use that coordinate system in the field funtion?
|
Yes. I've created a local coordinate system that is "managed" by the rotation motion (it rotates according to that motion).
So I have a coordinate system that is rotated, and the lab coordinate system to which I would like to find its relative orientation, but haven't figured out a field function to do so. Ryan |
Hi,
You can find the relation between user created coordinate system and lab coordinate system. You should open the edit menu of the coordinate system you created. Then you will find the center coordinates and the relative angles of it. Regards |
Yes, I've noticed that. If I could only get those numbers into my field function, I'd be happy. Any ideas?
Thanks, Ryan |
When you anyway do it with a macro, you can get the orientation from the coordinate system by the macro. Then you can either process it directly in the macro or the macro can put it in the field function.
|
I finally came back to this issue... As abdul points out, doing this in a macro is much easier.
Code:
angle = Vector3D.angle(rudderCsys.getBasis0().toDoubleArray(), bodyfixedCSys.getBasis0().toDoubleArray()) |
Hi Ryan,
I see that you figured a way of extracting the orientation of the coordinate system within a macro (java file). However, I need to calculate the orientation at every time step (or at every X time-steps) and then export these values on a table. My macros don't allow me to perform activities during run time, except if I define field functions and tables. Any ideia on how to do define a field function that extract that orientation? Thanks a lot. |
All times are GMT -4. The time now is 05:34. |