# Transient simulation in Fluent

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 9, 2016, 06:40 Transient simulation in Fluent #1 New Member   kha Join Date: Feb 2016 Posts: 7 Rep Power: 7 Hello CFD Online members. I am doing a 2D transient simulation in Ansys Fluent 14.0. physical of the problem: water fluid flow between two plates (plates have a thikness). At time zero the temperature of the two plates is known. At the end of time step 10 the temperature of the two plates decrease by 10K due to extern phenomena (for all cell mean that the temperature field of the two plates change, each cell temperature will decrease by 10K ). I want to start the time step 11 by this new field to continue the calculation Is this possible in Fluent ? (since Fluent solver repeat the iteration of the last time step in the begining of the actual time step). We can say what i want to do is a pseudo initialization to start time step 11). I tried to use EXECUTE_AT_END of time step 10 to modify the two plates field temperature, but when Fluent begin the time step 11 it repeats the last iteration of the time step 10 so the new field is ignored by Fluent. Thank's in advance (any idea may be useful).

 February 9, 2016, 15:28 #2 Senior Member   Join Date: Mar 2015 Posts: 892 Rep Power: 15 That's strange the temperature is first reduced in time step 10 but then returns to the original temperature in time step 11. What is the UDF you are using and how are you initialising the temperature across the plates (considering they have thickness)? khaham likes this.

 February 10, 2016, 02:28 #3 Senior Member   Lucky Tran Join Date: Apr 2011 Location: Orlando, FL USA Posts: 4,298 Rep Power: 51 Fluent doesn't repeat the last iteration of the previous time-step. Make sure you are actually modifying the fields. After doing EXECUTE_AT_END, make some plots or something and make sure the fields are actually correct. An alternative is to use custom field functions, define it as the current field -10K. And then patch the temperature field using the custom field function. khaham likes this.

 February 11, 2016, 21:41 Transient Inlet Temperature #4 New Member   Elnaz Norouzi Join Date: Jan 2016 Posts: 5 Rep Power: 7 I have a problem in transient model. In my model inlet temperature in a channel changes over time. In addition there is convection boundary condition at the bottom of the channel. Previously I wrote a UDF to calculate heat transfer convection at bottom wall in steady state. Now I want to add transient model to my model, and I add DEFINE_PROFILE(INLET_TEMPRATURE,thread,position) to my previous UDF. My problem is that the result shows that inlet temperature does not change over time. What is your idea?

February 11, 2016, 21:49
#5
Senior Member

Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 4,298
Rep Power: 51
Quote:
 Originally Posted by cikas I have a problem in transient model. In my model inlet temperature in a channel changes over time. In addition there is convection boundary condition at the bottom of the channel. Previously I wrote a UDF to calculate heat transfer convection at bottom wall in steady state. Now I want to add transient model to my model, and I add DEFINE_PROFILE(INLET_TEMPRATURE,thread,position) to my previous UDF. My problem is that the result shows that inlet temperature does not change over time. What is your idea?
Make your profile dependent on time.

February 11, 2016, 21:59
#6
New Member

Elnaz Norouzi
Join Date: Jan 2016
Posts: 5
Rep Power: 7
Quote:
 Originally Posted by LuckyTran Make your profile dependent on time.
my profile is below. I think that it is time dependent. What do you mean?

{
real a, b, t;

face_t f;
a=333.15;
b=1/60;
t=CURRENT_TIME;
{

}

}

 February 11, 2016, 23:44 #7 Senior Member   Join Date: Mar 2015 Posts: 892 Rep Power: 15 Are your inlet temperatures constantly 333.15 K? You should always use trailing dots on your real numbers to avoid incorrect type casting. For example, 1/60 = 0 (answer is rounded or truncated to zero) whereas 1./60. = 0.0166...

February 12, 2016, 15:57
#8
New Member

Elnaz Norouzi
Join Date: Jan 2016
Posts: 5
Rep Power: 7
Quote:
 Originally Posted by `e` Are your inlet temperatures constantly 333.15 K? You should always use trailing dots on your real numbers to avoid incorrect type casting. For example, 1/60 = 0 (answer is rounded or truncated to zero) whereas 1./60. = 0.0166...
Thank you for your response. Yes, my initial temperature is 333.15 along inlet channel (in vertical direction), then this inlet temperature changes linearly by time. There is no other option to make higher precision for the result numbers, because I modified my UDF as your comment, but it seems that the result numbers are rounded too.

 February 12, 2016, 16:26 #9 Senior Member   Join Date: Mar 2015 Posts: 892 Rep Power: 15 How long are your simulations? If t is small then the temperature would have a negligible change over time.

February 13, 2016, 11:50
#10
New Member

