CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   particle (eulerian) cell variable macro name (https://www.cfd-online.com/Forums/fluent-udf/156820-particle-eulerian-cell-variable-macro-name.html)

meangreen July 13, 2015 16:04

particle (eulerian) cell variable macro name
 
Hi All,

I am trying to write several UDFs and I found there is a serious lack of "cell variable macro names" in the UDF manuals (and almost anywhere I can look). For example, a cell variable for x-velocity is C_U(c,t). I was hoping someone could help me with the following properties I want to pull OUT of fluent in order to write a UDF. I am using the Eulerian multiphase option.

The properties I am looking for currently are constants, I just want to make sure the UDF can take the information out of Fluent so the user doesn't have to go in and change the UDF every time they want to run a different particle type (i.e. I want it idiot proof).

1. Particle diameter
2. Coefficient of Restitution

I would be happy to start compiling a list of cell variable macro names and posting on updating on the forum.

I have found the granular temperature is C_GT(c,t).

Thanks!

pakk July 14, 2015 10:23

Particle diameter is P_DIAM(p), but you can find that one in the manual. Restitution coefficient is a boundary condition property, so may be more difficult to find.

But a more general approach, that you could have used to find out that the granular temperature is C_GT: (I do not claim this is not user-friendly!)
  1. Look in storage.h for the storage variable with the name that comes closest to what you want. In this case: SV_GRANULAR_TEMPERATURE_MEAN.
  2. The internal structure of Fluent is such that you can access the corresponding variable with "C_STORAGE_R(c,t,SV_GRANULAR_TEMPERATURE)". (I don't know how and where the "_MEAN" part is removed, but I have seen that more often.)
  3. If you want to know if there is a shorter name for this, search in the text-files in the "src" folder for "SV_GRANULAR_TEMPERATURE", and if you have the same version as me, you will see in "granular.h" that you can do this with "C_GT(c,t)".

Looking in the header files is a way to find these 'undocumented features' of Fluent.

meangreen July 14, 2015 15:18

Thanks Pakk, I am going to give this a try in the next few days. I'll check back with questions if any come up, otherwise I'll list if I find any good results!

Thanks,
Casey

hwet September 3, 2015 01:33

And the others?
 
Quote:

Particle diameter is P_DIAM(p), but you can find that one in the manual. Restitution coefficient is a boundary condition property, so may be more difficult to find.

But a more general approach, that you could have used to find out that the granular temperature is C_GT: (I do not claim this is not user-friendly!)
Look in storage.h for the storage variable with the name that comes closest to what you want. In this case: SV_GRANULAR_TEMPERATURE_MEAN.
The internal structure of Fluent is such that you can access the corresponding variable with "C_STORAGE_R(c,t,SV_GRANULAR_TEMPERATURE)". (I don't know how and where the "_MEAN" part is removed, but I have seen that more often.)
If you want to know if there is a shorter name for this, search in the text-files in the "src" folder for "SV_GRANULAR_TEMPERATURE", and if you have the same version as me, you will see in "granular.h" that you can do this with "C_GT(c,t)".

Looking in the header files is a way to find these 'undocumented features' of Fluent.
Does that mean that for models such as for example the DPM breakup ones, they can be called into a UDF too by looking up in the src folder what fluent calls them?
From an earlier post on this forum I thought that you could not call a breakup model into a UDF and the only way to do it was write the whole breakup model code again in your UDF...


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