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

UDF for body force in DPM

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   August 23, 2011, 09:12
Default
  #41
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Quote:
Originally Posted by elah599 View Post
Dear Amir
I read the help of fluent for UDS and unfortunately I didn't get what should I do. do I have to solve the flow for multiphase flow or single phase flow? is just enough to consider coefficient of diffusion in material tab? if you have a simple case file, it would be great if you can send me that until I know what should I do. because I didn't find a proper tutorial for this concept.
thanks for your support
Dear Iman,

Generally, you can add number of extra scalar transport to current solver; e.g.: \partial(\rho C)/\partial t+\nabla.(\rho UC)=\nabla.(D\nabla C) + sources
They are added to another equations which are provided; something like energy equation, so it's not need to use multiphase models, it's applicable to single phase as well. Just note dimension of diffusion coefficient which you have to set in kg/(m.s); i.e, it's \rho D not D. Other setting is like setting of energy equation, you would need B.C and .... The result is particle concentration (C) as it's expected.
Unfortunately, I don't have small case which I can upload now; nevertheless, if these tips couldn't help you, inform me and I'll prepare one.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   January 26, 2012, 16:41
Default
  #42
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
Quote:
Originally Posted by Amir View Post
Dear Iman,

Generally, you can add number of extra scalar transport to current solver; e.g.: \partial(\rho C)/\partial t+\nabla.(\rho UC)=\nabla.(D\nabla C) + sources
They are added to another equations which are provided; something like energy equation, so it's not need to use multiphase models, it's applicable to single phase as well. Just note dimension of diffusion coefficient which you have to set in kg/(m.s); i.e, it's \rho D not D. Other setting is like setting of energy equation, you would need B.C and .... The result is particle concentration (C) as it's expected.
Unfortunately, I don't have small case which I can upload now; nevertheless, if these tips couldn't help you, inform me and I'll prepare one.

Bests,
Hi Amir,
I'm interested in scalar transport for solving such problem,can you help me about this or send a case about this for me???
m.salemi is offline   Reply With Quote

Old   January 27, 2012, 04:35
Default
  #43
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Hi,

Do not hesitate to ask if it's not clear. Just preparing a case is not helpful I think, because it's really case dependent.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   January 28, 2012, 15:34
Default
  #44
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
Quote:
Originally Posted by Amir View Post
Hi,

Do not hesitate to ask if it's not clear. Just preparing a case is not helpful I think, because it's really case dependent.

Bests,
Hi Amir,
thanks a lot,
i want to modeling effect of nanoparticles in water,can you help me???
m.salemi is offline   Reply With Quote

Old   January 28, 2012, 16:50
Default
  #45
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Quote:
Originally Posted by m.salemi View Post
Hi Amir,
thanks a lot,
i want to modeling effect of nanoparticles in water,can you help me???
Hi,

sure; using Eulerian method seems reasonable for your purpose if it matches with your goal; nevertheless, selecting Lagrangian procedure has few issues specially in nano particles; so the only thing you have to do is to activate a scalar equation, set proper diffusivity and UDS BC; isn't it clear or face a trouble?

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   January 28, 2012, 17:49
Default
  #46
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
Quote:
Originally Posted by Amir View Post
Hi,

sure; using Eulerian method seems reasonable for your purpose if it matches with your goal; nevertheless, selecting Lagrangian procedure has few issues specially in nano particles; so the only thing you have to do is to activate a scalar equation, set proper diffusivity and UDS BC; isn't it clear or face a trouble?

Bests,
Thanks a lot dear Amir,
but isn`t clear, i don`t know proper diffusivity and BC for this problem, can you explain this???
m.salemi is offline   Reply With Quote

Old   January 29, 2012, 04:06
Default
  #47
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Quote:
Originally Posted by m.salemi View Post
Thanks a lot dear Amir,
but isn`t clear, i don`t know proper diffusivity and BC for this problem, can you explain this???
The diffusivity of a substance in another is obtained from kinetic theory and you have to find it from literature (D). This parameter has a dimension of (m2/s) but as I explained the scalar transport equation is:
\partial(\rho C)/\partial t+\nabla.(\rho UC)=\nabla.(\rho D\nabla C) + sources
and you have to set \rho D for FLUENT which has a dimension of (kg/m.s), but note that the \rho is the base fluid density and D is diffusivity of desired substance in that fluid.
About the BCs, you have 3 options to set value or gradient or write a UDF for that; you have to set appropriate BC according to your model; e.g., if you set zero gradient it means that there isn't any penetration of the UDS and if you set zero value it means that there is a sink of that UDS.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   January 29, 2012, 11:31
Default
  #48
