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

Macros for cell volume particle is in DPM (fluent 18.1)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 26, 2018, 16:13
Default Macros for cell volume particle is in DPM (fluent 18.1)
  #1
Member
 
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10
skumar112 is on a distinguished road
Hello

I wanted to inquire what the macros is for the volume of the cell the particle is IN. I have tried using C_VOLUME(c,t) however I keep getting back an error illegal index, indirection not allowed
skumar112 is offline   Reply With Quote

Old   March 27, 2018, 11:27
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Can you show how you tried this? The macro is correct, by without context I can not see how you specified c and t, or even if you forgot to do that.
pakk is offline   Reply With Quote

Old   March 28, 2018, 10:08
Default
  #3
Member
 
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10
skumar112 is on a distinguished road
I have changed this to what I have included below however this still does not seem to be working.
cphase_state_t *c = &(tp->cphase[0]);
Thread *t = TP_CELL_THREAD(tp);
cell_t c0;
volume = C_VOLUME(c0,t)
skumar112 is offline   Reply With Quote

Old   March 28, 2018, 10:47
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
This does not work because you are not telling what c0 is.
pakk is offline   Reply With Quote

Old   March 28, 2018, 10:49
Default
  #5
Member
 
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10
skumar112 is on a distinguished road
I have put cell_t c0; which tells what c0 is. is that wrong there?
skumar112 is offline   Reply With Quote

Old   March 28, 2018, 10:52
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
You have told the compiler that c0 is a variable of the type "cell_t" (well done!). But you did not say the value of c0!

Fluent does not know which cell is c0! You still have to tell Fluent that you want c0 to be the cell that the particle is in.
pakk is offline   Reply With Quote

Old   March 28, 2018, 10:53
Default
  #7
Member
 
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10
skumar112 is on a distinguished road
That makes a lot of sense !!! that part was confusing me quite a bit how fluent knows which cell volume to calculate. How would I go about doing this?
skumar112 is offline   Reply With Quote

Old   March 28, 2018, 10:57
Default
  #8
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
There are some macros in the manual. Look in "Table 3.29: Macros for Particle Cell Index and Thread Pointer Defined in dpm_types.h" in the Fluent Customization Manual.
pakk is offline   Reply With Quote

Old   March 28, 2018, 11:02
Default
  #9
Member
 
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10
skumar112 is on a distinguished road
would cell_t c0 = TP_CELL(tp); specify the cell the particle is in?
skumar112 is offline   Reply With Quote

Old   March 28, 2018, 11:16
Default
  #10
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Did you check the table?
pakk is offline   Reply With Quote

Old   March 28, 2018, 11:17
Default
  #11
Member
 
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10
skumar112 is on a distinguished road
Yes I got the macros from the table, from my best guess that should do the trick. I just wanted to make sure I wasn't wrong
skumar112 is offline   Reply With Quote

Old   March 28, 2018, 11:19
Default
  #12
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Did you see the text next to "TP_CELL(tp)" in that table? It answers almost literally what you are asking me...
pakk 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
DPM particle tracking considering particle size oball Fluent UDF and Scheme Programming 4 October 6, 2019 15:42
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
Hooking a DPM Particle Heat and Mass Transfer UDF to FLUENT subhankar_bhandari Fluent UDF and Scheme Programming 0 August 19, 2010 04:09
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


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