CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Could Fluent initialize flow from time-average field data? (https://www.cfd-online.com/Forums/fluent/181947-could-fluent-initialize-flow-time-average-field-data.html)

hongfu2233 December 25, 2016 22:21

Could Fluent initialize flow from time-average field data?
 
Hi all,
Could Fluent initialize flow from time-average field data and how?
Thanks:cool:

hongfu2233 February 9, 2017 10:05

no one help me?

Zbynek February 10, 2017 04:31

You can initialize a case with any data if you have them in an appropriate format. If you want someone to give you a more specific answer, you should mention whether you already have the time-averaged data and if yes, how you obtained them and thus in which format they are.

hongfu2233 February 10, 2017 05:38

Thanks for your reply! I have gotten the time-averaged data using the utility of Fluent (Run Calculation => Data Sampling for Time Statistics). I would like to know how can I initialize flow from this time-averaged data?

Zbynek February 10, 2017 06:35

Ok, I do not have a great answer since I never did this so I will just give you ideas that just pop out in my head.

You may try to open the .dat file in a text editor and locate the time-averaged data. These use to replace the instantaneous data. If you do not have any time-averaged data in the .dat file, you should go to File->Export->Solution Data... and choose the quantities you want to export in the .dat file. Alternatively, you may get to the time-averaged data through a UDF (check Time-Sampled Data chapter) and save them in the memory. It will require some time from you to understand how the .dat file is arranged. Important - when exporting the .dat file, uncheck the Binary option so the data is written in ASCII and you are able to open and modify it in a text editor.

I know that this looks like a cumbersome solution. Maybe someone can come up with something smoother.

hongfu2233 February 14, 2017 21:08

Thanks again, it sounds really tedious. I am looking for a post-processing software which can import and export Fluent data. Do you have any idea?

LuckyTran February 14, 2017 23:09

Quote:

Originally Posted by hongfu2233 (Post 636633)
Thanks for your reply! I have gotten the time-averaged data using the utility of Fluent (Run Calculation => Data Sampling for Time Statistics). I would like to know how can I initialize flow from this time-averaged data?

There is a way to do it entirely within Fluent. I have written up the steps several times but I can't find the exact commands so I write just the outline. Maybe if your google skills are keen enough, you can dig up my old post.

It requires a few steps, a little tedious but not that bad. The problem is the time-averaged data are stored in new variables, whereas the raw variables are the instantaneous quantities. Unfortunately you cannot set the instantaneous quantities equal to the time-averaged ones directly and need a workaround. Fluent does not let you patch using the time-averaged fields, but it does let you patch using a custom field function.

What you need to do is define a bunch of custom field function. Make a field function for each of the time-averaged variables you need. These are just dummy functions so you can call them whatever, but define these field functions as equal the time-averaged variables that you get from your data sampling. I.e. a dummy x-velocity that will be equal to the mean x-velocity.

Now after you have done this for all the variables, you can now go the initialization pane and use the patch command. You can patch custom field functions onto the instantaneous variables. So patch (or overwrite) the x-velocity using the dummy x-velocity field.

For other software. Tecplot is great if you have access to it. But using the method I wrote above is much better because Fluent doesn't do any interpolation.

hongfu2233 February 15, 2017 04:10

It works! Thank you, LuckyTran!


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