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 save parameter in each time step without deleting pervious time step data

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

Like Tree3Likes
  • 1 Post By jps115
  • 1 Post By jps115
  • 1 Post By shedo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2022, 17:35
Default how to save parameter in each time step without deleting pervious time step data
  #1
New Member
 
sheida
Join Date: Mar 2021
Posts: 10
Rep Power: 3
shedo is on a distinguished road
hello experts,
I want to save and write one of my defined parameters in a file in each time step without deleting the previous steps' data because I want to compare this parameter in each step. Can anyone help me to know how to save this data by UDF?
shedo is offline   Reply With Quote

Old   April 9, 2022, 07:30
Default
  #2
New Member
 
Jeroen de Graaff
Join Date: Feb 2022
Posts: 9
Rep Power: 2
jps115 is on a distinguished road
Hey shedo,

You could look into DEFINE_RW_FILE, to write your defined parameter to a file and read the parameter back. This way the data is stored and you can access it.
See for more information:
https://www.afs.enea.it/project/nept...udf/node29.htm

I hope this was usefull!
shedo likes this.
jps115 is offline   Reply With Quote

Old   April 10, 2022, 02:00
Default
  #3
New Member
 
sheida
Join Date: Mar 2021
Posts: 10
Rep Power: 3
shedo is on a distinguished road
Dear Jeroen,
thanks for your response. I would like to know whether it is capable of recognizing and recalling the previous step data or not?
shedo is offline   Reply With Quote

Old   April 10, 2022, 03:40
Default
  #4
New Member
 
Jeroen de Graaff
Join Date: Feb 2022
Posts: 9
Rep Power: 2
jps115 is on a distinguished road
Do you want to use the value for post-processing or for it to be used for later calculations within your simulation?

For post-processing, you can write both the time step and your defined parameter to the file with the macro CURRENT_TIMESTEP. To use it within your simulation you can use another DEFINE_RW_FILE function to read back the data.

I hope this was useful
shedo likes this.
jps115 is offline   Reply With Quote

Old   April 10, 2022, 04:23
Default
  #5
New Member
 
sheida
Join Date: Mar 2021
Posts: 10
Rep Power: 3
shedo is on a distinguished road
Dear Jeroen,
I want to use it within simulation.
your explanation was useful, I do appreciate you.
jps115 likes this.
shedo is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 21 November 10, 2019 10:14
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 05:28
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 10:08


All times are GMT -4. The time now is 00:28.