# Coordinate Systems and Vector Field Function

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

 May 18, 2019, 02:23 Coordinate Systems and Vector Field Function #1 Senior Member   Chaotic Water Join Date: Jul 2012 Location: Elgrin Fau Posts: 374 Rep Power: 15 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.

 May 21, 2019, 18:40 #2 Senior Member   Matt Join Date: Aug 2014 Posts: 929 Rep Power: 16 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 10:27.

May 23, 2019, 22:02
#3
Senior Member

Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 374
Rep Power: 15
Hi fluid 23

Quote:
 Originally Posted by fluid23 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 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 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 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?