|
[Sponsors] |
Macros for cell volume particle is in DPM (fluent 18.1) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 26, 2018, 16:13 |
Macros for cell volume particle is in DPM (fluent 18.1)
|
#1 |
Member
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10 |
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 |
|
March 27, 2018, 11:27 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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.
|
|
March 28, 2018, 10:08 |
|
#3 |
Member
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10 |
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) |
|
March 28, 2018, 10:47 |
|
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
This does not work because you are not telling what c0 is.
|
|
March 28, 2018, 10:49 |
|
#5 |
Member
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10 |
I have put cell_t c0; which tells what c0 is. is that wrong there?
|
|
March 28, 2018, 10:52 |
|
#6 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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. |
|
March 28, 2018, 10:53 |
|
#7 |
Member
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10 |
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?
|
|
March 28, 2018, 10:57 |
|
#8 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
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.
|
|
March 28, 2018, 11:02 |
|
#9 |
Member
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10 |
would cell_t c0 = TP_CELL(tp); specify the cell the particle is in?
|
|
March 28, 2018, 11:16 |
|
#10 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Did you check the table?
|
|
March 28, 2018, 11:17 |
|
#11 |
Member
sunil kumar
Join Date: May 2016
Posts: 80
Rep Power: 10 |
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
|
|
March 28, 2018, 11:19 |
|
#12 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Did you see the text next to "TP_CELL(tp)" in that table? It answers almost literally what you are asking me...
|
|
|
|
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 |