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

Coordinate Systems and Vector Field Function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2019, 01:23
Default Coordinate Systems and Vector Field Function
  #1
cwl
Senior Member
 
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 435
Rep Power: 17
cwl is on a distinguished road
Hi,

Let's say we've got two coordinate systems: default - "Laboratory" and a user-created one - "Coordinate System 1".

What I'm not getting:

1) How would I set a Vector Field Function with components [x, y, z] in Coordinate System 1?

2) If i know components [x, y, z] of a Vector in Coordinate System 1 - how can I obtain it's components in Laboratory coordinate system?

PS Copying data from Coordinate System properties and using it in Field Fuctions as constants is not a way, since Coordinate System 1 can be set on the body in CAD model and it's position can be changed.
cwl is offline   Reply With Quote

Old   May 21, 2019, 17:40
Default
  #2
Senior Member
 
Matt
Join Date: Aug 2014
Posts: 947
Rep Power: 17
fluid23 is on a distinguished road
1) That is somewhat dependent on what you are trying to define. Do you have discrete XYZ values that you want to prescribe and the interpolate to the rest of the domain?
Is it a constant vector everywhere? Is it a function of other vector field functions that are already defined?

In general, Right-click the 'Tools > Field Functions' node and select 'New > Vector Function'. Where you go from there depends on what you want to do. For example, if you wanted to define a constant global vector in the Y direction you could define your function as [0,1,0]. If you wanted to get the normal force due to pressure you might define $StaticPressure*$$Area[].

2) If you already have a function defined and you want to change to a different coordinate system, you call (@CoordinateSystem("csys name"). For example, you can report position in the cylindrical csys as, $$Position(@CoordianteSystem("Laboratory.Cylindric alSystem")).

Last edited by fluid23; May 22, 2019 at 09:27.
fluid23 is offline   Reply With Quote

Old   May 23, 2019, 21:02
Default
  #3
cwl
Senior Member
 
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 435
Rep Power: 17
cwl is on a distinguished road
Hi fluid 23

Thank you for your reply :>

Quote:
Originally Posted by fluid23 View Post
Do you have discrete XYZ values that you want to prescribe and the interpolate to the rest of the domain?
It's not about interpolation. Just imagine that I've got a constant vector which components I know for Coordinate System 1 - and I want to obtain its components in Laboratory.

Quote:
Originally Posted by fluid23 View Post
Is it a constant vector everywhere?
Is it a function of other vector field functions that are already defined?
In general theese cases should not be different.


Quote:
Originally Posted by fluid23 View Post
In general, Right-click the 'Tools > Field Functions' node and select 'New > Vector Function'.
Where you go from there depends on what you want to do. For example, if you wanted to define a constant global vector in the Y direction you could define your function as [0,1,0].
If you wanted to get the normal force due to pressure you might define $StaticPressure*$$Area[].
What if I want to define a constant vector in the Y-direction of Coordinate System 1, not Laboratory? - How do I set it?

Quote:
Originally Posted by fluid23 View Post
2) If you already have a function defined and you want to change to a different coordinate system, you call (@CoordinateSystem("csys name").
For example, you can report position in the cylindrical csys as, $$Position(@CoordianteSystem("Laboratory.Cylindric alSystem")).
Exactly - it changes to a different coordinate system from Laboratory.
Thus $$Vector1(@CoordianteSystem("Laboratory.Cylindrica lSystem")) works in a way that it treats Vector1 components as if they were set in global (Laboratory) coordinate system - and returns components of Vector1 in CylindricalSystem.

Bot how would I change Vector's components known in different coordinate system to Laboratory?
cwl is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 17:30.