|
[Sponsors] |
How to read transient velocity profile data as inlet condition at each time step |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 14, 2016, 03:14 |
How to read transient velocity profile data as inlet condition at each time step
|
#1 |
New Member
hemant mittal
Join Date: Feb 2016
Posts: 21
Rep Power: 10 |
Hello every one,
I have velocity profile (atmospheric boundary layer) data for each time step, (means X coordinate, Y coordinate, Z coordinate ,time, X velocity, Y Velocity, Z velocity) saved as .csv format. I need to use this file as inlet boundary condition for each time step in FLUENT. So please suggest me suitable macros to read data file as inlet boundary condition at each time step. Thanks |
|
October 14, 2016, 09:16 |
macro
|
#2 |
New Member
shreehan Abd El-Ghafour
Join Date: Apr 2015
Posts: 12
Rep Power: 11 |
Dear hemmt,
you can use a profile in a notepad file but save it with extension .PROF (i begin with excel sheet and copy it to a notpad file then save it with the required extension) or use can make a udf with DEFINE_PROFILE macro good luck |
|
October 14, 2016, 09:23 |
example
|
#3 |
New Member
shreehan Abd El-Ghafour
Join Date: Apr 2015
Posts: 12
Rep Power: 11 |
an example from my work
example.txt |
|
October 14, 2016, 11:44 |
|
#4 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
I would also suggest to make a profile table since you already have it in a table (although it's in a csv).
|
|
October 16, 2016, 01:09 |
|
#5 | |
New Member
hemant mittal
Join Date: Feb 2016
Posts: 21
Rep Power: 10 |
Quote:
Actually I new to Fluent UDF. Can u Provide me an example of UDF for using profile data(Atmospheric boundary layer) Thanks |
||
January 10, 2017, 23:39 |
|
#6 | |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
Quote:
Anybody knows how to write a transient profile .prof that contains x-y-z coordinates? The coordinates should be written only once, and then all the corresponding values for each time step... I didn't find any example like that. |
||
March 1, 2017, 23:48 |
|
#7 | |
New Member
Yousef
Join Date: Dec 2015
Posts: 14
Rep Power: 11 |
Quote:
Unfortunately, I don't think that is possible even with the latest version of fluent. If I have read the Fluent manual correctly, the transient boundary profiles in fluent must be spatially uniform: https://www.sharcnet.ca/Software/Ans...transient.html It seems there is no apparent way of specifying profile that varies with both time and space with a .prof or a .ttab file. I am currently struggling with the same problem myself. Basically, I have a MATLAB code that generates velocity vs time data for the inlet surface (spatially and temporally non uniform) that I am not able to import into fluent with the profile tool. The only way this seems possible is with a UDF function that reads data from the csv file, and updates the profile with each time-step. For my case, it makes more sense to rewrite the MATLAB code as a UDF. |
||
March 2, 2017, 08:24 |
|
#8 | |
New Member
hemant mittal
Join Date: Feb 2016
Posts: 21
Rep Power: 10 |
Quote:
|
||
March 2, 2017, 12:32 |
|
#9 | ||
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
Quote:
Quote:
|
|||
March 2, 2017, 22:04 |
|
#10 | |
New Member
Yousef
Join Date: Dec 2015
Posts: 14
Rep Power: 11 |
Quote:
I agree this method is far from perfect, but it saves me a lot of time at least for the initial stages of my project. I suspect that eventually I'll have to bite the bullet and write the UDF. |
||
March 2, 2017, 23:17 |
|
#11 |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 |
yousefaz, here is a Execute Commands example where your profile files would be named, for example,
profile-0001.prof profile-0002.prof profile-0003.prof and so on... Code:
(ti-menu-load-string (format #f "file read-profile profile-~04d.prof" (rpgetvar 'flow-time))) |
|
March 2, 2017, 23:50 |
|
#12 |
New Member
Yousef
Join Date: Dec 2015
Posts: 14
Rep Power: 11 |
Much appreciated Macfly!
Hemmt, With regards to the UDF, here is a script I found that reads data from a text file into a c++ array: (https://www.researchgate.net/post/Ca..._in_LES_FLUENT) I will update you if I ever get around to writing the full UDF. #include "udf.h" |
|
July 9, 2018, 03:26 |
UDF to read transient data
|
#13 | |
New Member
hemant mittal
Join Date: Feb 2016
Posts: 21
Rep Power: 10 |
Quote:
thanks for Your kind reply Could you help me to for full UDF regarding to read transient ABL data Thanks |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 08:31 |
Problem with assigned inlet velocity profile as a boundary condition | Ozgur_ | FLUENT | 5 | August 25, 2015 05:58 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |