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

Re: Magnetic field around a current carrying square bar

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2014, 07:53
Default Re: Magnetic field around a current carrying square bar
  #1
Member
 
Yash Ganatra
Join Date: Mar 2013
Posts: 67
Rep Power: 9
yashganatra is on a distinguished road
Hi,
I am working on the aforementioned problem in ANSYS FLUENT. The aim is to validate this case by implementing UDS - 3 equations for magnetic vector potential and 1 for electric scalar potential.
Approach:
I have modelled the conductor as a box and made an enclosure around it.
For the V(electric scalar pot) equation I need to define 2 separate electrical conductivity - one for air and for copper. I have defined both of these as fluids and unchecked the flow equation option.
Problem:
1. I have tried to do it using Define_Diffusivity UDF and Thread_ID, but the problem is that the conducitivity for copper is not being taken into account. It should be taken as 2700 but I am not able to comprehend why it is being taken as 85.
2. While giving the boundary conditions, FLUENT is slitting the conductor up and down walls into coupled walls and I am getting confused on how to give the boundary condition - I need to give 670 V on conductor_up and 0 V on conductor_down. How should I apply the boundary conditions
3. When I model the copper bar as solid, and solve the UDS over all zones, while initializing I am getting Unknown UDS property method error. What does this mean? Also could someone kindly tell what does "coupled wall" mean?
4. Lastly, I would like to ask does zero normal gradient of field imply that the flux is zero?
I am attaching the UDF I have written, boundary conditions to be applied and a the plot of diffusion coeff of V to highlight my problem.

Any help would be really appreciated.
Thank you,
Regards,
Yash Ganatra
Attached Images
File Type: jpg Boundary-Conditions.jpg (35.9 KB, 45 views)
File Type: jpg Named_Selection.jpg (28.7 KB, 43 views)
File Type: jpg CopperBar_electrical_conductivity.jpg (62.8 KB, 43 views)
Attached Files
File Type: c CopperBar_27..2_trial_2.c (5.4 KB, 51 views)
__________________
My Website:
https://sites.google.com/site/yyashganatra/
yashganatra is offline   Reply With Quote

Old   March 13, 2014, 07:51
Default
  #2
Member
 
Peter Aestas
Join Date: Dec 2013
Posts: 64
Rep Power: 8
aestas is on a distinguished road
Dear friend yashganatra,
i haven't read over the thesis you list to me yet, but here i have some opinion and advice about your problem,you can think about it.
1.In the UDF, you used "C_UDSI_G" macros in the source term,but you have to know, when fluent compute for the first step, there isn't any gradients.So if C_UDSI_G was called in the first step of iteration, an error may occur.
in my UDF, i usually put C_UDMI and C_UDSI_G in ADJUST macro, and call them when one or two steps of iteration were done.
2.You said you have defined both of air and copper as fluids, i doubt that, shouldnot copper be taken as solids?
3.If i were you, i would choose another software(like ansys or ansoft) to do electromagnetic field problem like this,and if you need to couple electromagnetic field with thermal or flow field ,you can import the result to fluent.
In my case of plasma arc, i define V and A in fluent,and just set V in the UDS terms in boundary condition panel.And i haven't met a case(couple air and copper) like this.May my advice will help you.And I will be glad to discuss with you.
aestas is offline   Reply With Quote

Old   January 11, 2019, 14:47
Default
  #3
New Member
 
vektor
Join Date: Aug 2018
Posts: 19
Rep Power: 3
vek123 is on a distinguished road
Quote:
Originally Posted by aestas View Post
Dear friend yashganatra,
i haven't read over the thesis you list to me yet, but here i have some opinion and advice about your problem,you can think about it.
1.In the UDF, you used "C_UDSI_G" macros in the source term,but you have to know, when fluent compute for the first step, there isn't any gradients.So if C_UDSI_G was called in the first step of iteration, an error may occur.
in my UDF, i usually put C_UDMI and C_UDSI_G in ADJUST macro, and call them when one or two steps of iteration were done.
2.You said you have defined both of air and copper as fluids, i doubt that, shouldnot copper be taken as solids?
3.If i were you, i would choose another software(like ansys or ansoft) to do electromagnetic field problem like this,and if you need to couple electromagnetic field with thermal or flow field ,you can import the result to fluent.
In my case of plasma arc, i define V and A in fluent,and just set V in the UDS terms in boundary condition panel.And i haven't met a case(couple air and copper) like this.May my advice will help you.And I will be glad to discuss with you.
Dear aestas,
i read your reply and the last part got my interest, you said you've succesfully done the electric arc simulation in fluent, and i am currently trying to do the same thing, i have the UDFs for the Temperature dependent material properties, But my issue is; in the MHD_module i cannot define the electric current/current density. and that's a known issue in this module, so i read some papers and i've seen most people import magnetic flux density into fluent using UDFs, i have succesfully solved for time dependent magnetic flux density and have it in a text file with each mesh node and time step.
but the problem is i couldn't find a way to import this to fluent, especially since it is time and space dependent, i would really appreciate it if you could tell me how it can be done.


thanks very much
vek123 is offline   Reply With Quote

Old   March 6, 2020, 06:11
Default
  #4
New Member
 
h.sanaei
Join Date: Jul 2019
Posts: 3
Rep Power: 2
keyhan_1359@yahoo.com is on a distinguished road
Hi, guys. I need to write an UDF for volumetric heat production in a 3D problem. The heat source strength is a say Exponential function of say X coordinate, e.g. q_dot=3*10000000*e^(-10(x+0.2)) W/m^3. Please help me. Thank you.
keyhan_1359@yahoo.com is offline   Reply With Quote

Old   March 6, 2020, 07:12
Default Source UDF
  #5
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,553
Blog Entries: 1
Rep Power: 28
vinerm will become famous soon enough
That would be straightforward. Please look at

https://www.afs.enea.it/project/nept...udf/node49.htm

You need to use C_CENTROID to fetch cell center coordinates and then use the equation.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared on the Forum
vinerm is online now   Reply With Quote

Old   March 6, 2020, 07:35
Default
  #6
New Member
 
h.sanaei
Join Date: Jul 2019
Posts: 3
Rep Power: 2
keyhan_1359@yahoo.com is on a distinguished road
thanks vinerm. can u help me. and send udf for me? plz
keyhan_1359@yahoo.com is offline   Reply With Quote

Old   March 6, 2020, 07:44
Default UDF File
  #7
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,553
Blog Entries: 1
Rep Power: 28
vinerm will become famous soon enough
The UDF is written in the link I sent. You need to copy it manually, i.e., type it yourself instead of using copy and paste. Then you can interpret or compile (if you have compiler available).

I do not have any UDF file available with me. But you can certainly get help if you start doing it yourself.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared on the Forum
vinerm is online now   Reply With Quote

Reply

Tags
boundary condition, fluent - udf, magnetic field, uds diffusive

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
particles in a localized magnetic field Arturo Ortiz FLUENT 1 March 10, 2010 10:26
magnetic field, workbench alireza ramezani Main CFD Forum 0 March 13, 2008 14:42
ACCESS VIOLATION MHDWill FLUENT 1 September 23, 2007 02:51
where to find velocity field for square pipes??? enrico Main CFD Forum 2 February 4, 2005 11:32
Divergence Free on the Magnetic Field Valdemir Main CFD Forum 1 March 19, 2003 18:33


All times are GMT -4. The time now is 08:41.