CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

how to impose experimental data as boundary condition in Fluent 6.3.26

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Sun
  • 1 Post By maverick123

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2015, 20:54
Question how to impose experimental data as boundary condition in Fluent 6.3.26
  #1
New Member
 
cherche-du-paix
Join Date: Nov 2013
Posts: 12
Rep Power: 13
duina is on a distinguished road
hi
how to impose experimental data as boundary condition in Fluent 6.3.26
I have this data for temperature profile
how can I introduce it as user define for boundary condition

time(h)
7:00
8:00
9:00
10:00
11:00
12:00
13:00
14:00
15:00
16:00
17:00
18:00
19:00
Temperature

37,59
45,88
53,89
60,8
65,78
67,85
69,3
67,03
64,96
59,73
52,25
44,37
37,77
duina is offline   Reply With Quote

Old   March 4, 2015, 01:40
Default
  #2
New Member
 
Guang
Join Date: Feb 2015
Location: Stuttgart, Germany
Posts: 15
Rep Power: 11
stardust111 is on a distinguished road
you can use udf to set a boundary condition of temporal varied temperature
stardust111 is offline   Reply With Quote

Old   March 4, 2015, 03:50
Default
  #3
Sun
Senior Member
 
Sun's Avatar
 
Join Date: Nov 2010
Posts: 103
Rep Power: 16
Sun is on a distinguished road
why don't you fit an expression on your experimental data and then having the equation, you can use DEFINE_PROFILE to create your own bc for the temperature.
ammarbnv likes this.
Sun is offline   Reply With Quote

Old   March 4, 2015, 07:43
Default
  #4
Member
 
Join Date: Nov 2014
Posts: 31
Rep Power: 12
maverick123 is on a distinguished road
Hi duina,

As per my understanding, you want to change temperature boundary condition per hour but it is not clear to me which type of boundary condition it is (I mean mass_flow_inlet,pressure_outlet ?)

I assume, you know the number of time steps per hour.

Before starting iterations, define function as follows in console (You have to paste complete syntax in one go, not line by line)

Code:
(define my_temperature
  (lambda (my_temp)
  
    (let ()
        (begin   
            (ti-menu-load-string (format #f "/define/boundary-conditions/pressure-outlet pressure_outlet_face_zone no ~a no ~a n y n n ~a n ~a n ~a n ~a y y y y n 0 n 0 n 0 n 0 n n n" 0 my_temp 0.1 0.1 0.1 0.1))
        )   
    )
   )
)
Start your solution. Consider there are 1000 time steps/ iterations in 1 hr. After 1st 1000 iteration to use above defined function, use following syntax

Code:
(my_temperature 45.88)
and so on you can update temperature variable at boundary condition.

Here in my case, i have considered a random definition of boundary condition. For you, the syntax in bracket (ti-menu-load-string .....) will change accordingly.
ammarbnv likes this.
maverick123 is offline   Reply With Quote

Old   March 4, 2015, 15:14
Post
  #5
New Member
 
cherche-du-paix
Join Date: Nov 2013
Posts: 12
Rep Power: 13
duina is on a distinguished road
thank's maverick123 and Sun to replying me
i wante to run my simulation , for 0.1 s times steps
and the temperature varied each hour in boundary condition
i have this data experimental temperature to introduce it as user define
it is like
when t = 1 h to 2 h ( mean ) from 7:00 to 8:00
Temperature= 37°C
t= 2 or 72000 sec (from 8:00 to 9:00 )
T=45,88 °C
.
.
.
.
.
.
and my simulation steps time run for 0.1 s
how i can create this user define to define the profile of temperature each hour
thank's
duina is offline   Reply With Quote

Old   March 5, 2015, 01:40
Default
  #6
Member
 
Join Date: Dec 2009
Location: China
Posts: 79
Rep Power: 17
ringtail is on a distinguished road
Quote:
Originally Posted by maverick123 View Post
Hi duina,

As per my understanding, you want to change temperature boundary condition per hour but it is not clear to me which type of boundary condition it is (I mean mass_flow_inlet,pressure_outlet ?)

I assume, you know the number of time steps per hour.

Before starting iterations, define function as follows in console (You have to paste complete syntax in one go, not line by line)

Code:
(define my_temperature
  (lambda (my_temp)
  
    (let ()
        (begin   
            (ti-menu-load-string (format #f "/define/boundary-conditions/pressure-outlet pressure_outlet_face_zone no ~a no ~a n y n n ~a n ~a n ~a n ~a y y y y n 0 n 0 n 0 n 0 n n n" 0 my_temp 0.1 0.1 0.1 0.1))
        )   
    )
   )
)
Start your solution. Consider there are 1000 time steps/ iterations in 1 hr. After 1st 1000 iteration to use above defined function, use following syntax

Code:
(my_temperature 45.88)
and so on you can update temperature variable at boundary condition.

Here in my case, i have considered a random definition of boundary condition. For you, the syntax in bracket (ti-menu-load-string .....) will change accordingly.
Hi, maverick
The code you posted doesnt look like a UDF one. Its likely the same format as sentences in a profile file. Could you tell me what it is exactly? How to write such a script and hook it inFLUENT?
Thanks
ringtail is offline   Reply With Quote

Old   March 5, 2015, 05:39
Default
  #7
Member
 
Join Date: Nov 2014
Posts: 31
Rep Power: 12
maverick123 is on a distinguished road
Quote:
Originally Posted by ringtail View Post
Hi, maverick
The code you posted doesnt look like a UDF one. Its likely the same format as sentences in a profile file. Could you tell me what it is exactly? How to write such a script and hook it inFLUENT?
Thanks
Hi,

The code i have written is not UDF, it is the scheme function. As per my assumption, there is not fix function/expression (which is convenient to code in UDF) for above mentioned temperature boundary condition. So I defined a function which will set require value to the BC after certain iterations. As per problem, if BC has to be changed after 1 hr, there should be certain number of iterations in between. In journal or while running manually I will update the BC by just passing required value to my defined function.

Thanks
maverick123 is offline   Reply With Quote

Old   March 6, 2015, 09:45
Default
  #8
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You can also define it as a profile. The syntax for a profile file is pretty simple but I've never made a transient one. here's an example for a spatial profile.

((name point 2 1)
(x
0.000000e+00 0.000000e+00)
(y
1.735112e-05 5.206682e-05)
(axial-velocity
2.427940e+01 2.426885e+01)

Write your data to a text file in similar format and read it into fluent as a profile.
LuckyTran is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Radiation interface hinca CFX 15 January 26, 2014 18:11
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 10:28
How to transfer boundary condition from Openfoam to fluent sachinlb OpenFOAM Post-Processing 1 January 6, 2012 02:41
problem about periodic boundary condition in Fluent winnawinna FLUENT 0 December 29, 2010 00:32
vorticity boundary condition bearcharge Main CFD Forum 0 May 14, 2010 12:32


All times are GMT -4. The time now is 17:04.