New Member
 
mamad
Join Date: Aug 2010
Posts: 15
Rep Power: 6
m.salemi is on a distinguished road
Quote:
Originally Posted by Amir View Post
The diffusivity of a substance in another is obtained from kinetic theory and you have to find it from literature (D). This parameter has a dimension of (m2/s) but as I explained the scalar transport equation is:
\partial(\rho C)/\partial t+\nabla.(\rho UC)=\nabla.(\rho D\nabla C) + sources
and you have to set \rho D for FLUENT which has a dimension of (kg/m.s), but note that the \rho is the base fluid density and D is diffusivity of desired substance in that fluid.
About the BCs, you have 3 options to set value or gradient or write a UDF for that; you have to set appropriate BC according to your model; e.g., if you set zero gradient it means that there isn't any penetration of the UDS and if you set zero value it means that there is a sink of that UDS.

Bests,
Hi amir
Thanks a lot for your answering...
i have some question about your answer,
should i solve this equation with continuity,momentum and energy equations and coupled with them???if yes, how can i do this work???
and can i use this equation in common model or i should use DPM or other model???
m.salemi is offline   Reply With Quote

Old   January 29, 2012, 16:10
Default
  #49
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Hi,
Quote:
Originally Posted by m.salemi View Post
should i solve this equation with continuity,momentum and energy equations and coupled with them???if yes, how can i do this work???
No, this equation is solved in decoupled manner with both pressure and density based solvers.
Quote:
Originally Posted by m.salemi View Post
and can i use this equation in common model or i should use DPM or other model???
No, you can use this equation with any solver; it just adds additional equations.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   June 15, 2012, 20:51
Default loop over particles
  #50
Member
 
Shawn Fotovati
Join Date: Jul 2009
Location: Cincinnati, OH
Posts: 41
Rep Power: 8
sfotovati is on a distinguished road
Hi guys,

I need to find electromagnetic force induced by other particles over the tracked particle. Can I loop over particles while I am using DEFINE_DPM_BODY_FORCE ??!

I tried "loop(p,I->p)", but it did not work. I also used "begin_particle_cell_loop" macro, it did not work either.

Please let me know if you can help me.

Thanks

Shahryar.
sfotovati is offline   Reply With Quote

Old   June 17, 2012, 04:50
Default
  #51
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Quote:
Originally Posted by sfotovati View Post
Hi guys,

I need to find electromagnetic force induced by other particles over the tracked particle. Can I loop over particles while I am using DEFINE_DPM_BODY_FORCE ??!

I tried "loop(p,I->p)", but it did not work. I also used "begin_particle_cell_loop" macro, it did not work either.

Please let me know if you can help me.

Thanks

Shahryar.
Dear Shahryar,

You cannot make a loop over particles in this macro because the particles are tracked sequentially.

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Old   June 17, 2012, 05:51
Default
  #52
Member
 
Shawn Fotovati
Join Date: Jul 2009
Location: Cincinnati, OH
Posts: 41
Rep Power: 8
sfotovati is on a distinguished road
Thanks for the reply Amir,

What about the macro "begin_particle_cell_loop"?
I tried that one. I was able to compile it but it gives me access_violation error as I run the DPM. Do you have any idea how to use this macro in define DPM body force?

Thanks.
sfotovati is offline   Reply With Quote

Old   June 17, 2012, 07:38
Default
  #53
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Shiraz, Iran
Posts: 739
Blog Entries: 1
Rep Power: 14
Amir is on a distinguished road
Quote:
Originally Posted by sfotovati View Post
Thanks for the reply Amir,

What about the macro "begin_particle_cell_loop"?
I tried that one. I was able to compile it but it gives me access_violation error as I run the DPM. Do you have any idea how to use this macro in define DPM body force?

Thanks.
There isn't any conceptual difference. You cannot loop over particles according to their index or location because of sequential algorithm. You need to change your algorithm; maybe select another macro or use temporary memories to store particle effects ......

Bests,
__________________
Amir
Amir is offline   Reply With Quote

Reply

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
UDF for defining a body force in Singel ROtating Reference Frame teymourj FLUENT 2 July 28, 2011 17:45
UDF force on a face enry Fluent UDF and Scheme Programming 10 March 23, 2011 11:48
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29
DPM with UDF - Step-by-Step Procedure???? Prashanth FLUENT 3 April 3, 2009 17:45
DPM drag force UDF hedonists FLUENT 0 March 12, 2003 22:10


All times are GMT -4. The time now is 22:26.