kha
Join Date: Feb 2016
Posts: 7
Rep Power: 7
Quote:
 Originally Posted by LuckyTran Fluent doesn't repeat the last iteration of the previous time-step. Make sure you are actually modifying the fields. After doing EXECUTE_AT_END, make some plots or something and make sure the fields are actually correct. An alternative is to use custom field functions, define it as the current field -10K. And then patch the temperature field using the custom field function.
Hello;
When I plot the temperature field (i used printf ("%f\n", C_T(c,t)); in side my EXECUETE_AT_END after i have been changed the temperature field at the end of time step 10, Fluent print in TUI console The new field ( the plate has 10000 cells as i want (the fields actually corrected).
But when Fluent start time step 11 it prints in TUI last iteration of time step 10 and perform the calculation without considering my modification.

you said that Fluent doesn't repeat the last iteration of the previous time-step. But Fluent prints always this, suppose the last iteration number of time step 2 is 30 (converged), at the beginning of time step 3 Fluent prints (i will add a picture next time to more explanations)

ite continuity x-velocity... ite/time
30 0.123 E-3 0.00001 .... 00:00
solution is converged
EXECUTE_AT_END(plate-temperature-modify)

time step 2

ite continuity x-velocity...
30 0.123 E-3 0.00001 ..... 00:06
solution is converged
ite
31 (at this point i dont know what is the initial solution that take Fluent to start iterate time step 3 )...... ..............
32
33
..
..
..
..
..
..
45
0 0.3154 E-3 0.000003 ..... 00:00
solution is converged
time step 3

For your proposed alternative, please ,can you give more explanation (example is suitable since i have no idea about it ).
Thank you a lot for your response.

February 13, 2016, 12:01
#11
New Member

kha
Join Date: Feb 2016
Posts: 7
Rep Power: 7
Quote:
 Originally Posted by `e` That's strange the temperature is first reduced in time step 10 but then returns to the original temperature in time step 11. What is the UDF you are using and how are you initialising the temperature across the plates (considering they have thickness)?
Hello;

The calculation doesn't stop at time step 10 and i initialize the solution with the new field and i will continue the calculation (i do not mean that). But i use the EXECUTE_AT_END time step 10 to tel Fluent to start the time step 11 with the new field automatically.
By the way did you work with first_iteration variable in Fluent (may be we can use it to modify the field at the beginning of time step 11) (any idea my be useful).

thank you for your replay

February 13, 2016, 12:30
#12
Senior Member

Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 4,298
Rep Power: 51
It's most likely a problem with your EXECUTE_AT_END command.

Quote:
 Originally Posted by khaham ite continuity x-velocity... 30 0.123 E-3 0.00001 ..... 00:06 solution is converged ite 31 (at this point i dont know what is the initial solution that take Fluent to start iterate time step 3 )...... ..............
I am hoping that there is also an energy residual... otherwise you are not even solving the energy equation. For some reason your simulation did not iterate the 2nd time-step at all and proceeded to the third iteration.

Check and compare the solution immediately before and immediately after the updating solution at levels n and n-1 message. This line is extremely important if you want to track what's happening during the time-stepping.

If necessary, advance to the time-step manually through TUI commands (but don't do any solve/iterate).

 March 15, 2016, 08:17 #13 New Member   kha Join Date: Feb 2016 Posts: 7 Rep Power: 7 Yes, there is a energy residual, can you more explain how i have to do to check the solution before and immediately after the updating solution at levels n and n-1.

March 15, 2016, 08:18
#14
New Member

kha
Join Date: Feb 2016
Posts: 7
Rep Power: 7
Quote:
 Originally Posted by LuckyTran It's most likely a problem with your EXECUTE_AT_END command. I am hoping that there is also an energy residual... otherwise you are not even solving the energy equation. For some reason your simulation did not iterate the 2nd time-step at all and proceeded to the third iteration. Check and compare the solution immediately before and immediately after the updating solution at levels n and n-1 message. This line is extremely important if you want to track what's happening during the time-stepping. If necessary, advance to the time-step manually through TUI commands (but don't do any solve/iterate).
Yes, there is a energy residual, can you more explain how i have to do to check the solution before and immediately after the updating solution at levels n and n-1.

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post lamboram FLUENT 0 September 14, 2015 04:37 JMDag2004 OpenFOAM Running, Solving & CFD 1 August 10, 2015 10:15 miki256 CFX 2 May 18, 2012 01:22 nprace CFX 4 January 9, 2012 08:59 aero CFX 0 November 6, 2009 01:10

All times are GMT -4. The time now is 15:56.

 Contact Us - CFD Online - Privacy Statement - Top