Author Topic: How can I calculate time-average velocity in transient simulation?  (Read 2954 times)

Offline mali28

  • Newbie
  • *
  • Posts: 15
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Advertisement
I want to get time-average velocity profiles in a transient simulation. Fluent only gives me the results for a particular time step. But how can I get the time average values for a specified delta t?

Please help.

Thanks.

Offline infocfd

  • Newbie
  • *
  • Posts: 37
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #1 on: April 25, 2012, 11:10:47 AM »
You will need to save the data files at regular time intervals, say after every 5 time steps. Now we may at times need to find the "average solution" for the past "n" timesteps from the data files that have already been saved.

The attached User Defined Function (UDF) and Scheme utility will help you to do this.

Example Problem:
The user has iterated the case till timestep no. 200, saving files after every 10 timesteps. Now if the user wants to see the average solution for timesteps 50 to 120 then the attached Scheme utility will load the appropriate data files, call the UDF to find the average of velocity, pressure and turbulence parameters and pass them on to FLUENT. The user will have to save this new averaged data with a new name in order to avoid overwriting the last data.

To use this Scheme utility and UDF, you need to ensure that the data files are saved with appropriate name. A correct naming convention would be "string-x.dat.gz"

std-00020.dat.gz
std-00030.dat.gz
std-00040.dat.gz

Here "std-" is the initial string in the file name, "00x" is the timestep number added as an extension, so that the Scheme utility can recognize the appropriate data file.The usage instructions can be found in the "scm-file.scm" file which you can read using notepad or any text editor.

Offline oliverk

  • Newbie
  • *
  • Posts: 2
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #2 on: November 13, 2012, 09:48:16 AM »
Hello

I want to use scheme and utility to get average of velocity in each time step.but I have a problem that the value of all of uds is 0.
can you help me?

meanwhile I use another udf for my case to hook use dynamic mesh..

Offline wissou22

  • Newbie
  • *
  • Posts: 1
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #3 on: November 21, 2012, 09:28:20 AM »
dear all
can i just interpret the udf for the calculating of time- average velocity or it must be compiled.
thank you

Offline william

  • Full Member
  • ***
  • Posts: 151
  • Reputation: +14/-0
  • Know it, share it.
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #4 on: November 21, 2012, 10:05:10 AM »
The UDF needs to be compiled. You can not interpret it.

Offline oliverk

  • Newbie
  • *
  • Posts: 2
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #5 on: November 24, 2012, 04:41:55 PM »
Does it work?
CAN anyone help me?

Offline admin

  • Administrator
  • Newbie
  • *****
  • Posts: 11
  • Reputation: +0/-0
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #6 on: November 25, 2012, 01:11:34 PM »
Does it work?
CAN anyone help me?

You can follow the instructions given. If you have any issues then you can post it here.

Offline boa7128

  • Newbie
  • *
  • Posts: 1
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #7 on: December 08, 2016, 10:33:55 AM »
I can not download your attachments, could you please send it to me? jianye_chen@hust.edu.cn. Thx very very much!
You will need to save the data files at regular time intervals, say after every 5 time steps. Now we may at times need to find the "average solution" for the past "n" timesteps from the data files that have already been saved.

The attached User Defined Function (UDF) and Scheme utility will help you to do this.

Example Problem:
The user has iterated the case till timestep no. 200, saving files after every 10 timesteps. Now if the user wants to see the average solution for timesteps 50 to 120 then the attached Scheme utility will load the appropriate data files, call the UDF to find the average of velocity, pressure and turbulence parameters and pass them on to FLUENT. The user will have to save this new averaged data with a new name in order to avoid overwriting the last data.

To use this Scheme utility and UDF, you need to ensure that the data files are saved with appropriate name. A correct naming convention would be "string-x.dat.gz"

std-00020.dat.gz
std-00030.dat.gz
std-00040.dat.gz

Here "std-" is the initial string in the file name, "00x" is the timestep number added as an extension, so that the Scheme utility can recognize the appropriate data file.The usage instructions can be found in the "scm-file.scm" file which you can read using notepad or any text editor.