|
[Sponsors] |
about Time-Temperature profile for transient analysis |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 22, 2013, 05:24 |
about Time-Temperature profile for transient analysis
|
#1 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
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 ... |
|
March 22, 2013, 08:45 |
|
#2 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22 |
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 } |
|
March 22, 2013, 09:06 |
|
#3 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
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, |
|
March 23, 2013, 06:19 |
|
#4 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
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; |
|
March 23, 2013, 06:49 |
|
#5 |
Member
Thiagu
Join Date: Oct 2012
Location: India
Posts: 60
Rep Power: 13 |
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. |
|
March 25, 2013, 07:28 |
|
#6 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
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) } |
|
March 25, 2013, 08:50 |
|
#7 |
Member
Thiagu
Join Date: Oct 2012
Location: India
Posts: 60
Rep Power: 13 |
# 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 <&&>= |
|
March 25, 2013, 09:21 |
|
#8 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22 |
I think you must use curve fitting for the UDF. Else you will have lots of problem with convergence especially during the 'jumps'.
|
|
March 25, 2013, 18:32 |
|
#9 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
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. |
|
March 25, 2013, 18:35 |
|
#10 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
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 ? |
|
March 26, 2013, 01:39 |
|
#11 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22 |
I understand your dilemma but the 'jumps' are the issue here.
|
|
March 28, 2013, 12:36 |
|
#12 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
do you have any "curve fitting" example relevant ? I need step process or at least some example to do it. please providing if possible...
|
|
March 30, 2013, 07:50 |
|
#14 |
Senior Member
Moha
Join Date: Mar 2013
Location: EU
Posts: 103
Rep Power: 0 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 11:08 |
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 06:37 |
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 |