|
[Sponsors] |
October 23, 2019, 10:41 |
UDf current density integration
|
#1 |
New Member
Domagoj
Join Date: Oct 2019
Posts: 10
Rep Power: 7 |
Hello,
i need to integrate current density in my axisymmetric Fluent model in order to obtain self-induced azimuthal magnetic field (Ampere circuital law) - see attached picture. Z is symmetry axis, r is radial distance. How to write UDF for this problem? Is it possible to loop cells for various z=const from r=0 to the right boundary while replacing integral with sum of finite values calculated in cell center? Any suggestions? Thanks. |
|
October 23, 2019, 22:25 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
there is build in electric potential model in fluent
did you try to use it?
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 24, 2019, 02:38 |
|
#3 | |
New Member
Domagoj
Join Date: Oct 2019
Posts: 10
Rep Power: 7 |
Quote:
Also, there is advanced add-on module called MHD but it solves problems with externally-imposed magnetic field. In my case magnetic field is self-induced and I do not see how to apply it? My final goal is to obtain Lorentz force from current density and magnetic field and use it as momentum source. Than I could solve fluid stirring problem. Last edited by Domagoj; October 24, 2019 at 09:25. Reason: t |
||
October 25, 2019, 01:07 |
|
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
I'm not sure how to do it step by step.
But it seems you should use user-defined scalar to define your magnetic field read Ansys Fluent Customization manual for more information regarding UDS
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 25, 2019, 01:10 |
|
#5 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
does current field pre-defined? or you should solve some equation to get current distribution?
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 25, 2019, 02:26 |
|
#6 | |
New Member
Domagoj
Join Date: Oct 2019
Posts: 10
Rep Power: 7 |
Quote:
It should be relatively simple numerical integration but I am not sure how to locate and loop cells from some constant z-coordinate (and r=0) to the right boundary end perform summation instead of integral. |
||
October 25, 2019, 03:24 |
|
#7 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
inside cell loop you may check if the cell is inside region (z-> your_boundary_coord) and make summation if True.
using C_CENTROID macro you can get coordinate of cell detail information in Ansys Customization Manual
__________________
best regards ****************************** press LIKE if this message was helpful |
|
October 25, 2019, 06:45 |
|
#8 | |
New Member
Domagoj
Join Date: Oct 2019
Posts: 10
Rep Power: 7 |
Quote:
I thought that someone already has something similar that could be modified for my case. |
||
August 25, 2022, 18:52 |
|
#9 |
New Member
Rodrigo Villarreal
Join Date: Nov 2016
Posts: 29
Rep Power: 10 |
I have the very same problem but in ANSYS CFX. It seems that I cannot integrate using the NLOC array. Is there a way to perform numerical integration using User Fortran?
|
|
September 30, 2022, 08:22 |
|
#10 |
New Member
Domagoj
Join Date: Oct 2019
Posts: 10
Rep Power: 7 |
Hello,
In the end I obtained Lorentz force using magnetic vector potential method. I can't remember the implementation details (UDS were used), it was long time ago, but read this paper carefully. https://iopscience.iop.org/article/1...-3727/37/6/013 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for modifying density of mixture phase during the calculating process | sola86 | Fluent UDF and Scheme Programming | 2 | May 28, 2019 10:24 |
Density UDF Divergence | Baden | Fluent UDF and Scheme Programming | 0 | January 11, 2017 16:25 |
Interpret-Real Gas UDF | ndabir | Fluent UDF and Scheme Programming | 3 | November 18, 2015 08:29 |
How to get the current density using TUI in Fluent PEMFC module? | Prince Abraham | FLUENT | 1 | November 2, 2015 12:57 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |