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

UDS porous media

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 13, 2002, 03:47
Default UDS porous media
  #1
Nagendra
Guest
 
Posts: n/a
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
  Reply With Quote

Old   September 14, 2002, 21:30
Default 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
  Reply With Quote

Old   September 15, 2002, 23:35
Default 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
  Reply With Quote

Old   September 15, 2002, 23:53
Default 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
  Reply With Quote

Old   September 16, 2002, 07:53
Default 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.. !!
  Reply With Quote

Old   September 16, 2002, 19:54
Default 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

  Reply With Quote

Old   September 17, 2002, 02:05
Default 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!
  Reply With Quote

Old   September 18, 2002, 03:12
Default 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
  Reply With Quote

Old   January 18, 2011, 10:07
Default
  #9
Member
 
Neil Duffy
Join Date: Mar 2010
Posts: 34
Rep Power: 16
neilduffy1024 is on a distinguished road
Hi,

I realise this post is pretty old but does anyone have a copy of the code above or similar. much appreciated.

Neil
neilduffy1024 is offline   Reply With Quote

Old   January 24, 2011, 11:16
Default
  #10
Member
 
Neil Duffy
Join Date: Mar 2010
Posts: 34
Rep Power: 16
neilduffy1024 is on a distinguished road
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
neilduffy1024 is offline   Reply With Quote

Old   February 1, 2011, 21:57
Default
  #11
oky
New Member
 
Oky Andytya
Join Date: Nov 2010
Posts: 26
Rep Power: 16
oky is on a distinguished road
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]
oky is offline   Reply With Quote

Old   July 21, 2016, 09:03
Default
  #12
New Member
 
Rastko Jovanovic
Join Date: Aug 2011
Posts: 7
Rep Power: 15
virrast is on a distinguished road
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
virrast is offline   Reply With Quote

Old   August 17, 2022, 14:30
Default
  #13
ymd
New Member
 
Madelina
Join Date: May 2020
Posts: 9
Rep Power: 6
ymd is on a distinguished road
When we use UDS for solid temperature, do we specify the UDS in the mixture phase or for phase 1 or 2? The unsteady function has a density term in the transport equation, where do we specify the solid's density?
ymd is offline   Reply With Quote

Reply


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
Porous media setup issues in Fluent Bernard Van FLUENT 29 January 26, 2017 05:09
How to model granular flow through porous media Axius FLUENT 2 August 7, 2014 11:34
UDS for Porous Media cp FLUENT 6 June 26, 2012 14:44
Porous media convection UDS equations cp FLUENT 1 September 19, 2003 20:53
porous media: Fluent or Star-CD? Igor Main CFD Forum 0 December 5, 2002 16:16


All times are GMT -4. The time now is 23:45.