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

cell field variable for electric current density

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2018, 16:12
Default cell field variable for electric current density
  #1
New Member
 
RJC
Join Date: Jun 2015
Posts: 18
Rep Power: 9
redwanamit034 is on a distinguished road
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 is offline   Reply With Quote

Old   January 19, 2018, 16:42
Default
  #2
New Member
 
RJC
Join Date: Jun 2015
Posts: 18
Rep Power: 9
redwanamit034 is on a distinguished road
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.
redwanamit034 is offline   Reply With Quote

Old   January 21, 2018, 21:17
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,203
Rep Power: 32
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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
AlexanderZ is offline   Reply With Quote

Old   January 22, 2018, 14:13
Default
  #4
New Member
 
RJC
Join Date: Jun 2015
Posts: 18
Rep Power: 9
redwanamit034 is on a distinguished road
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.
redwanamit034 is offline   Reply With Quote

Old   July 3, 2018, 17:57
Default
  #5
New Member
 
Paul Lee
Join Date: Jun 2018
Location: Vancouver
Posts: 14
Rep Power: 6
paoching is on a distinguished road
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?
paoching is offline   Reply With Quote

Reply

Tags
current density, potential electric, udf code

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 12:04
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 08:30
Neighboring cells in tetrahedral mesh vishwesh OpenFOAM Programming & Development 9 November 10, 2017 08:06
How to use "translation" in solidBodyMotionFunction in OpenFOAM rupesh_w OpenFOAM Running, Solving & CFD 5 August 16, 2016 05:27
Implement simple barotropic relation - derive density field from pressure field GJM1991 OpenFOAM Programming & Development 6 May 8, 2016 16:43


All times are GMT -4. The time now is 16:17.