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/)
-   -   cell field variable for electric current density (https://www.cfd-online.com/Forums/fluent-udf/197884-cell-field-variable-electric-current-density.html)

redwanamit034 January 19, 2018 15:12

cell field variable for electric current density
 
I need to write a UDF for a heat source which is a function of electric current.
What is the cell field variable for electric current density?
I did not find anything in UDF manual.

Thanks in advance.

redwanamit034 January 19, 2018 15:42

I have activated the electric potential model in fluent which allows me add joule heating and electric potential in the model. However, I need to add additional heat source which is a function of electric current. What I understand from fluent manual is that I need to write a UDF using the define_source macro. but to write my equation in that UDF, I need to know the cell field variable for current density which I did not find in the manual.:confused::confused::confused:

AlexanderZ January 21, 2018 20:17

If your are talking about Single-Potential Battery Model, you may find source for that model in fluent files, by default the path is:

C:\Program Files\ANSYS Inc\v182\fluent\fluent18.2.0\addons\battery\src

in file battery.h you may find information about UDF variables:
Code:

enum {
  CURRENT = 0, /* 0 */
  CURR_X,
  CURR_Y,
  CURR_Z,
  CURR_M,      /* Magnitude of current density vector  */
  OHMIC_SOURCE,
  ECHEM_SOURCE,
  ACTIVATION,
  DISCHARGE_DEPTH,
  U_FUNC,
  Y_FUNC,
  VOLTAGE_JUMP,
  RESIST_EFF,
  OTHER,
  NO_OF_UDMS  /* 14 */
};

Here udmi_0 variable is CURRENT; udmi_1 variable is CURR_X and so on.

Best regards

redwanamit034 January 22, 2018 13:13

Thanks a lot for your reply.

I assume the UDM index of Battery module would be different from other modules. For my model, I either have to use the MHD module or the electric potential model available in fluent 17.2. Unfortunately, I could not find a similar .c or .h source file for MHD module in MHD module directory.

paoching July 3, 2018 16:57

Did you find the cell variable for electric current density?
i'm writing a UDF for galvanic corrosion rate and would like to call the electric current for each cell to calculate the corrosion rate.
and as a general question, is there a list somewhere the available cell variable one can retrieve using the "real" command?


All times are GMT -4. The time now is 14:23.