I am simulating the natural convection in circular annulus through magnetic field. For that I am writing udf for x direction magnetic, kindly share your valuable experience in doing such a task?
I am not familiar with fluent, thus I did not understated what you mean by UDF. However, the magnetic field is added as body force in the momentum equation. When the direction of the magnetic field is with y-axis, then the magnetic force should act in the x-direction and vice versa.
First of all, you need to have your formula in your hands? once you got it, you need to write this equation in C++ language if it has more than one loop. if not you can insert the formula directly as user define function in fluent.