CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Smoothing Data in Fluent

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

Like Tree2Likes
  • 1 Post By Amir
  • 1 Post By Amir

Reply
 
LinkBack Thread Tools Display Modes
Old   September 5, 2011, 09:14
Question Smoothing Data in Fluent
  #1
New Member
 
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 5
ali hemmati is on a distinguished road
Hi everyone,

I need to have gradient of a scalar (UDS), so I wrote a UDF which returns gradient of that. Specifically speaking, by using macro 'C_UDSI_G' and 'F_UDSI_G'.
By the way, the emerging problem is that because of rough nature of UDS, its gradient becomes very inaccurate. So smoothing data may become a crucial task. I wonder to know whether there is any way to smooth data in Fluent or not.

Thank you.
ali hemmati is offline   Reply With Quote

Old   September 6, 2011, 03:18
Question
  #2
New Member
 
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 5
ali hemmati is on a distinguished road
Smoothing may can be accomplished by another program, such as Tecplot or any other problem, but I do not know how this can be done.

As far as know, Techplot can smooth data, but I wonder if it is possible to use Tecplot output as Fluent input.
ali hemmati is offline   Reply With Quote

Old   September 6, 2011, 05:28
Default
  #3
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 737
Blog Entries: 1
Rep Power: 13
Amir is on a distinguished road
Quote:
Originally Posted by ali hemmati View Post
Smoothing may can be accomplished by another program, such as Tecplot or any other problem, but I do not know how this can be done.

As far as know, Techplot can smooth data, but I wonder if it is possible to use Tecplot output as Fluent input.
Hi Ali,

you're right, you can easily smooth variables in Tecplot; but to export data from Tecplot to fluent you'll need an axillary code. The idea is to use proper .dat file of Tecplot and then by a simple fortran or matlab code change it's format to interpolate file and then read this interpolate file to fluent. I did this procedure few months ago and it worked after many problems encountered; just do it when there won't be any other choices.

Bests,
wond likes this.
__________________
Amir

Last edited by Amir; September 6, 2011 at 06:01.
Amir is offline   Reply With Quote

Old   September 6, 2011, 06:06
Question
  #4
New Member
 
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 5
ali hemmati is on a distinguished road
Hi Amir,

Thank you for your response. I really need to do so, because as long as there is no way to interpolate and smooth data in each cell in Fluent, using another program for smoothing data may work. But as you said, it is an overwhelming job! If I write a code, can it be used for any mesh, or it will vary for mesh to mesh?

Another thing that I wanted to ask is do you think that is it possible to write a UDF which smooth data? I mean by performing a weighting average of all adjacent cells of each cell, as an approximate value.
ali hemmati is offline   Reply With Quote

Old   September 6, 2011, 08:23
Default
  #5
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 737
Blog Entries: 1
Rep Power: 13
Amir is on a distinguished road
Quote:
Originally Posted by ali hemmati View Post
Thank you for your response. I really need to do so, because as long as there is no way to interpolate and smooth data in each cell in Fluent, using another program for smoothing data may work. But as you said, it is an overwhelming job! If I write a code, can it be used for any mesh, or it will vary for mesh to mesh?
The changes are not considerable; just needed to change dimensions and something like these....
Quote:
Originally Posted by ali hemmati View Post
Another thing that I wanted to ask is do you think that is it possible to write a UDF which smooth data? I mean by performing a weighting average of all adjacent cells of each cell, as an approximate value.
I think before performing such data transmission or writing UDFs, it's better to think about solving a laplace equation over desired variable; i.e., an unsteady transport equation with zero convective terms; you can change effect of smoothing via diffusion coefficient.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   September 6, 2011, 08:51
Question
  #6
New Member
 
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 5
ali hemmati is on a distinguished road
Quote:
it's better to think about solving a laplace equation over desired variable; i.e., an unsteady transport equation with zero convective terms; you can change effect of smoothing via diffusion coefficient.
Hi,

I really appreciate you for concerning and pursuing the conversation. Unfortunately, I did not get the point.
My UDS is already is solved by a Laplace equation in 3 dimensions and at steady condition, and I need the \nabla((\nabla\varphi)^{2}) in which \varphi is the scalar. But it leads to a rough contour.
ali hemmati is offline   Reply With Quote

Old   September 6, 2011, 10:36
Default
  #7
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 737
Blog Entries: 1
Rep Power: 13
Amir is on a distinguished road
Hi,

I just wanted to elaborate smoothing algorithm which you can perform in FLUENT for any variable:
1) store it in a UDS variable (e.g. C)
2) solve this equation: \partial/\partial t (\rho C) = \nabla . (D \nabla C)
3) Enjoy!

Obviously, you can achieve different smoothing results for different D or run time.

Bests,
mm.abdollahzadeh likes this.
__________________
Amir
Amir is offline   Reply With Quote

Old   September 6, 2011, 13:19
Default
  #8
New Member
 
Ali
Join Date: Mar 2011
Posts: 27
Rep Power: 5
ali hemmati is on a distinguished road
Hi Amir,

It seems that the problem has bees solved by using just one unsteady iteration, without an unbearable change in the UDS, and that was never became into reality(!) unless using your trick.

Thanks a lot,
Bests.
ali hemmati is offline   Reply With Quote

Reply

Tags
fluent, gradient, smoothing, udf

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFoam to Fluent data conversion Problem vemps OpenFOAM 1 August 8, 2011 03:30
Data import in Fluent?! Bart Horsten FLUENT 3 February 22, 2010 14:05
Importing Gambit data into Fluent Tyred ANSYS Meshing & Geometry 1 April 18, 2009 14:53
About Data File and Solving PDE by Fluent Sebeci FLUENT 2 March 25, 2003 00:48
Tecplot can't read data file from Fluent. stephen FLUENT 8 November 21, 2001 21:27


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