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

UDF code for DPM

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

Like Tree2Likes
  • 1 Post By pakk
  • 1 Post By pakk

Reply
 
LinkBack Thread Tools Display Modes
Old   February 22, 2016, 04:31
Default UDF code for DPM
  #1
New Member
 
Iman
Join Date: Dec 2014
Posts: 4
Rep Power: 3
Iman Afrooz is on a distinguished road
Hello everyone,

I am new in Fluent and I am trying to simulate a 3D Fluidized Bed having cylindrical geometry.The geometry is a cylinder Bed with diameter of 7.62 cm and the height of 500 cm, an Airbox with the same diameter but with length of the 17 cm And a distributor plate having 21 holes in between. The diameter of holes are 1 mm with the length of 5 mm (Photo is attached). The velocity inlet is applied at the bottom surface of the Airbox. The pressure outlet is applied at the top surface of the Bed. The sand particles are injected to the system using file injection. I used DPM technique but I faced with the following errors after 3 iterations:

---------------------------------------------------------------------------------------
Updating solution at time level N... done.
Injecting 41595 particle parcels with mass 0.540735 at t = 0

Advancing DPM injections ....
number tracked = 41595, escaped = 0, aborted = 0, trapped = 0, evaporated = 0, incomplete = 0
number tracked = 41595, escaped = 0, aborted = 0, trapped = 0, evaporated = 0, incomplete = 0
number tracked = 41595, escaped = 0, aborted = 0, trapped = 0, evaporated = 0, incomplete = 0
number tracked = 41595, escaped = 0, aborted = 0, trapped = 0, evaporated = 0, incomplete = 0
number tracked = 41595, escaped = 0, aborted = 0, trapped = 0, evaporated = 0, incomplete = 0
iter continuity u-air v-air w-air time/iter
1 1.0000e+00 3.9691e-02 9.0649e-01 5.7379e-01 0:00:49 49
2 1.0000e+00 3.2715e-01 4.2793e-01 2.9460e-01 0:00:38 48
3 1.0000e+00 1.8774e-01 3.0985e-01 1.4735e-01 0:00:30 47
# Divergence detected in AMG solver: mp-x-momentum -> Decreasing coarsening group size!
# Divergence detected in AMG solver: mp-x-momentum -> Increasing relaxation sweeps!
# Divergence detected in AMG solver: pressure correction -> Turning off correction scaling!
# Divergence detected in AMG solver: pressure correction -> Increasing relaxation sweeps!

Error: Divergence detected in AMG solver: pressure correction

Error: Divergence detected in AMG solver: pressure correction
Error Object: #f
---------------------------------------------------------------------------------------

I think the problem is due to the coarse meshing that is expanded from small holes of distributor plate to the big cylinder of the bed. So if I can write UDF codes then this problem might be solved. But I don't know how to write CFD codes. Can someone please give me help on this problem by writing UDF for me?

Thank you in advance.
Attached Images
File Type: bmp FBed.bmp (37.0 KB, 7 views)
Iman Afrooz is offline   Reply With Quote

Old   February 22, 2016, 05:02
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 919
Rep Power: 12
pakk will become famous soon enough
If the problem is that you have a bad mesh, you should improve the mesh.

I don't see how a UDF can help here (but I may be wrong). What do you want the UDF to do?
pakk is offline   Reply With Quote

Old   February 22, 2016, 05:26
Default
  #3
New Member
 
Iman
Join Date: Dec 2014
Posts: 4
Rep Power: 3
Iman Afrooz is on a distinguished road
Quote:
Originally Posted by pakk View Post
If the problem is that you have a bad mesh, you should improve the mesh.

I don't see how a UDF can help here (but I may be wrong). What do you want the UDF to do?
Dear Pakk,

Thank you for your reply. I tried different mesh but didn't work. When I use only a simple cylinder (without holes), it works and simulation is converged. But when I add holes to the geometry, I face with the same problem.
Actually, I was thinking if I can use CFD codes then no need to draw a geometry and mesh. Please correct me if I am wrong.
Iman Afrooz is offline   Reply With Quote

