CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

How to get the spacial poisiton

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

LinkBack Thread Tools Display Modes
Old   May 12, 2010, 14:59
Default How to get the spacial poisiton
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 12
benk is on a distinguished road
Is there an easy way to get the spacial position of a node?

For example, on a 2D mesh that's 1m x 1m, I need to multiply a diffusivity by its distance between the current location on the mesh and from the origin (ie. x=0,y=0,z=0).

So I need something like:

forAll(diffusivity, i) {
    diffusivityNew[i] = diffusivity*distance_x[i]*distance_y[i];
I'm not sure how to get the distance_x[i] and distance_y[i] parts.
benk is offline   Reply With Quote


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
monitoring spacial variation of a quantity James FLUENT 1 January 10, 2008 10:45
udf with spacial and time variables hongxiao FLUENT 6 March 17, 2005 23:46
creat a spacial plane llunchun Phoenics 4 December 18, 2002 04:02

All times are GMT -4. The time now is 06:32.