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

Cell properties in UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 22, 2000, 16:55
Default Cell properties in UDF
  #1
Arturo Ortiz
Guest
 
Posts: n/a
Hi all

I am working in a porous media, and I would like to work with a property for each cell different of all those given by fluent by default. I foresight two possibilities and would like to know your opinion; work with an internal array inside a UDF (harder to implement) and adding an all new property in the mem.h file (is it possible, and how?). Do you suggest another one?

Thanks
  Reply With Quote

Old   September 25, 2000, 19:56
Default Re: Cell properties in UDF
  #2
Greg Perkins
Guest
 
Posts: n/a
I think the easiest way to implement a new property for your problem is to use a user defined scalar. You can use this either (i) as a storage variable or (ii) to solve a scalar pde for the property at each iteration. Fluent already provides macros for accessing the data (C_UDSI ??) and you can post-process the results in the GUI. Also the storage is fully handled by Fluent code - I think it will be painful to add your own routines to properly handle data for each cell, since Fluent 5 uses a complicated storage structure - which probably only they fully understand!
  Reply With Quote

Old   September 25, 2000, 20:17
Default Re: Cell properties in UDF
  #3
Greg Perkins
Guest
 
Posts: n/a
This is further to my posting above. . .

What property do you wish to change ?? If you want say permeability/porosity to be a local property then I suggest using a user defined scalar above and linking this value to the code I posted some weeks ago to determine the local drag on the gas/fluid phase.

This gets tricky to do though in Fluent 5, because the convective flux (and some other terms) then needs to be scaled appropriately by the porosity, which is now a local property - which Fluent is unaware of. I tried (4 weeks) but couldn't work out how to add these terms within Fluent 5 - essentially you want to modify the internally computed terms but can't - so need to add a corrective source term - which gets majorly painful - and it's likely to become a good source of error even if you get something working!

In this case, and because I also wanted a reacting porous medium, I moved to Fluent 4.5 which implements the full two-phase Eulerian model. Fluent 4.5 is quite OK, in fact I prefer the user code facility - mainly because its simpler and you can work out the undocumented features for yourself - not like in Fluent 5. In my case I've developed code in C, which implements a generalsised heterogeneous set of chemical reactions between a mutli-species porous solid and multi-species gas/fluid - for coal combustion applications, linked it in with the Fluent Fortran user code and parallelised it for SGI machines.

But I am waiting for Fluent 6 - which hopefully will be good and allow unstructured meshes with the Eulerian model...?!

  Reply With Quote

Old   September 26, 2000, 00:37
Default Re: Cell properties in UDF
  #4
Arturo Ortiz
Guest
 
Posts: n/a
Thanks for your help, I am in the same problem as you. I am trying to change the permeability with time and will try to follow your advice. The problem is that the available tutorial documentation in Fluent 4.5 is quite scarce and I will fight a lot with that.
  Reply With Quote

Old   September 26, 2000, 00:40
Default Re: Cell properties in UDF
  #5
Greg Perkins
Guest
 
Posts: n/a
Well there perhaps aren't as many tutorials, but the user defined coding is actually better documented, and you just use the template fortran routines to calculate your source terms - in order words you don't need to write a whole routine - only the interesting bit!!!

Other than that its similar to v5 and other codes. It will take some time - but at least its possible, which may not be the case in Fluent v5 depending on your problem!!
  Reply With Quote

Old   September 26, 2000, 00:58
Default Re: Cell properties in UDF
  #6
Arturo Ortiz
Guest
 
Posts: n/a
I was refering to the UDS documentation. In the manual there exists only a single chapter on UDF's in Fluent 4.5.( in fluent's site). I wonder if I can keep in touch so I can ask a few questions. People from fluent had already told me about the problems in f 5.3 and I think that I will use your approach. Thanks again.
  Reply With Quote

Old   September 26, 2000, 11:53
Default Re: Cell properties in UDF
  #7
Arturo Ortiz
Guest
 
Posts: n/a
According to the fluent the UDS must be compiled with absoft fortran (which I do not have) I wonder if you work in NT and if it is possible to compile the code with other compiler as compaq fortran ( the one I have ). Have you tried?

Is it possible for you to post a simple code so I can figure out how to write the porous media problem?

thanks
  Reply With Quote

Old   October 13, 2000, 23:34
Default Re: Cell properties in UDF
  #8
Harry
Guest
 
Posts: n/a
I've the problem in UDF too. i want to model buble break up and coalescence in FLUENT 5.1, but there's only limited information on me about UDF. Just browsing the header file, i know that it's painfull to solve the problem in UDF.

then i plan to solve the problem using my own code (maybe in MATHLAB). but i've the problem in gaining local information about U,V,W velocity, turb, disp, location of coordinate, cell volume, projected areas etc. in my own arrangement.

Can anyone tell me how to write an UDF to solve this problem

thanks
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Loop over the faces of a cell in UDF Anthony Wachs Fluent UDF and Scheme Programming 6 April 2, 2024 10:10
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 21:58
UDF for fuel cell model Anant FLUENT 0 January 3, 2005 07:27
Warning 097- AB Siemens 6 November 15, 2004 04:41


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