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

UDF for cell zone condition

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By vinerm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2013, 13:13
Unhappy UDF for cell zone condition
  #1
New Member
 
Rachana Vidhi
Join Date: Dec 2012
Posts: 8
Rep Power: 13
rachana is on a distinguished road
Hi, I am modeling a system in which the temperature of a large block needs to change with time and with depth (inside the block). A thin pipe (carrying hot liquid) is passing through the block and the temperature of the block around the pipe is affected by that.

So, how do I provide a time-dependent cell zone temperature condition? I cannot use "Fixed value" because the temperature profile inside the block needs to be affected by the pipe. Can I use "Source term" somehow for this?

I think I will be able to make the UDF but how (and where) do I use it? Please help me out.
rachana is offline   Reply With Quote

Old   May 22, 2013, 09:04
Default
  #2
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17
mvee is on a distinguished road
Can you put some light on problem?
Yes, You can model temperature as a source term which varies with space and time. If you have mathematical model then you can easily put down this into UDF.
Best wishes
mvee is offline   Reply With Quote

Old   May 22, 2013, 13:28
Default
  #3
New Member
 
Rachana Vidhi
Join Date: Dec 2012
Posts: 8
Rep Power: 13
rachana is on a distinguished road
I am modeling underground heat pump and i need to study the seasonal variations. So, I have a solid block, which represents the earth, and a horizontal pipe passing through it. Now the temperature of the underground soil will vary with depth and with season. I have an expression for that, where it varies exponentially with depth and sinusoidally with time (in the same equation). Now the temperature of the soil in the pipe vicinity will be affected by the heat pump and the heat pump performance will in turn be affected by the soil temperature.

And this is where I get stuck. If I patch the earth block for a temperature profile that varies with depth, it doesn't include the time dependence. Please help me. Is there any more information I need to provide?
rachana is offline   Reply With Quote

Old   May 23, 2013, 03:05
Default
  #4
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17
mvee is on a distinguished road
Is it possible to upload schematic diagram along with BC and the expression for temperature?
mvee is offline   Reply With Quote

Old   May 23, 2013, 19:55
Default
  #5
New Member
 
Rachana Vidhi
Join Date: Dec 2012
Posts: 8
Rep Power: 13
rachana is on a distinguished road
I am attaching the schematic of the problem. This is the temperature profile of undisturbed soil:
T_soil = T_avg - A exp[-z (π/365a)^(1⁄2) ]∙ cos{2π/365 [t-t0 - z/2 (365/πa)^(1/2) ]}

Tavg, A, t0 are constants. As you see the "exp" term signifies the change with depth (z). The "cosine" term depends on time (t) and has a phase term that depends on depth.

As the air passes through the pipe at a temperature of T_air, the soil temperature around the pipe will get affected. But the total size of the earth block is very large (decided from literature and personal experience). So at the top, side and bottom surfaces of the earth block, heat flux is zero.
Attached Images
File Type: jpg air_2D_3.jpg (49.2 KB, 105 views)
rachana is offline   Reply With Quote

Old   May 24, 2013, 01:33
Default
  #6
Senior Member
 
Vaze
Join Date: Jun 2009
Posts: 172
Rep Power: 17
mvee is on a distinguished road
where are you going to define the temperature i.e on which face? When you represent temp. as a function of 'z', it will have 1D variation.
Now if you are saying that this temperature will be for same throughout the 'x', then this condition can be defined by profile condition. This profile can be incorporated as a function of time also. or else you have add the second coordinate into expression. and then you can have UDF.
mvee is offline   Reply With Quote

Old   May 24, 2013, 12:35
Default
  #7
New Member
 
Rachana Vidhi
Join Date: Dec 2012
Posts: 8
Rep Power: 13
rachana is on a distinguished road
This profile applies to the complete earth block, where z=0 at the top of the surface. The variation occurs vertically. The resulting profile (undisturbed soil) at a fixed time should be something like that shown in the figure. It doesn't change horizontally. I obtained this by defining a custom field function and patching the earth block with that. This profile doesn't include time variation. How do I include that? Please let me know.
Attached Images
File Type: jpg field_function.jpg (56.7 KB, 80 views)
rachana is offline   Reply With Quote

Old   August 23, 2013, 16:10
Default Temp.varying with space and Time
  #8
New Member
 
AMSharma
Join Date: Apr 2012
Posts: 12
Rep Power: 14
avi@lpsc is on a distinguished road
Did you write udf for mentioning temperature on block surfaces?
I am also trying to model this problem..would you please share the model udf for temp.varying with depth and time.
Shall be thankful
avi@lpsc is offline   Reply With Quote

Old   October 15, 2013, 06:08
Question
  #9
New Member
 
Flavio G.
Join Date: Sep 2013
Posts: 4
Rep Power: 13
JouleBrayton is on a distinguished road
How did you solve this problem?? Is it possible to define time dependent cell condition? Thanks.
JouleBrayton is offline   Reply With Quote

Old   December 3, 2014, 16:12
Default
  #10
Member
 
Join Date: May 2014
Posts: 31
Rep Power: 12
reza67 is on a distinguished road
could anyone write this udf ?

i have the same problem
reza67 is offline   Reply With Quote

Old   June 1, 2018, 17:30
Default
  #11
Member
 
Join Date: Nov 2016
Posts: 34
Rep Power: 10
ywan168 is on a distinguished road
Quote:
Originally Posted by rachana View Post
This profile applies to the complete earth block, where z=0 at the top of the surface. The variation occurs vertically. The resulting profile (undisturbed soil) at a fixed time should be something like that shown in the figure. It doesn't change horizontally. I obtained this by defining a custom field function and patching the earth block with that. This profile doesn't include time variation. How do I include that? Please let me know.
Hello, rachana,

Now I have the same problem, and I see some users and researchers are facing the same problem, could you please share this UDF for us in your convenience?

Thank you!
ywan168 is offline   Reply With Quote

Old   March 15, 2020, 05:45
Default
  #12
New Member
 
sajjan
Join Date: Jan 2016
Location: Nepal
Posts: 13
Rep Power: 10
sajjan is on a distinguished road
I am facing the similar problem. Can someone please share the UDF file or any idea if anyone was able to solve the issue?

Thanks
sajjan is offline   Reply With Quote

Old   March 15, 2020, 09:06
Default Scenario
  #13
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
It is not the UDF that is difficult but the approach. If the objective is clear then UDF can be written in a few minutes.
sajjan likes this.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Reply

Tags
cell zone, time dependent, udf


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
UDF for 3rd Kind Boundary Condition Ismail FLUENT 2 October 26, 2015 02:57
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 12:25
UDF fluent, Cell Zone natantyt Fluent UDF and Scheme Programming 1 August 30, 2011 16:18
UDF hook on the WALL boundary condition Luke FLUENT 0 June 7, 2006 12:54
How to write udf of slip wall condition cxzhao FLUENT 0 April 27, 2005 22:20


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