CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Saving variables on a user patch with physical coordinates (

Zoltan Turzo April 19, 2000 12:19

Saving variables on a user patch with physical coordinates
Dear CFX Users!

I have the following problem I would like to solve: (I am using CFX 4.2 on Windows NT, so I have CFX-view and CFX TascFlow as post processor.) I am simulating a gas flow trough a valve. The valve-stem tip has a half-sphere shape, the seat is conical. I defined a user patch for the surface of the valve stem tip. So I can plot the variables on the surface of the stem tip. But I would like to use these variables in other programs. So is it possible to write out this variables with its physical coordinates (X, Y, Z). (I know that these variables are printed in the output file, but there the coordinates are only in I,J, K form. Additionally, if you have patches including several blocks it is very difficult to find out the values you need. And as I think After you finding the values, you have to convert them to physical coordinates as well. ) So, has anybody some good solution?

Thank You in advance!

Best Regards Z. Turzo

Hyun S. Lee April 19, 2000 20:39

Re: Saving variables on a user patch with physical coordinates
Dear Z. Turzo

In my case, I did similar works related with dump files, however rather complex one.

May be there are RDFIL and RDFILH in your CFX directory, which are used for read dump file variables and headers respectively.

I think the "XNN" variable stack may contain XC(vertices) and XP(center of cell). and the "Variable" stack contain whole variables encompassing what you want.

In your pc, rdump.f file may help you to understand the structure of CFX dump file.(If you do not have, email me. I'll send you one. but SGI version) Solver manual also contain many useful information(chapter 9)

Good luck!! If you find easier and authentic methodology, please post it.

Hyun S. Lee

Jan Rusås April 20, 2000 15:05

Re: Saving variables on a user patch with physical coordinates
Dear Z. Turzo

I think there is several ways of doing what you want, but here is a method I have used.

You can access the values on any patch by using USRBCS (file for user boundary conditions) Instead of printing out the values on every iteration, or every time step you can create a copy of your command file where you include user fortran and usrbcs and set iterations to zero and do a restart on the final dump file. Look in the usrbcs file in the CFX directory or in the manual how you access the values on a patch. Instead of assigning a value to the patch, you just printout the values you need and the physical coordinates xp(inode..etc You can also use the userflows.f in the extras directory but it is a bit more tricky to use that one.

It is also possible to find variables with physical coordinates directly in any cell, I recommend using the usrsrc file for that.

Regards Jan Rusås

All times are GMT -4. The time now is 11:36.