How can I calculate time-average velocity in transient simulation?  (Read 13514 times)

Offline mali28

  • Newbie
  • *
  • Posts: 15
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
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: 4
  • 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: 147
  • Reputation: +19/-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: 4
  • 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 william

  • Full Member
  • ***
  • Posts: 147
  • Reputation: +19/-0
  • Know it, share it.
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #6 on: November 26, 2012, 10:33:48 AM »
Does it work?
CAN anyone help me?

You can try it and if you have any problem, you can post it here.

Offline oliverk

  • Newbie
  • *
  • Posts: 4
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #7 on: November 27, 2012, 06:56:11 AM »
Hi.
I posted my question in post #3 but nobody answer me!!!!

Offline william

  • Full Member
  • ***
  • Posts: 147
  • Reputation: +19/-0
  • Know it, share it.
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #8 on: November 27, 2012, 09:18:31 AM »
Which Fluent version do you have?

Offline lakhi

  • Newbie
  • *
  • Posts: 13
  • Reputation: +1/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #9 on: November 27, 2012, 12:06:24 PM »
Hi all. The shortcut procedure for this could be by using data sampling statistics. First, using custom field function define the parameters you want to average out. Next start data sampling when required, till the desired time. This way, you can reduce the effort and eliminate the use of udf's.

Offline oliverk

  • Newbie
  • *
  • Posts: 4
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #10 on: November 29, 2012, 07:43:03 AM »
Which Fluent version do you have?

6.3.26

Offline wawan

  • Newbie
  • *
  • Posts: 1
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #11 on: March 01, 2013, 05:24:30 PM »
Hi all. How to do this calculation using Fluent 12.1?

Offline Kanarya

  • Newbie
  • *
  • Posts: 2
  • Reputation: +0/-0
  • Searching for solution
    • View Profile
Re: How can I calculate time-average velocity in transient simulation?
« Reply #12 on: June 23, 2013, 12:35:11 PM »
Hi,
thanks for the code
but it  gives me Error:rpgetvar 'send' undefied variable...
I am using solid-gas flow and I modified the code for it.
compilation is fine but when I execute it iti gives me the error above!!
any help!
thanks a lot in advance!
by the way I am using fluent 14!
thanks
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.