Old   February 22, 2016, 05:33
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 919
Rep Power: 12
pakk will become famous soon enough
Quote:
Actually, I was thinking if I can use CFD codes then no need to draw a geometry and mesh.
How should that work? What should the UDF code do?

UDFs are not Harry Potter magic, they don't get results out of nothing. A UDF is only a method to tell the computer what to do. What do you want the computer do? Maybe you have a really smart idea on how a UDF can help you in your problem, but if you don't tell what your idea is, I can not say if it is a good idea.
pakk is offline   Reply With Quote

Old   February 22, 2016, 05:43
Default
  #5
New Member
 
Iman
Join Date: Dec 2014
Posts: 4
Rep Power: 3
Iman Afrooz is on a distinguished road
Quote:
Originally Posted by pakk View Post
How should that work? What should the UDF code do?

UDFs are not Harry Potter magic, they don't get results out of nothing. A UDF is only a method to tell the computer what to do. What do you want the computer do? Maybe you have a really smart idea on how a UDF can help you in your problem, but if you don't tell what your idea is, I can not say if it is a good idea.
Dear Pakk,

Harry Potter magic hahaha
I really don't have any idea. I was told by someone that instead of drawing the geometry, we can use CFD codes. So my question is: Is it possible to define a geometry and boundary conditions only using CFD codes?
Or Could you please suggest the other options to me?
Thank you.
Iman Afrooz is offline   Reply With Quote

Old   February 22, 2016, 11:02
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 919
Rep Power: 12
pakk will become famous soon enough
It might be possible to make code that makes your geometry and your mesh. But what would that help? You already have a geometry and a mesh. So it would be a lot of work to get at the same point that you are now...

Your simulation diverged. Unfortunately, that happens many times. And, in my experience, in most cases this can and should be solved by improving the mesh.
In your case, the problem is with the mesh. You even showed that yourself: you changed your geometry to make meshing easier, and all problems were gone. Your challenge now is to get a mesh with a good quality for the more complicated geometry.
Iman Afrooz likes this.
pakk is offline   Reply With Quote

Old   February 22, 2016, 11:13
Default
  #7
New Member
 
Iman
Join Date: Dec 2014
Posts: 4
Rep Power: 3
Iman Afrooz is on a distinguished road
Quote:
Originally Posted by pakk View Post
It might be possible to make code that makes your geometry and your mesh. But what would that help? You already have a geometry and a mesh. So it would be a lot of work to get at the same point that you are now...

Your simulation diverged. Unfortunately, that happens many times. And, in my experience, in most cases this can and should be solved by improving the mesh.
In your case, the problem is with the mesh. You even showed that yourself: you changed your geometry to make meshing easier, and all problems were gone. Your challenge now is to get a mesh with a good quality for the more complicated geometry.
Do you know any literature that I can use to improve my meshing technique? Any notes, books or even YouTube videos?
Thanks
Iman Afrooz is offline   Reply With Quote

Old   February 23, 2016, 04:35
Default
  #8
Senior Member
 
Join Date: Nov 2013
Posts: 919
Rep Power: 12
pakk will become famous soon enough
Not really... I think a good way to learn it is just to fool around with settings, and see what works and what not.
Iman Afrooz likes this.
pakk is offline   Reply With Quote

Reply

Tags
dpm fluent model, fluidized bed, udf code

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use UDF to obtain the thred of the interface between the liquid and the wall? hellowqy Fluent UDF and Scheme Programming 8 December 17, 2015 11:03
power law udf code b.p.v FLUENT 0 August 5, 2015 13:10
How to transfer a 2D UDF code into 3D? Jo_vivian_lee Fluent UDF and Scheme Programming 0 August 26, 2012 03:36
Sos!!! Udf code Jo_vivian_lee Fluent UDF and Scheme Programming 1 August 16, 2012 00:09
Brownian Motion UDF Code Confuser FLUENT 1 November 1, 2005 11:37


All times are GMT -4. The time now is 00:06.