|
[Sponsors] |
May 24, 2010, 17:22 |
Trouble: Sandia UV UDF on FLUENT 12.0.16
|
#1 |
New Member
Ryan Jones
Join Date: Mar 2009
Location: MA, USA
Posts: 7
Rep Power: 17 |
I am trying to us a UV Dose UDF available from Sandia National Labs.
http://www.sandia.gov/cfd-water/uvdisinfection.htm But it does not appear to be working right. The UDF is supposed to allow me to output a custom particle variable, in this case UV Dose, through the Reports->Discrete->Sample function. When I try to do this only a header line is produced, but no numbers are filled in. Outside of the reporting problem, the UDF appears to work. I am able to view particle tracks colored by the user defined dose. Although I belive I could possibly output data from the particle track portion, having the data in the DPM form would be ideal for post processing. The UDF is provided with a shared library. If I try to rebuild the library, with changes to the source files, I get the following: for d in lnx86/[23]*; do \ ( \ cd $d; \ for f in ../../src/*.[ch] ../../src/makefile; do \ if [ ! -f `basename $f` ]; then \ echo "# linking to" $f "in" $d; \ ln -s $f .; \ fi; \ done; \ echo ""; \ echo "# building library in" $d; \ if [ "" = "1" ]; then \ echo "# using gcc64"; \ make ARCHC=gcc64 -k>makelog 2>&1; \ else \ if [ "" = "1" ]; then \ echo "# using gcc"; \ make ARCHC=gcc -k>makelog 2>&1; \ else \ make -k>makelog 2>&1; \ fi; \ fi;\ cat makelog; \ ) \ done # building library in lnx86/3d make[1]: Entering directory `/home4/rjones/UVFlowSim/MSWork/libudf/lnx86/3d' make[1]: Circular udf_names.c <- udf_names.c dependency dropped. make[2]: Entering directory `/home4/rjones/UVFlowSim/MSWork/libudf/lnx86/3d' make libudf.so "CFLAGS=-fpic -shared -ansi -Wall -m32 -O " "LDFLAGS=-shared -lm -m elf_i386" make[3]: Entering directory `/home4/rjones/UVFlowSim/MSWork/libudf/lnx86/3d' make[3]: Circular udf_names.c <- udf_names.c dependency dropped. # Compiling udf_names.o because of udf_names.c cc -fpic -shared -ansi -Wall -m32 -O -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/`expr \`pwd\` : '.*/\(.*\)/[23].*'`/`basename \`pwd\`` -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/cortex/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/client/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/tgrid/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/multiport/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/multiport/mpi_wrapper/include -I. -c udf_names.c # Compiling uvdose_par_6326.o because of uvdose_par_6326.c cc -fpic -shared -ansi -Wall -m32 -O -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/`expr \`pwd\` : '.*/\(.*\)/[23].*'`/`basename \`pwd\`` -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/cortex/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/client/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/tgrid/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/multiport/src -I/usr/local/ansys_inc/v120/fluent/fluent12.0.16/multiport/mpi_wrapper/include -I. -c uvdose_par_6326.c uvdose_par_6326.c: In function ‘uv_dosage’: uvdose_par_6326.c:16: warning: unused variable ‘c’ # Linking libudf.so because of makefile udf_names.c udf_names.o uvdose_par_6326.o ld -shared -lm -m elf_i386 udf_names.o udf_names.o uvdose_par_6326.o -o libudf.so udf_names.o: In function `UDF_Inquire_Release': udf_names.c: (.text+0x0): multiple definition of `UDF_Inquire_Release' udf_names.o:udf_names.c: (.text+0x0): first defined here udf_names.o: (.data.rel+0x0): multiple definition of `udf_data' udf_names.o: (.data.rel+0x0): first defined here udf_names.o: (.data+0x0): multiple definition of `n_udf_data' udf_names.o: (.data+0x0): first defined here make[3]: *** [libudf.so] Error 1 make[3]: Leaving directory `/home4/rjones/UVFlowSim/MSWork/libudf/lnx86/3d' make[2]: *** [lnx86] Error 2 make[2]: Leaving directory `/home4/rjones/UVFlowSim/MSWork/libudf/lnx86/3d' make[1]: *** [default] Error 2 make[1]: Leaving directory `/home4/rjones/UVFlowSim/MSWork/libudf/lnx86/3d' The system I am workin with is the following: Linux box running RedHat X86 chip FLUENT 12.0.16 Serial 3D, pbns, vof, ske Thanks for any help that you can provide. I'm sure I'm missed showing some helpful, important information, so let me know and I'll add whatever helps. Ryan |
|
June 9, 2010, 08:43 |
|
#2 |
Member
novice
Join Date: Nov 2009
Posts: 33
Rep Power: 17 |
Hi
You said u r using the VOF model so please check whether the UDF is for multiphase or only for single phase. Regards |
|
June 24, 2010, 19:21 |
Sandia UDF for UV dose calculations
|
#3 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
Hi Jones,
I also used Sandia UDF to calculate UV dose on Fluent 6.2.36 successfully and when I switched the same Fluent version you are using I am having trouble. I was advised to remove old libraries and build again but the outlet.dpm is empty ...did you manage to make it work? are you using Unix-version or Windows? |
|
July 1, 2010, 10:56 |
|
#4 |
Member
novice
Join Date: Nov 2009
Posts: 33
Rep Power: 17 |
Hi Banerji and Jones,
May I ask u in which application u are calculating the UV doses. Is it in some food processing industry or Water purification etc. Best Regards |
|
July 1, 2010, 13:38 |
|
#5 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
My application is for water purification
|
|
July 3, 2010, 19:54 |
|
#6 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
Novice
do you by chance used fluent 12.1 version? |
|
July 12, 2010, 07:06 |
|
#7 |
Member
novice
Join Date: Nov 2009
Posts: 33
Rep Power: 17 |
Hi Banerji
I haven't used the FLUENT 12.1 version yet? May i know y r u asking this? One more question: may i know in which company (which country) u r working. I'm also in the same industry working in Germany. Regards |
|
July 20, 2010, 17:01 |
|
#8 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
Novice, sorry to reply late. It is a Phd research at a US university.
I also solved the problem, my UDF was not compiling because my MS windows SDKs were old and I had to reiinstall Microsoft VS. Thanks guys for shearing knowledge. |
|
July 20, 2010, 17:12 |
|
#9 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
Novice, your other question I forgot to answer was why I was asking whether you use Fluent 12. it is because I was thinking to send my code to someone using this version and compile it, then send to me a compiled folder for me to upload. this could have shown me quickly that the problem was the compiler and SDKs issues.
|
|
August 2, 2010, 05:55 |
|
#10 |
New Member
Lauri Parviainen
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
Hi all. I'm also calculating dose with Sandia UDF for UV dose calculations, but when I'm loading the UDF I get this error message:
open_udf_library: %1 is not a valid Win32 application I'm using Fluent 12.1. what should I do to get it work? |
|
August 5, 2010, 13:28 |
|
#11 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
lauripar..sorry to reply late..but if you have not got it..
did you build your UDF before you load it? if not ..try copying only the C-file from libduf put it in the same folder with your case file then at the window you load compiled UDFs , go to add and search for the C-file and click build and then load. Hope this helps |
|
August 6, 2010, 02:29 |
|
#12 |
New Member
Lauri Parviainen
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
Thanks for your reply Benerji... I tried your instructions but when I did so I got the following error message:
Error: open_udf_library: The system cannot find the file specified. If you know what to do now, I would be clad to hear it. Thank you for helping. |
|
August 6, 2010, 02:42 |
|
#13 |
New Member
Lauri Parviainen
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
When I looked at the log file at ...dp0\FFF\Fluent\libudf\win64\3d, there was following message:
NMAKE : U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.EXE"' : return code '0xc0000135' Stop. If some one has an answer what to do next, I would appreciate it. |
|
August 7, 2010, 13:34 |
|
#14 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
Lauripar: what I can see.. you have the compiling error..
so there are many things you have to check that take part in compilation. 1) make sure when you compile there is no any other folder or file in the folder where you put the case file and the C-file(i think the sandia C-file is named demand) . 2) check whether once you click on build there is any libduf folder created if not.. you might be getting NMAKE Error related to the compiler issues. 3) NMAKe errors might be due to the compiler. so check whether visual studio is installed and the environment are set properly. |
|
August 9, 2010, 03:43 |
|
#15 |
New Member
Lauri Parviainen
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
Hi, I Started Fluent from SDK command promt and I had only demand2.c and case file in the folder. But when I built the library I got the following message and error:
> 1 file(s) copied. (system "copy "C:\PROGRA~1\ANSYSI~1\v121\fluent"\fluent12.1.4\sr c\makefile_nt.udf libudf\win64\3d\makefile") 1 file(s) copied. (chdir "libudf")() (chdir "win64\3d")() # Generating ud_io1.h demand2.c c:\program files\ansys inc\v121\fluent\fluent12.1.4\src\config.h(110) : error C2143: syntax error : missing '{' before ':' c:\program files\ansys inc\v121\fluent\fluent12.1.4\src\config.h(110) : error C2059: syntax error : ':' C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.4\cort ex\src\dll.h(68) : error C2061: syntax error : identifier 'CX_DLL_GetProc' C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.4\cort ex\src\dll.h(68) : error C2059: syntax error : ';' C:\PROGRA~1\ANSYSI~1\v121\fluent\fluent12.1.4\cort ex\src\dll.h(68) : error C2059: syntax error : 'type' Banerji have you encountered this kind of problem or du you know what to do next? |
|
August 9, 2010, 15:04 |
|
#16 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
I also had many compilation issues when I switched from fluent 6 to fluent 12. Well looking at your errors they suggest error in Fluent header files which is strange. But as I can see it got errors when building ud_i01. I remember at this stage the error was it can't find kernel.dll file and I read online that my MS SDKs might not be up to date and when I checked in program files (C:\Program Files\Microsoft SDKs\Windows\v6.1) here before I had v5.0 which was the issue. so, check also here whether you have V6.
|
|
August 10, 2010, 03:27 |
|
#17 |
New Member
Lauri Parviainen
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
I checked my SDK and it is v7.1. I have windows 7 and 64 bit system, could some my problems be related to that?
|
|
August 10, 2010, 17:02 |
|
#18 |
New Member
banerji
Join Date: Dec 2009
Posts: 22
Rep Power: 16 |
to know where the problem exactly is, I would suggest you first to check whether your C compiling system works properly by writting a basic C code (Hello world), compile it, if it works then you would move to Fluent to see why it is not compiling properly.
if you have not programed with C there are tutorials to do the Hello world in C if you google or search it on youtube. |
|
August 11, 2010, 07:19 |
|
#19 |
New Member
Lauri Parviainen
Join Date: Jul 2010
Posts: 8
Rep Power: 16 |
I was able to compile. The Problem was that I didn't check the box "Visual c++ compilers" when I installed the SDK 7.1, when I reinstalled SDK and checked that box it solved my problem.
Actually there was line complaining about x64 compliers in the SDK command promt window before I reinstalled SDK and checked that box. I didn't notice it earlier, how stupid... Thanks Banerji for your help! |
|
January 26, 2011, 15:50 |
Sandia UDF file is worked
|
#20 |
New Member
limin
Join Date: May 2009
Posts: 21
Rep Power: 17 |
Hi
I am doing CFD UV disinfection simulation in a company in Canada, I tried this file, It is working very well, I think that you may forget the series or parallel complying; second, you should inject particles by file injection or surface injection, using report samples to capture the output file using DPM. |
|
Tags |
fluent, help me, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem with loading udf in fluent 6.3 | James | Fluent UDF and Scheme Programming | 6 | January 22, 2015 06:51 |
problem loading UDF in parallel fluent | Tim | FLUENT | 12 | July 12, 2008 13:59 |
fluent UDF external library lapack problem | Rick | FLUENT | 0 | May 7, 2008 11:16 |
UDF of Zimont model in fluent | Z | Main CFD Forum | 0 | February 17, 2005 04:07 |
UDF in Fluent to Match Mass Flow at Pressure Outlet | Jonas Larsson | Main CFD Forum | 1 | April 29, 1999 11:44 |