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

FLUENT UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2001, 07:28
Default FLUENT UDF
  #1
sanjib das sharma
Guest
 
Posts: n/a
Is it possible to use the UDF in FLUENT to include a separate model not in FLUENT?For eg. I want to use k-e-kp model instead of k-e model,but that model is not there in FLUENT.If possible,how? please answer quickly.....
  Reply With Quote

Old   January 14, 2001, 18:53
Default Re: FLUENT UDF
  #2
Greg Perkins
Guest
 
Posts: n/a
If you can construct the mathematical source terms that need to be added to a particular equation then you should be able to implement them in Fluent. If your source terms need to make changes to the convective terms in the equation you can use the divergence theorem to convert them into volume source terms rather than face fluxes.

One warning - It may not be easy to implement though - it really depends on what you want to do.

On how - please read the UDF manual.

Greg
  Reply With Quote

Old   January 15, 2001, 00:45
Default Re: FLUENT UDF
  #3
sanjib das sharma
Guest
 
Posts: n/a
Thanks a lot,Greg.That means,I can use any turbulence model I want and use them in Fluent.Actually,I am modelling gas-solid two phase flow in a circulating fluidized bed.For the turbulence model I would like to replace the existing k-e model with another new model k-e-kp,where kp is another parameter like k,and involves a similar equation as an addition.Other extra terms follow.Also if I want to take particle-particle interaction I have to use additional equations.As far as I have understood from the manual,the UDF can only be used to modify a simple term,eg. A->3A etc.Am I right?
  Reply With Quote

Old   January 15, 2001, 01:06
Default Re: FLUENT UDF
  #4
Greg Perkins
Guest
 
Posts: n/a
The examples in the udf manual are starting points but you can make them arbitrarily complex - in reality I think you could implement pretty much anything - but as I said it can be difficult.

Think of the general equation form

accumulation + convection = diffusion + source

Now fluent gives you acces to the source part and depending on the equation you can also modify the co-efficients for convection, diffusion and in scalars the accumulation as well.

The thing to do is to determine your equation mathematically - then compare with Fluent equations. In case of turbulence your equation may differ from the standard k-e eqns by one source term or the computation of the diffusivity etc. In this case you may write a udf to modify or add the appropriate term. If your equation is unlike anything in Fluent you may use a scalar eqn to solve it. In this case you;d write other udf's to add sources etc to the momentum eqn or heat transfer eqn to get coupling between your scalar eqn and the normal Navier-Stokes eqns etc (if you take this approach you'd turn off Fluent's turbulence models). I can't see why you can't implement you own turbulence model using scalar transport eqns and couple it back to the other usual eqns. But I wouldn't recommend it because you;d also have to write routines to handle the boundary conditions and they are pretty complex in turbulence - so I'd try and modify the existing models first.

The only major issue is when you want to write terms which need to be computed using face fluxes - eg. convection terms. In this case you need to access a lot of internal Fluent data-structures which aren't explained in the manual. Its possible as I've found - just takes a bit of time that's all. Talk to the fluent engineers if you are unsure on implementation issues.

Oh and of course adding things may make fluent less robust - but I've found that so long as you're udfs are well written robustness isn't a big issue. It may take a while to get a good convergence procedure.

Greg
  Reply With Quote

Old   January 15, 2001, 01:37
Default Re: FLUENT UDF
  #5
Greg Perkins
Guest
 
Posts: n/a
By the way what version of Fluent are you using? v4.5 with Eulerian two-phase model??

Greg
  Reply With Quote

Old   January 15, 2001, 02:59
Default Re: FLUENT UDF
  #6
sanjib das sharma
Guest
 
Posts: n/a
no,FLUENT 5.0 SANJIB
  Reply With Quote

Old   January 15, 2001, 03:03
Default Re: FLUENT UDF
  #7
Greg Perkins
Guest
 
Posts: n/a
How do you model a fluidised bed in fluent 5.0? have you written a lot of udfs for this - or are you using the lagrangian dpm method - which I would have thought would not be that good for a fluidised bed where the solid volume fractions can be reasonably high??

Greg
  Reply With Quote

Old   January 15, 2001, 06:09
Default Re: FLUENT UDF
  #8
sanjib das sharma
Guest
 
Posts: n/a
well,till now i have only simulated gas-particle flow through a vertical pipe.i have used dilute concentrations,so that only lagrangian technique is useful.but as soon as i tried to increase the concentrations in case of a CFB,it didn't work that way.actually,i didn't use the udf in any of my previous simulations.but now i think i have to use that option.however,Fluent 4.5 has the eulerian-eulerian technique which i didn't use till now.what is your idea about that
  Reply With Quote

Old   January 15, 2001, 13:49
Default Re: FLUENT UDF
  #9
cfd
Guest
 
Posts: n/a
Could you give me some idea of how to run UDF code.
  Reply With Quote

Old   January 15, 2001, 18:38
Default Re: FLUENT UDF
  #10
Greg Perkins
Guest
 
Posts: n/a
In general I would have thought you would need to use a Eulerian-Eulerian model for the fluidised bed under normal operating conditions. Perhaps have a look in the literature for how others have done it. The Lagrangian method is only applicable for dilute concentrations (low volume fraction, low loading) as you mentioned.

Greg
  Reply With Quote

Old   January 16, 2001, 00:39
Default Re: FLUENT UDF
  #11
sanjib das sharma
Guest
 
Posts: n/a
Greg,can you send me an example of an UDF,where a new model has been used that is not there in Fluent?I'll be very thankful to you.I read the manual several times,but still could not figure out how it is to be done.It seems that you have written a lot of UDFs,so your suggestions will be of great help to me. Thanks anyway, Sanjib.
  Reply With Quote

Old   January 16, 2001, 00:41
Default Re: FLUENT UDF
  #12
Greg Perkins
Guest
 
Posts: n/a
Check out the udf repository at this forum or see www.perkins-software.com.au/Fluent for some examples.

Greg
  Reply With Quote

Old   January 16, 2001, 08:19
Default Re: FLUENT UDF
  #13
sanjib das sharma
Guest
 
Posts: n/a
Thanks a lot Greg.Seems you are an expert in writting UDFs.However,is the model,that you have used,already there in Fluent?I mean as I myself didn't solve the specific problem,so I could not understand eaxctly what modification your code did to the existing software.Could you please expalin in brief?It will be of great help to me. Best wishes, Sanjib
  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
fluent udf, saving data in udf mohsen zendehbad Fluent UDF and Scheme Programming 15 June 14, 2017 00:23
Transient pressure UDF for parallel fluent droberts Fluent UDF and Scheme Programming 5 October 11, 2010 05:13
Using Fluent with a UDF frm a remote m/c aarti FLUENT 2 September 11, 2008 20:53
UDF problem caused by various version of Fluent Yurong FLUENT 3 January 15, 2006 11:57
Can somebody send me a Fluent 6 UDF manual?? KKLAU FLUENT 4 April 14, 2004 17:37


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