|
[Sponsors] |
August 21, 2012, 18:14 |
Coordinate System Orientation
|
#1 |
Member
Ryan Coe
Join Date: Jun 2010
Location: Albuquerque, NM
Posts: 98
Rep Power: 16 |
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
__________________
Ryan |
|
August 22, 2012, 07:04 |
|
#2 |
Senior Member
siamak rahimi ardkapan
Join Date: Jul 2010
Location: Copenhagen, Denmark
Posts: 220
Rep Power: 18 |
Have you tried to generate a new coordinat system, and then use that coordinate system in the field funtion?
|
|
August 22, 2012, 08:59 |
|
#3 |
Member
Ryan Coe
Join Date: Jun 2010
Location: Albuquerque, NM
Posts: 98
Rep Power: 16 |
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
__________________
Ryan |
|
August 22, 2012, 09:15 |
|
#4 |
Member
Join Date: Mar 2009
Posts: 85
Rep Power: 17 |
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 |
|
August 22, 2012, 09:28 |
|
#5 |
Member
Ryan Coe
Join Date: Jun 2010
Location: Albuquerque, NM
Posts: 98
Rep Power: 16 |
Yes, I've noticed that. If I could only get those numbers into my field function, I'd be happy. Any ideas?
Thanks, Ryan
__________________
Ryan |
|
August 28, 2012, 20:47 |
|
#6 |
Senior Member
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22 |
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.
__________________
We do three types of jobs here: GOOD, FAST AND CHEAP You may choose any two! |
|
January 31, 2013, 17:17 |
|
#7 |
Member
Ryan Coe
Join Date: Jun 2010
Location: Albuquerque, NM
Posts: 98
Rep Power: 16 |
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())
__________________
Ryan |
|
November 4, 2014, 04:46 |
|
#8 |
New Member
Bernardo Vieira
Join Date: Apr 2011
Location: USA
Posts: 7
Rep Power: 15 |
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. |
|
Tags |
coordinate system, field function, orientation, overset mesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
local coordinate system for porousZone | Nico A. | OpenFOAM Programming & Development | 0 | November 15, 2011 05:32 |
Creating Coordinate System | ashtonJ | CFX | 0 | February 17, 2011 22:07 |
Coordinate System | selim | CFX | 1 | October 26, 2007 22:08 |
On Coordinate system used in Fluent | varghese | FLUENT | 9 | March 22, 2002 12:16 |
Coordinate system | Franch | Siemens | 2 | March 6, 2002 08:56 |