# URGENT UDF's erosion_macro problem

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

 October 14, 2005, 11:33 URGENT UDF's erosion_macro problem #1 alex Guest   Posts: n/a I am working on surface erosion model. Its erosion is caused by injection of inert particulas on steam flow. Several equations exist to modeling the erosion process and I need to verify them. To obtain it, I must create its UDF's codes. The problem is I don't known how to use the F_STORAGE_R(f function, t, SV_DPMS_EROSION) to store the results from my equations. On the tutorial, I haven't found a complete explanation about this storage function. How I should used this function? The UDF code for one equation is: #include "udf.h" float n = 2.6; float K = 2e-09; DEFINE_DPM_EROSION(dnv_haugen, p, t, f, normal, alpha, Vmag, mdot) { real erosion; real alpha; real Vmag; real F_alpha; F_alpha = ((5.86905e-02*alpha)-(1.05707e-03*pow(alpha,2.0))+(5.18692e-06*pow(alpha,3.0))); erosion = (K*F_alpha*pow(Vmag,n)); F_STORAGE_R(f,t,SV_DPMS_EROSION) = erosion; {this is the problem} } How I can store the "erosion" solution?

 October 14, 2005, 17:02 Re: URGENT UDF's erosion_macro problem #2 Alec Eiffel Guest   Posts: n/a What you have written is correct. F_STORAGE_R(f,t,SV_DPMS_EROSION) = erosion will store the "erosion" value in FLUENTs erosoin solver variable. To accces the value you have calculated using UDF in FLUENT simply go to display contours and select erosion under DPM variables. Alternatively you could store the "erosion" value in a user defined memory using: F_UDMI(f,t,0) = erosion; C_UDMI(c,ct,0) = F_UDMI(f,t,0); hope this helps!

 October 14, 2005, 18:32 Re: URGENT UDF's erosion_macro problem #3 alex Guest   Posts: n/a thanks for your suggest, really I agree your help because my proyect is temporally stopped due this problem. I'll prove one more time and I'll try with your additional suggestions. yours faithfully, ALEX

 October 17, 2005, 13:59 Re: URGENT UDF's erosion_macro problem #4 alex Guest   Posts: n/a Hi, I have another question. Are the ways to compile or interpret different in each version? If it's true, which is better way to use my UDF: compiled or interpreted?

 October 17, 2005, 15:01 Re: URGENT UDF's erosion_macro problem #5 Alec Eiffel Guest   Posts: n/a do you mean the version of FLUENT or UDF? If UDF, then the compiling or interpreting is the same. Compiling is the better way to use as it runs quicker. You will however need to install Visuall c++ to compile in windows.

 October 18, 2005, 09:21 Re: URGENT UDF's erosion_macro problem #6 alex Guest   Posts: n/a Thanks Alec, really you have helped me much. I'm going to compile the UDF to prove your suggestion. greetings, ALEX

 October 18, 2005, 11:53 Re: URGENT UDF's erosion_macro problem #7 alex Guest   Posts: n/a Hi, Can you help me to interpret the next message? it's reported by Fluent when I press "build" on the compiled panel: 1 file copied. (system "move user_nt.udf libudf\ntx86\3d")0 (system "copy C:\Fuenlt.Inc\fluent6.1\src\makefile_nt.udf libudf\ntx86\3d\makefile") 1 file copied. 0 (chdir "libudf")() (chdir "ntx86\3d")() "nmake is not recognized like internal or external commando feasible program or batch file. "nmake is not recognized like internal or external commando feasible program or batch file. Done. Next to it, when I try to load the library on the same panel, the next message was displayed: Opening library "libudf"... Error: Open_udf_library: The system can not found the specified file. Error Object: () Can you help me to solve this problem? Is common the first message displayed?

 October 18, 2005, 18:18 Re: URGENT UDF's erosion_macro problem #8 Alec Eiffel Guest   Posts: n/a