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

XYZ Coordinate

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 25, 2004, 13:56
Default XYZ Coordinate
  #1
RK
Guest
 
Posts: n/a
Hello:

I am using USTRN to write out Temperature values at all nodes in particular a block. With these temperature values, I would also like to write the X, Y, & Z values (which are distances and therefore it should be in units of meters) at the corresponding temperature value. Thus the output file created would look like as shown below; four column with particular values.

X/ Y/ Z/ T/

0.0/ 0.0/ 0.0/ 2.0E-03

I hope this makes some sense. Does any one know how to do the above?

Thanks in advance.

RK
  Reply With Quote

Old   August 25, 2004, 23:33
Default Re: XYZ Coordinate
  #2
Jeff
Guest
 
Posts: n/a
Assuming that your are speaking of using USRTRN in CFX-4.....

Loop over the nodes in the block, or 3D Patch (this is the recommended method then you can re-block if you want to). Then access the arrays XP,YP,ZP to get the three coordinates of the cell center. Temperature is in the T array......

CALL IPALL('PATCH NAME','USER3D','PATCH','CENTERS',IPT,NPT,CWORK,IWO RK)

IPHASE = 1

DO I = 1,NPT ! Loop over all cells INODE = IPT(I) ! Get node index X = XP(INODE) ! Get X coordinate Y = YP(INODE) ! Get Y coordinate Z = ZP(INODE) ! Get Z coordinate TEMP = T(INODE,IPHASE) ! Get Temperature value WRITE(*,*) X,Y,Z,TEMP ! Write values out ENDDO

If you must loop over the block (instead of a USER3D patch) then use IPREC instead of IPALL (different parameter list), but you can only do one block at a time. I suggest you get in the habit of defining USER3D patches for your regions of interest as they can cover multiple blocks.

Jeff
  Reply With Quote

Old   August 26, 2004, 03:27
Default Re: XYZ Coordinate
  #3
RK
Guest
 
Posts: n/a
Jeff:

Many thanks for your help!

RK
  Reply With Quote

Reply

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
cylindrical coordinate vs cartesian coordinate Lam FLUENT 10 May 11, 2013 13:05
CFD Software with Cylindrical and Spherical Coordinate cfd2010 Main CFD Forum 0 June 9, 2010 21:55
Cording Ground.for in Cylindrical coordinate J.H. Lee. Phoenics 2 March 28, 2003 05:28
coordinate frame Jackie CFX 2 March 6, 2003 01:22
Coordinate transforms and finite volumes Tony Keating Main CFD Forum 4 September 8, 2000 07:41


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