CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

how to dump UDM surface data do text files at specified timesteps?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By tricha122
  • 1 Post By vinerm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 15, 2020, 12:14
Default how to dump UDM surface data do text files at specified timesteps?
  #1
Member
 
Tyler Richardson
Join Date: Jun 2017
Posts: 30
Rep Power: 9
tricha122 is on a distinguished road
Hi,

i am adapting a journal file and associated compiled script from pseudo-transient to full transient.

i am looking to store the UDM information as retrieved in the compiled script to a text file (as now i will want many instances of this data rather than once at the end)

is there a simple way to dump C_UDMI(c0,t0,0) to an array in a text file? I am not incredibly familiar with C, but my simple searches in the last hour or so suggest incrementing text file names (i.e. UDM1.dat, UDM2.dat ... etc) is not trivial..

any help would be greatly appreciated!
vavnoon likes this.
tricha122 is offline   Reply With Quote

Old   June 15, 2020, 16:24
Default Ascii
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
It is straightforward actually. Use File > Export > ASCII and select all UDMs that you want to write with a frequency that you want, say, every time-step or every 5th time-step.
vavnoon likes this.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   June 15, 2020, 18:04
Default
  #3
Member
 
Tyler Richardson
Join Date: Jun 2017
Posts: 30
Rep Power: 9
tricha122 is on a distinguished road
Quote:
Originally Posted by vinerm View Post
It is straightforward actually. Use File > Export > ASCII and select all UDMs that you want to write with a frequency that you want, say, every time-step or every 5th time-step.
Thanks!

Does this suggest that i need to switch from an execute-on-demand function to something that calculates every iteration?

is there a TUI command to do this so i can incorporate it into my journal?

THanks for all the help!
tricha122 is offline   Reply With Quote

Old   June 16, 2020, 04:58
Default Udf
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
An on-demand UDF can be executed either via GUI or via command. Or you could change ON_DEMAND to EXECUTE_AT_END and hook it. That would be executed at end of every iteration (or at the end of time-step if the case is transient). UDF will be updated accordingly. And you can use same frequency for writing ASCII files.

You can use journal to do both, call on-demand function and write ASCII files.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Reply

Tags
define_on_command, text, udf, udm


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
Run OpenFoam in 2 nodes of a cluster WhiteW OpenFOAM Running, Solving & CFD 16 December 20, 2016 01:51
[Gmsh] Error : Self intersecting surface mesh, computing intersections & Error : Impossible velan OpenFOAM Meshing & Mesh Conversion 3 October 22, 2015 12:05
saving Transient/Unsteady data of multiple surface integrals in single file ankur gupta FLUENT 0 February 22, 2012 14:59
Writing Case and Data Files Using Journal/Scheme Files svp Fluent UDF and Scheme Programming 0 April 5, 2011 12:04
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 21:51


All times are GMT -4. The time now is 18:34.