Divergence detected in AMG solver: ads-0
I recently made a UDF for the velocity inlet to implement an external flow problem. I compiled the UDF using the in-built compiler of FLUENT 2020R2 and hooked the UDF to the inlet. However, when I initialized the solution , FLUENT gives me this ,"Divergence detected in AMG solver: ads-0" with an error of floating point exception. I know this means something like dividing by 0 but why is this happening? I tried with a constant velocity instead of my UDF and it works fine. No errors. So I don't think the error is from the mesh. Checked my orthogonal quality and skewness. Minimum quality of 0.15 which I thought was acceptable. However, I'm still very much new to this and this is my first time implementing UDF's so any help is appreciated a lot.