# UDS porous media

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

 LinkBack Thread Tools Display Modes
 September 13, 2002, 02:47 UDS porous media #1 Nagendra Guest   Posts: n/a Sponsored Links Hi, I am trying to add an energy equation for the solid material in the porous media in FLUENT. My User Defined Scalar is the Solid Temperature. My Diffusivity is the heat conduction and my source term is the convective heat transfer. I believe that using such a model I will be able to model a more realistic heat transfer between hot gasses flowing through a porous media. Could anyone please advice me whether the following steps are suitable: I write a code which contains DEFINE_DIFFUSIVITY, DEFINE_SOURCE and enum {T_SOLID}. I then try and compile this to my test case In Define>User Defined>Scalar I choose ONE for scalar and none for Flux Then I go to Boundary conditions for my porous media I add the source term and in the Materials panel I add uds_diffusivity for my porous solid I go to Control and solve for all the equations "including" my UDS Could anyone please tell me if this process is right as I couldn't find good details of UDS in FLUENT Thanks
 Sponsored Links

 September 14, 2002, 20:30 Re: UDS porous media #2 Greg Perkins Guest   Posts: n/a I've written some code for this -see www.perkins-software.com.au/Fluent Greg

 September 15, 2002, 22:35 Re: UDS porous media #3 Nagendra Guest   Posts: n/a Dear Mr. Perkins, Thanks for your response and code. I did look at your code and it really is well written and very comprehensive. I took the DEFINE_DIFFUSIVITY, DEFINE_SOURCE for solid energy/fluid energy and real Gas_Solid_HTC from your code and defined 2 UDS in "enum" - ZETA and SOLID_TEMP and compiled into my code. It did compile into FLUENT 6. But, could you also tell me what to do now after compiling, because it doesn't seem to work thereafter for me. This is what I do: 1. Go to Define>User Defined>Functions and compile your code (with mods as explained above) 2. Go to Define>User Defined>Scalars and pick 2 for scalars and none for Flux Functions 3. Go to materials panel and define uds_diffusivity for air (I am surprised that this diffusivity appears in fluid zone while theoretically it should appear for the porous material (solid) - don't you think theres an error here coz diffusivity is for the scalar SOLID_TEMP!!) 4. Go to "Fluid Zone" where my "porous" material is placed and add the source terms for solid and source terms for fluid. 5. Solve for SOLID_TEMP only and leave ZETA alone These are the steps that I followed but the code doesn't seem to be added properly!! FLUENT is unable to start!! could you please help me out with the post UDF processes. I'll be highly grateful Thanks

 September 15, 2002, 22:53 Re: UDS porous media #4 Greg Perkins Guest   Posts: n/a Hi, I think for Fluent 6 you should change the name of the UDS_Diffusivity macro to something else. Apparently Fluent 6 also uses this name internally, which wasn't the case in Fluent 5. Make sure you define enough UDSs and maybe check if you need UDMIs. I added some storage stuff there too. The UDS Diffusivity is the diffusivity for the user defined scalars - not for air. You connect the SRCE terms to the appropriate equation. For fluid energy this is the standard energy eqn, for the solid energy this is the solid_temp uds. Make sure you don't solve all uds's defined - just the solid temp (and may zeta if you want porosity to change - but you'll need to add a mass source eg. due to chemical reaction). You the solve-controls panel. Other than this, I really can't too many more details, due to time constraints sorry. Good Luck Greg

 September 16, 2002, 06:53 Re: UDS porous media #5 Sachin Guest   Posts: n/a Hi, Yes, I too used Greg's code and it is well written. You're right that the diffusivity shows up in the air panel because FLUENT says (section 9.2) that UDS can only be defined for the fluid cells !! So essentially, I feel that if you have to use an energy equation for solid material in your porous media, you should analyse it as an energy sink term in your energy equation for fluid. Another advice would be to include appropriate wall boundary conditions as they also affect the soln. I still am trying to figure out the right way to implement this UDS into FLUENT after it has been written and compiled.. !!

 September 16, 2002, 18:54 Re: UDS porous media #6 Greg Perkins Guest   Posts: n/a The code does these things - to some limited extent. Essentially the UDS sovles for the temperature of the solid phase. The solid and fluid energy udfs compute the interphase heat transfer based on the temperature difference and the surface area for heat transfer. You can set wall boundary conditions for the "solid temperature" using the UDS panels in Fluent. Ie for a constant solid wall temperature define the UDS for the solid temperature at a wall to be a certain value. Yes, you can extend this - I now have this model extended to include multiple solid phases, arbitrary chemical reactions and simple solids flow due to chemical consumption etc. But this code is far too complex to post so that's why I've just posted this simpler version to get people started. Its up to you guys to extend it for your applications. Or to write something even better - and post that back! Oh also note that due to limitations in Fluent re defintion of Cp, the above code only works within a steady solution method (or pseudo-steady) - ie you need to assume the gas phase is steady, since the transient term in the energy equation in Fluent is not handled correctly if you add another phase. Generally this is no problem since gas phase residence time is must shorter than the solid pahse. Greg

 September 17, 2002, 01:05 Re: UDS porous media #7 Nagendra Guest   Posts: n/a Dear Greg, This is an excellent code man.. it has started to run on my case, lets see how the results look like. I just took diffusivity (with its name changed coz of FLUENT internal naming), source terms for fluid and solid energy, specified wall BCs for fluid and UDS and its running fine now.. lets hope it continues Thanks a lot!

 September 18, 2002, 02:12 Re: UDS porous media #8 sachin Guest   Posts: n/a yippee.. the code is running finally for me. I am trying to get some experimental data or test cases to validate this now, coz, I have started to get contours which are making some sense, but, I want to know the accuracy will post the details when ready thanks greg sachin

 January 18, 2011, 10:07 #9 Member   Neil Duffy Join Date: Mar 2010 Posts: 34 Rep Power: 9 Hi, I realise this post is pretty old but does anyone have a copy of the code above or similar. much appreciated. Neil

 January 24, 2011, 11:16 #10 Member   Neil Duffy Join Date: Mar 2010 Posts: 34 Rep Power: 9 For those who are interested, I found it at http://www.cfd-online.com/Forums/flu...de-ht-1-a.html Excellent code, many thanks to Greg for posting it. Neil

 February 1, 2011, 21:57 #11 New Member   Oky Andytya Join Date: Nov 2010 Posts: 26 Rep Power: 8 Hi everyone, I'm trying simulation porous media in rectangular channel, but the result isn't suitable with any research. So, would you help me. I wish someone can check my simulation and give some reports if there is something wrong. Thank you for your help. Please send your e-mail, than i will send you my works to to your email. my e-mail: oky.andytya.net@gmail.com Regrads, OKY Andytya P note: I use ANSYS Fluent 6.3 [CFD]

July 21, 2016, 08:03
#12
New Member

Rastko Jovanovic
Join Date: Aug 2011
Posts: 6
Rep Power: 7
Quote:
 Originally Posted by Greg Perkins ;102632 I've written some code for this -see www.perkins-software.com.au/Fluent Greg
Dear Greg,

I downloaded your code long time ago. It was very useful for me. However, I have significantly changed it, and unfortunately I am not able to find original version. I have also tried to download it, but the provided link does not work anymore. Could you post another link to your udf, or send it to me via email. My email is rastko1979@gmail.com

 Thread Tools 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 On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Bernard Van FLUENT 29 January 26, 2017 05:09 Axius FLUENT 2 August 7, 2014 10:34 cp FLUENT 6 June 26, 2012 13:44 cp FLUENT 1 September 19, 2003 19:53 Igor Main CFD Forum 0 December 5, 2002 16:16

 Sponsored Links

All times are GMT -4. The time now is 13:41.

 Contact Us - CFD Online - Top