|
[Sponsors] |
October 4, 2006, 04:20 |
UDF help
|
#1 |
Guest
Posts: n/a
|
do i need to install C++ compiler on my pc to compile my UDFs. regards...
|
|
October 4, 2006, 07:47 |
Re: UDF help
|
#2 |
Guest
Posts: n/a
|
yes i think you should
If you are working on WINDOWS and installed Microsoft Visual studios.NET then, STEP 1: Place the source file in the folder which contain case & data file (place it in C-Drive) [Create a new folder in C-Drive and place the case and data files and the Source file (.c file)] STEP 2: Start --> All Programs --> Microsoft Visual Studio .NET 2003 --> Visual Studio .NET Tools --> Visual Studio .NET 2003 Command Prompt (it opens a command prompt) STEP 3: In the command prompt browse the folder in which the case & data files and the source files are placed STEP 4: Type "fluent &" (it opens FLUENT console) STEP 5: File --> Read --> Case & Data Files (browse for the case and data files) STEP 6: Define --> User-Defined --> Functions --> Compiled STEP 7: Add the source files and click BUILD and then click LOAD |
|
October 4, 2006, 07:52 |
Re: UDF help
|
#3 |
Guest
Posts: n/a
|
Thanxs ZAKI, appreciated...
|
|
October 4, 2006, 08:09 |
Re: UDF help
|
#4 |
Guest
Posts: n/a
|
After I compile and load, i am getting the messages below... thanx much...
The system cannot find the file specified. (system "copy C:\Fluent.Inc\fluent6.2.16\src\makefile_nt.udf libudf\ntx86\3d\makefile") 1 file(s) copied. 0 (chdir "libudf")() (chdir "ntx86\3d")() Done. "c:/cfd/avtoyarus" Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified. Error Object: () |
|
October 4, 2006, 08:33 |
Re: UDF help
|
#5 |
Guest
Posts: n/a
|
I tried to compile my simple UDF by C++ compiler and I am getting the message below:
myudf.cpp(7) : fatal error C1083: Cannot open include file: 'udf.h': No such file or director my UDF is listed below: #include "stdafx.h" #include "myudf.h" #include "udf.h" DEFINE_SOURCE(energy_source,c,t,dS,eqn) { real time = CURRENT_TIME; real source = 100. * time; /* units of Watts/m3 */ dS[eqn] = 0.; return source; } |
|
October 6, 2006, 10:00 |
Re: UDF help
|
#6 |
Guest
Posts: n/a
|
try it like this:
#include "udf.h" DEFINE_SOURCE(energy_source,c,t,dS,eqn) { real time, source; time = CURRENT_TIME; source = 100. * time; /* units of Watts/m3 */ dS[eqn] = 0.; } |
|
October 7, 2006, 01:53 |
Re: UDF help
|
#7 |
Guest
Posts: n/a
|
thank u so much for helping out ZAKI...
I am still getting the same error message. I am trying to compile my simple source file myudf.c by c++ visual compiler and compiler can not find udf.h here is my simple udf #include "udf.h" DEFINE_SOURCE(energy_source,c,t,dS,eqn) { real time = CURRENT_TIME; real source = 100. * time; /* units of Watts/m3 */ dS[eqn] = 0.; return source; } |
|
October 7, 2006, 06:50 |
Re: UDF help
|
#8 |
Guest
Posts: n/a
|
ok, finally it worked by interpreter, compiling still does not work..,
now in my simple project, i am having this energy source and supposedly smoke as well (i will try to add mass source to my sub_volume as well). however, my main challenge is to start the fan after two minutes of the fire start, how can i write this simple UDF, i am beginner in C so any help, advice would be much appreciated... best regards. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic Mesh UDF | Qureshi | FLUENT | 7 | March 23, 2017 07:37 |
UDF parallel error: chip-exec: function not found????? | shankara.2 | Fluent UDF and Scheme Programming | 1 | January 16, 2012 22:14 |
How to add a UDF to a compiled UDF library | kim | FLUENT | 3 | October 26, 2011 21:38 |
UDF...UDF...UDF...UDF | Luc SEMINEL | FLUENT | 0 | November 25, 2002 04:03 |
UDF, UDF, UDF, UDF | Luc SEMINEL | Main CFD Forum | 0 | November 25, 2002 04:01 |