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

about Time-Temperature profile for transient analysis

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 22, 2013, 06:24
Default about Time-Temperature profile for transient analysis
  #1
Senior Member
 
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0
ahvz is on a distinguished road
Hi there,

How to define/import a time-temperature into FLUENT regarding to make transient analysis?

Example:

at time(sec) Temp(C)

0 20
20 18
40 15
...
ahvz is offline   Reply With Quote

Old   March 22, 2013, 09:45
Default
  #2
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 545
Rep Power: 12
vasava will become famous soon enough
You can try this.

#include "udf.h"

DEFINE_PROFILE(temp_profie, thread, position)
{
face_t f;
real t = CURRENT_TIME;

begin_f_loop(f, thread){

if (t>=t1 && t<=t2){
F_PROFILE(f, thread, position) = xxxxxx;
}

if (t>=t2 && t<=t3){
F_PROFILE(f, thread, position) = xxxxxx;
}
.......... and so on
}
vasava is offline   Reply With Quote

Old   March 22, 2013, 10:06
Default
  #3
Senior Member
 
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0
ahvz is on a distinguished road
Thank you for reply,

I don't have any background upon UDF.

I thought it would be even simpler than that procedure, because I already did in ANSYS APDL by importing time-temperature profile as a text file to making transient analysis (temperature as a time dependent).

it seems in FLUENT is different and I should go to learn UDF and so on...


regards,
ahvz is offline   Reply With Quote

Old   March 23, 2013, 07:19
Default
  #4
Senior Member
 
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0
ahvz is on a distinguished road
still stuck with UDF...

I think Define_profile examples are not what I need (at least I don't know)

how to define the below variables to the boundary conditions ? I need example file regarding to transient analysis.

My problem variables are:

Time (sec) Temp(C)
300 22
600 20
900 24
1200 20
1500 15
1800 16.5
2100 10.5
2400 12
2700 12.263
3000 12.079
3300 11.977
3600 11.973
3900 11.781
4200 11.809
4500 11.603
4800 11.577
5100 11.486
5400 11.459
5700 11.375
6000 11.308
6300 11.289
6600 11.192
6900 11.148
7200 11.125


for now, I am here...

/************************************************** *********************
udfexample.c
UDF for specifying transient temperature profile boundary condition
************************************************** **********************/

#include "udf.h"
DEFINE_PROFILE(Temp_Profile, thread, position)

{
face_t f;
ahvz is offline   Reply With Quote

Old   March 23, 2013, 07:49
Default
  #5
Member
 
Thiagu
Join Date: Oct 2012
Location: India
Posts: 59
Rep Power: 4
jthiakz is on a distinguished road
looking at the data. I could fit this in two linear equations and the same i can fit is UDF using simple expressions. other wise (method-2)you have to use mulitple if statements in UDF.
Method-1 ,
Plot the first curve (from 300 to 900 data) usign XY plot and get linear equation(Y=mx+C).
Plot the second curve (from 900 to 7200) and do the same.
jthiakz is offline   Reply With Quote

Old   March 25, 2013, 08:28
Default
  #6
Senior Member
 
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0
ahvz is on a distinguished road
Indeed, I only defined temperature and for the time will be considered by the time steps in another field of software

Would you please providing feedback upon below texts ? I'm not sure if its correct.

/************************************************** *********************
udfexample.c
UDF for specifying transient temperature profile boundary condition
************************************************** **********************/

#include "udf.h"
DEFINE_PROFILE(Temp_Profile, thread, position)

{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{

if (t>=t1 && t<=t2){
F_PROFILE(f, thread, position) = 10;
}

if (t>=t2 && t<=t3){
F_PROFILE(f, thread, position) = 11;
}

if (t>=t3 && t<=t4){
F_PROFILE(f, thread, position) = 12;
}
if (t>=t4 && t<=t5){
F_PROFILE(f, thread, position) = 13;
}
if (t>=t5 && t<=t6){
F_PROFILE(f, thread, position) = 14;
}
if (t>=t6 && t<=t7){
F_PROFILE(f, thread, position) = 15;
}
if (t>=t7 && t<=t8){
F_PROFILE(f, thread, position) = 16;
}
if (t>=t8 && t<=t9){
F_PROFILE(f, thread, position) = 17;
}
if (t>=t9 && t<=t10){
F_PROFILE(f, thread, position) = 18;
}
if (t>=t10 && t<=t11){
F_PROFILE(f, thread, position) = 19;
}
if (t>=t11 && t<=t12){
F_PROFILE(f, thread, position) = 20;
}

end_f_loop(f, thread)
}
ahvz is offline   Reply With Quote

Old   March 25, 2013, 09:50
Default
  #7
Member
 
Thiagu
Join Date: Oct 2012
Location: India
Posts: 59
Rep Power: 4
jthiakz is on a distinguished road
# Need to define real variable for t1 to tn..
# what is that 10 to 20 , it suppose to be your temperature value..
# you used <= && >=, but for your case any one you can be used
means either <= && > or <&&>=
jthiakz is offline   Reply With Quote

Old   March 25, 2013, 10:21
Default
  #8
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 545
Rep Power: 12
vasava will become famous soon enough
I think you must use curve fitting for the UDF. Else you will have lots of problem with convergence especially during the 'jumps'.
vasava is offline   Reply With Quote

Old   March 25, 2013, 19:32
Default
  #9
Senior Member
 
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0
ahvz is on a distinguished road
Dear jthiakz,

Is it mandatory to define time variable also? can't I consider time steps from forwarded setting of the software instead of defining a new variable for time ? am I wrong ?

the values of 10, 11, 12,.... are temperature values.
ahvz is offline   Reply With Quote

Old   March 25, 2013, 19:35
Default
  #10
Senior Member
 
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0
ahvz is on a distinguished road
Dear Vasava,

I think "curve fitting" is usfule when there are regular temperature variation while in my case I dont have such a regular variables for the temeprature. thus, I think "curve fitting" is not enough for my purposes. isn't it ?
ahvz is offline   Reply With Quote

Old   March 26, 2013, 02:39
Default
  #11
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 545
Rep Power: 12
vasava will become famous soon enough
I understand your dilemma but the 'jumps' are the issue here.
vasava is offline   Reply With Quote

Old   March 28, 2013, 13:36
Default
  #12
Senior Member
 
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0
ahvz is on a distinguished road
do you have any "curve fitting" example relevant ? I need step process or at least some example to do it. please providing if possible...
ahvz is offline   Reply With Quote

Old   March 28, 2013, 20:13
Default
  #13
Super Moderator
 
diamondx's Avatar
 
Ghazlani M. Ali
Join Date: May 2011
Location: Canada
Posts: 1,291
Blog Entries: 23
Rep Power: 20
diamondx will become famous soon enough
put that on excel, and extract a tendency curve, it will give your the equation, go back to fluent and stick it to the UDF...
__________________
Regards,
New to ICEM CFD, try this document --> http://goo.gl/G2gkE
Ali
diamondx is offline   Reply With Quote

Old   March 30, 2013, 08:50
Default
  #14
Senior Member
 
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0
ahvz is on a distinguished road
I did the curve fitting and it gave me the attached document. is it write now through the program also?

I expected to do transient analysis with this temperature profile as a convection heat transfer boundary condition data:

/************************************************** *********************
udfexample.c
UDF for specifying transient temperature profile boundary condition
************************************************** **********************/

#include "udf.h"

DEFINE_PROFILE(Temp_Profile, thread, position)
{
face_t f;
real x[ND_ND]; /* this will hold the position vector */
real y;

begin_f_loop(f, thread)
{
F_CENTROID(x,f,thread);
y = x[0];
F_PROFILE(f, thread, position) = (-1e-26*x*x*x*x*x*x)+(3e-21*x*x*x*x*x)-(3e-16*x*x*x*x)+(1e-11*x*x*x)-(2e-7*x*x)+((1/1000)*x)+13;

}
end_f_loop(f,t)
}

When I am doing analysis it do not conside any variables (only constant temperature as exist boundary conditions)
why Fluent do not show that the file is attached to the program or not? how can I check if there is an error or not.

regards,
Mohammad
Attached Images
File Type: jpg Capture.JPG (13.8 KB, 7 views)
ahvz is offline   Reply With Quote

Reply

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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 07:37
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM 6 April 12, 2011 11:24
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 04:35
monitoring point of total temperature rogbrito FLUENT 0 June 21, 2009 17:31


All times are GMT -4. The time now is 01:28.