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

UDF for electrical conductivity and current density

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

Like Tree1Likes
  • 1 Post By rodrigovime

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2023, 18:16
Default UDF for electrical conductivity and current density
  #1
New Member
 
Mingli Yan
Join Date: Feb 2023
Posts: 1
Rep Power: 0
Mingli163 is on a distinguished road
Hi friends, hope you are all well!
I have encountered a problem with how to call the current density and electric potential from Fluent in UDF.
I'm using Fluent to simulate the sheath on the arc roots. The sheath is a thin layer, and its electrical conductivity is calculated from current density and electric potential by Ohm's law.
Now I plan to use DEFINE_PROPERTY(electric_conductivity, c,t) to define the electrical conductivity. However, I don't know how to call the current density and electric potential from Fluent in UDF. I know Fluent provides some macro like C_T(c,t) to call the temperature, but I can't find the macro to call the properties I want.
Could anyone give me some advice to solve this problem?
Thanks!
Mingli163 is offline   Reply With Quote

Old   April 3, 2025, 03:52
Default
  #2
New Member
 
shanma
Join Date: Apr 2025
Posts: 2
Rep Power: 0
shanma29 is on a distinguished road
hi, we can call the potential using the macro C_PHI_1(c,t), but I didn't know how to call current density, joule heating effect value or electrical conductivity. Can you share me the macro name if you have found the answer. Thank you
shanma29 is offline   Reply With Quote

Old   April 10, 2025, 12:55
Default
  #3
Member
 
Rodrigo Villarreal
Join Date: Nov 2016
Posts: 41
Rep Power: 10
rodrigovime is on a distinguished road
I did a similar calculation but for an arc in LTE, and I found that it's much faster create a UDS for the electric potential and magnetic field to have access to all the variables you need and including the electrical conductivity as a temperature dependent function
shanma29 likes this.
rodrigovime is offline   Reply With Quote

Old   April 15, 2025, 03:40
Default
  #4
New Member
 
Thore
Join Date: Nov 2023
Posts: 3
Rep Power: 3
Thore850 is on a distinguished road
Current Density is equal to the multiplication of the gradient of the potential with the electrical conductivity, which means you should be able to calculate your current density as:

DEFINE_EXECUTE_AT_END(Current_Density) {

face_t f;
cell_t c;
Thread* t;
Domain* d = Get_Domain(1);

thread_loop_c(t, d)
{
begin_c_loop(c, t)
{

/* Electrons */

C_UDMI(c, t, 0 ) = C_ELEC_COND(c,t) * C_PHI_1_G(c,t);

/* A/m^2 = A/(V*m) * V/m */

}end_c_loop(c, t)
}

}

Normally i use UDS to calculate my potential equations, therefore i havent tried this code, so let me know if it works!

Best regards

Thore
Thore850 is offline   Reply With Quote

Old   April 16, 2025, 07:49
Default
  #5
New Member
 
shanma
Join Date: Apr 2025
Posts: 2
Rep Power: 0
shanma29 is on a distinguished road
Thank you
shanma29 is offline   Reply With Quote

Reply

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
UDS diffusivity for Joule Heating problem redwanamit034 Fluent UDF and Scheme Programming 3 December 26, 2022 03:38
Help with the udf compiling D20125511 Fluent UDF and Scheme Programming 3 November 28, 2022 18:46
Conductivity as a vector value Nurzhan CFX 19 June 19, 2021 05:30
Compiling UDF in FLuent ekha FLUENT 6 July 3, 2019 03:02
displacement current - electrodynamcis Tron OpenFOAM Programming & Development 0 November 11, 2011 06:48


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