|
[Sponsors] |
December 6, 2017, 12:16 |
correct me please udf
|
#1 |
New Member
anonymousss
Join Date: Jul 2017
Posts: 10
Rep Power: 9 |
cpp -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/main" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/addon-wrapper" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/io" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/species" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/pbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/numerics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/sphysics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/storage" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mphase" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/bc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/models" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/material" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/amg" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/util" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mesh" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/udf" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ht" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dx" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/turbulence" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/parallel" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/etc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ue" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dpm" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/tgrid/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/multiport/src" -I. -DUDFCONFIG_H="<udfconfig-host.h>" "D:/payannameh/cfd-test/az.c" D:/payannameh/cfd-test/az.c:35: unterminated comment
Error: D:/payannameh/cfd-test/az.c: line 52: parse error. C:/Users/pkprvr/AppData/Local/Temp/az.c.12216.0.c:35: unterminated comment C:/Users/pkprvr/AppData/Local/Temp/az.c.8764.1.c:35: unterminated comment C:/Users/pkprvr/AppData/Local/Temp/az.c.2648.2.c:35: unterminated comment C:/Users/pkprvr/AppData/Local/Temp/az.c.6812.3.c:35: unterminated comment C:/Users/pkprvr/AppData/Local/Temp/az.c.10188.4.c:35: unterminated comment cpp -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/main" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/addon-wrapper" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/io" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/species" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/pbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/numerics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/sphysics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/storage" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mphase" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/bc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/models" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/material" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/amg" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/util" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mesh" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/udf" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ht" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dx" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/turbulence" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/parallel" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/etc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ue" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dpm" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/tgrid/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/pkprvr/AppData/Local/Temp/udfconfig-12216-node0.h>" "C:/Users/pkprvr/AppData/Local/Temp/az.c.12216.0.c" Error: C:/Users/pkprvr/AppData/Local/Temp/az.c.12216.0.c: line 52: parse error. cpp -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/main" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/addon-wrapper" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/io" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/species" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/pbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/numerics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/sphysics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/storage" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mphase" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/bc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/models" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/material" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/amg" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/util" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mesh" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/udf" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ht" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dx" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/turbulence" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/parallel" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/etc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ue" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dpm" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/tgrid/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/pkprvr/AppData/Local/Temp/udfconfig-8764-node1.h>" "C:/Users/pkprvr/AppData/Local/Temp/az.c.8764.1.c" Error: C:/Users/pkprvr/AppData/Local/Temp/az.c.8764.1.c: line 52: parse error. cpp -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/main" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/addon-wrapper" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/io" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/species" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/pbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/numerics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/sphysics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/storage" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mphase" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/bc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/models" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/material" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/amg" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/util" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mesh" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/udf" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ht" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dx" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/turbulence" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/parallel" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/etc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ue" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dpm" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/tgrid/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/pkprvr/AppData/Local/Temp/udfconfig-2648-node2.h>" "C:/Users/pkprvr/AppData/Local/Temp/az.c.2648.2.c" Error: C:/Users/pkprvr/AppData/Local/Temp/az.c.2648.2.c: line 52: parse error. cpp -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/main" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/addon-wrapper" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/io" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/species" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/pbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/numerics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/sphysics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/storage" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mphase" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/bc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/models" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/material" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/amg" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/util" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mesh" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/udf" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ht" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dx" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/turbulence" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/parallel" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/etc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ue" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dpm" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/tgrid/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/pkprvr/AppData/Local/Temp/udfconfig-6812-node3.h>" "C:/Users/pkprvr/AppData/Local/Temp/az.c.6812.3.c" Error: C:/Users/pkprvr/AppData/Local/Temp/az.c.6812.3.c: line 52: parse error. cpp -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/main" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/addon-wrapper" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/io" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/species" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/pbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/numerics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/sphysics" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/storage" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mphase" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/bc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/models" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/material" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/amg" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/util" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/mesh" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/udf" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ht" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dx" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/turbulence" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/parallel" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/etc" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/ue" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dpm" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/src/dbns" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/tgrid/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/cortex/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/client/src" -I"C:\PROGRA~1\ANSYSI~1\v180\fluent\fluent18.0.0/multiport/src" -I. -DUDFCONFIG_H="<C:/Users/pkprvr/AppData/Local/Temp/udfconfig-10188-node4.h>" "C:/Users/pkprvr/AppData/Local/Temp/az.c.10188.4.c" Error: C:/Users/pkprvr/AppData/Local/Temp/az.c.10188.4.c: line 52: parse error. /************************************************** ***********************/ /* vprofile.c */ /* UDF for specifying a steady-state velocity profile boundary condition */ /************************************************** ***********************/ #include "udf.h" DEFINE_PROFILE(inlet_radial_velocity, thread, position) { real x[ND_ND]; /* this will hold the position vector */ real z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); z = x[2]; F_PROFILE(f,thread,position)= 10.*pow((z/106.),1./7.); } end_f_loop(f,thread) } /************************************************** ***********************/ /* vprofile.c */ /* UDF for specifying a steady-state velocity profile boundary condition */ /************************************************** ***********************/ #include "udf.h" DEFINE_PROFILE(inlet_tangential_velocity, thread, position) { real x[ND_ND],theta; /* this will hold the position vector real z; face_t f; begin_f_loop(f,thread) { F_CENTROID(x,f,thread); theta=atan(x[1]/x[0]); a=1.025; s=0.5; s=tan(theta)/(2.*a); F_PROFILE(f,thread,position)= 2.*1.0176*0.5*10.*pow((z/106.),1./7.); } end_f_loop(f,thread) } hi experts . i dont have theta but i have s value and a but i dont know ho to apply theta in s because i should use theta in my udf help me thank you |
|
December 6, 2017, 18:47 |
|
#2 |
Senior Member
Micael
Join Date: Mar 2009
Location: Canada
Posts: 157
Rep Power: 18 |
It's pretty clear you have an "unterminated comment" in the second udf.
I would recommend you edit udf with notepad++, it will show text in color and avoid such mistake in future. |
|
December 7, 2017, 04:40 |
|
#3 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Hi Alikhan,
It looks like you don't understand what you are doing. I don't say this to insult you. You have been asked to do something with theta and s, but I can see from your questions that you don't know what it all means. And you want to have an answer so quickly, that you don't slow down to understand it, or even read things. In a previous question, I told you what you have to replace by what. I see now in your post above that you did not do this properly: you just copied some code halfway from my answer into your code. No! Read more carefully! And here, you ask what is wrong with your udf, and you copy the errors that came on your screen. Did you even read the errors? Quote:
If you would fix this, you would see errors on lines 42 and 43, because a and s are undefined. This comes from your careless copying from my answer. At this moment, the best-case scenario for you is that you get rid of all the warnings, get an answer in Fluent, but this answer has nothing to do with the question that you got. You should try to understand more. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fluent Radiation/porous media | Schmitt pierre-Louis | FLUENT | 26 | September 1, 2016 11:29 |
how to correct the error of (c) file after the compile of udf? | mokrane | FLUENT | 0 | April 23, 2015 14:40 |
how can I correct the udf? | happyrabbit | FLUENT | 9 | January 28, 2011 10:50 |
DEFINE_GEOM UDF Problems | Pat | FLUENT | 0 | August 14, 2003 14:16 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 05:03 |