Thank you for the reply, the UDF works indeed when i delete the if loop. I have a question regarding the electric field again … As mentioned I am using the MHD module in Fluent for simulating electric field in a microchannel. There is however, a certain problem on my side with understanding how exctly this module works. So when I apply the UDF as a boundary condition on one of the walls, it works fine, there is no electric field generated, just potential. There is, however in the boundary condition tab, another menu where one can define a UDS for the potential of the wall. When i define this UDS potential, i get indeed an electric field in my system, even without any current. So can someone please explain me what is the difference between the “standard” boundary condition where i can define with the UDF and the UDS value for the potential which is also in the boundary condition menu. The problem is I cannot apply my UDF for AC voltage into this UDS tab as my simulation crashed. Thank you!


P.S. Yes I already looked into the Users Manual of Fluent, however this type of details are not fully explained there