CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > STAR-CCM+

Coordinate System Orientation

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By ryancoe

Reply
 
LinkBack Thread Tools Display Modes
Old   August 21, 2012, 17:14
Default Coordinate System Orientation
  #1
Member
 
Ryan Coe
Join Date: Jun 2010
Location: Albuquerque, NM
Posts: 98
Rep Power: 7
ryancoe is on a distinguished road
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
ryancoe is offline   Reply With Quote

Old   August 22, 2012, 06:04
Default
  #2
Senior Member
 
siara817's Avatar
 
siamak rahimi ardkapan
Join Date: Jul 2010
Location: Copenhagen, Denmark
Posts: 218
Rep Power: 9
siara817 is on a distinguished road
Have you tried to generate a new coordinat system, and then use that coordinate system in the field funtion?
siara817 is offline   Reply With Quote

Old   August 22, 2012, 07:59
Default
  #3
Member
 
Ryan Coe
Join Date: Jun 2010
Location: Albuquerque, NM
Posts: 98
Rep Power: 7
ryancoe is on a distinguished road
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
ryancoe is offline   Reply With Quote

Old   August 22, 2012, 08:15
Default
  #4
Member
 
Join Date: Mar 2009
Posts: 85
Rep Power: 8
husker is on a distinguished road
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
husker is offline   Reply With Quote

Old   August 22, 2012, 08:28
Default
  #5
Member
 
Ryan Coe
Join Date: Jun 2010
Location: Albuquerque, NM
Posts: 98
Rep Power: 7
ryancoe is on a distinguished road
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
ryancoe is offline   Reply With Quote

Old   August 28, 2012, 19:47
Default
  #6
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 637
Rep Power: 12
abdul099 is on a distinguished road
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!
abdul099 is offline   Reply With Quote

Old   January 31, 2013, 17:17
Default
  #7
Member
 
Ryan Coe
Join Date: Jun 2010
Location: Albuquerque, NM
Posts: 98
Rep Power: 7
ryancoe is on a distinguished road
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())
crevoise likes this.
__________________
Ryan
ryancoe is offline   Reply With Quote

Old   November 4, 2014, 04:46
Default
  #8
New Member
 
Bernardo Vieira
Join Date: Apr 2011
Location: USA
Posts: 7
Rep Power: 6
bvieira is on a distinguished road
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.
bvieira is offline   Reply With Quote

Reply

Tags
coordinate system, field function, orientation, overset mesh

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 21:08
On Coordinate system used in Fluent varghese FLUENT 9 March 22, 2002 12:16
Coordinate system Franch CD-adapco 2 March 6, 2002 08:56


All times are GMT -4. The time now is 12:59.