CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

set up local coordinate

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2014, 17:09
Default set up local coordinate
  #1
Member
 
Hao Chen
Join Date: Aug 2014
Posts: 66
Rep Power: 0
hchen is on a distinguished road
Hi All:

I have a question about the local coordinate set up. Say I want to set up a local Cartesian coordinate based on two unit vectors: e1 as local x and e2 as local y. The third one should be determined by right hand rule.

Should it be something like:
Code:
        const coordinateSystem localCS_
              (
                  "localCS",
                  vector(0,0,0),
                  e1,
                  e2
              );
I can not understand the constructors of a coordinate system. It seems that they need a axis and a direction, but what is the direction of a coordinate system?

Best regards
Hao
hchen is offline   Reply With Quote

Old   December 17, 2014, 04:42
Default
  #2
Senior Member
 
Jens Höpken
Join Date: Apr 2009
Location: Duisburg, Germany
Posts: 159
Rep Power: 17
jhoepken is on a distinguished road
Send a message via Skype™ to jhoepken
The constructor needs a name and an origin, both should be fairly straight forward to understand. However, the next two vectors are e1 and e3, which are used to compute e2. I don't get what you mean by "direction" of a coordinate system.
__________________
Blog: sourceflux.de/blog
"The OpenFOAM Technology Primer": sourceflux.de/book
Twitter: @sourceflux_de
Interested in courses on OpenFOAM?
jhoepken is offline   Reply With Quote

Old   December 19, 2014, 17:37
Default
  #3
Member
 
Hao Chen
Join Date: Aug 2014
Posts: 66
Rep Power: 0
hchen is on a distinguished road
Hi Jens:

I mean that should it be:

Code:
        const coordinateSystem localCS_
              (
                  "localCS",
                  vector(0,0,0),
                  e1,
                  e3
              );
or

Code:
        const coordinateSystem localCS_
              (
                  "localCS",
                  vector(0,0,0),
                  e3,
                  e1
              );
hchen 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 06:55
how to set initial velocity field expressed with cylindrical coordinate lujianfang OpenFOAM 0 November 14, 2013 01:09
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07


All times are GMT -4. The time now is 07:47.