|
[Sponsors] |
August 25, 2004, 14:56 |
XYZ Coordinate
|
#1 |
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 |
|
August 26, 2004, 00:33 |
Re: XYZ Coordinate
|
#2 |
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 |
|
August 26, 2004, 04:27 |
Re: XYZ Coordinate
|
#3 |
Guest
Posts: n/a
|
Jeff:
Many thanks for your help! RK |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
cylindrical coordinate vs cartesian coordinate | Lam | FLUENT | 10 | May 11, 2013 14:05 |
CFD Software with Cylindrical and Spherical Coordinate | cfd2010 | Main CFD Forum | 0 | June 9, 2010 22: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 08:41 |