|
[Sponsors] |
March 17, 2015, 23:45 |
UDF help for Rapid compression machine ECM.
|
#1 |
Member
sanjeet Limbu
Join Date: Mar 2015
Posts: 91
Rep Power: 11 |
Dear all,
I am trying to create a user defined function udf for use in fluent ansys. Physics involved- i wanna get UDF- user defined function to get the following velocity profile for the body in ANSYS fluent- same velocities as piston motion stuff- for combustion test in fluent ANSYS software. The following is my code: #include "stdafx.h" //#include <iostream.h> #include "C:\Program Files\ANSYS Inc\v150\fluent\fluent15.0.7\src\udf.h" #include "C:\Program Files\ANSYS Inc\v150\fluent\fluent15.0.7\tgrid\win64\3d_host\l ocalize.h" #include <C:\winapps\FEniCS\lib\gcc\mingw32\4.6.1\include\s sp\stdio.h> #include <C:\winapps\FEniCS\lib\gcc\mingw32\4.6.1\include\c ++\tr1\stdlib.h> #include "time.h" #include "math.h" int _tmain(int argc, _TCHAR* argv[]) { return 0; } DEFINE_PROFILE(inlet_x_velocity, thread, position) { // declaring variables real x[ND_ND]; //this will hold the position vector face_t f; begin_f_loop(f, thread); { F_CENTROID(x, f, thread); #if (dt) < 0.006) F_PROFILE(for, thread, postion) = 1000 * dt; #else if ( 0.006 < (dt) < 0.014) F_PROFILE(for, thread, postion) = 0.5*dt; #else if ( 0.01401 < (dt) < 0.028) F_PROFILE(for, thread, postion) = 9.25; #endif ( 0.02801 < (dt)) F_PROFILE(for, thread, postion) = 9.25 - (9.25 / 3)*(dt - 30); return F_PROFILE; } end_f_loop(f, thread) } The above code is showing error related to udf.h , can u suggest possible changes needed in either code. As I am mechanical background I am not expert in coding in C++. The following were error shos- the udf.h is trouble: Error 1 error C1083: Cannot open include file: 'localize.h': No such file or directory c:\program files\ansys inc\v150\fluent\fluent15.0.7\src\config.h 15 1 velocity2 16 IntelliSense: expected a declaration c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\ctype.h 387 1 velocity2 17 IntelliSense: variable "_heapwalk" may not be initialized c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\malloc.h 169 53 velocity2 18 IntelliSense: identifier "_HEAPINFO" is undefined c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\malloc.h 169 71 velocity2 19 IntelliSense: identifier "_EntryInfo" is undefined c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\malloc.h 169 83 velocity2 20 IntelliSense: expected a declaration c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\malloc.h 289 1 velocity2 14 IntelliSense: expected a declaration c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\math.h 1008 1 velocity2 2 IntelliSense: explicit type is missing ('int' assumed) c:\Program Files (x86)\Windows Kits\8.1\Include\um\mpconfig.h 31 1 velocity2 3 IntelliSense: identifier "IMixerPinConfig" is undefined c:\Program Files (x86)\Windows Kits\8.1\Include\um\mpconfig.h 31 20 velocity2 4 IntelliSense: identifier "IUnknown" is undefined c:\Program Files (x86)\Windows Kits\8.1\Include\um\mpconfig.h 31 37 velocity2 5 IntelliSense: explicit type is missing ('int' assumed) c:\Program Files (x86)\Windows Kits\8.1\Include\um\mpconfig.h 129 1 velocity2 6 IntelliSense: identifier "IMixerPinConfig2" is undefined c:\Program Files (x86)\Windows Kits\8.1\Include\um\mpconfig.h 129 20 velocity2 7 IntelliSense: identifier "IMixerPinConfig" is undefined c:\Program Files (x86)\Windows Kits\8.1\Include\um\mpconfig.h 129 38 velocity2 21 IntelliSense: expected a declaration c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\setjmp.h 178 1 velocity2 13 IntelliSense: expected a declaration c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stddef.h 74 1 velocity2 8 IntelliSense: identifier "_onexit_t" is undefined c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdlib.h 826 9 velocity2 9 IntelliSense: identifier "_onexit_t" is undefined c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdlib.h 826 44 velocity2 10 IntelliSense: identifier "_onexit_t" is undefined c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdlib.h 947 1 velocity2 11 IntelliSense: identifier "_onexit_t" is undefined c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdlib.h 947 34 velocity2 the localize.h is in C:\Program Files\ANSYS Inc\v150\fluent\fluent15.0.7\tgrid\win64\3d_host\l ocalize.h Pl help . regards limbu Last edited by sanjeetlimbu; March 24, 2015 at 14:27. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF and text commands | David | FLUENT | 3 | June 27, 2022 00:10 |
fluent UDF on linux machine | Min-Hua Wang | Fluent UDF and Scheme Programming | 6 | June 29, 2013 09:41 |
Distributed Parallel on dual core remote machine | Justin | CFX | 1 | February 3, 2008 18:23 |
UDF problem in 2 CPU machine | David | FLUENT | 2 | April 18, 2004 10:02 |
PC vs. Workstation | Tim Franke | Main CFD Forum | 5 | September 29, 1999 16:01 |