|
[Sponsors] |
October 16, 2018, 15:34 |
UDF compiling error
|
#1 |
Senior Member
Weiqiang Liu
Join Date: Feb 2018
Posts: 278
Rep Power: 9 |
Hi all,
I am trying to compile a UDF in fluent to define surface reaction rate. However, I meet a very strange error. First, I found a very simple c. file which defines source term and it can be compiled normally. Then I started to compiled my own UDF and I keeps getting the error like 'the udf library you are trying to load is not compiled for 2d on current platform (x64)' At first sight, I thought that my code has something wrong. So I tried to modify my code and still same error. So I copied a UDF file which defines surface reaction rate from ANSYS UDF manual and tried to compile this code. What is surprising is I got the same error with this official UDF code. I think the visual studio and Fluent works right on my computer. Because the very simple source term UDF can be compiled normally. This makes me very confused. Can anybody help me? By the way, I am using visual studio 10.0, ANSYS fluent 17.0 and windows 10. 64. attached you can find are the source term UDF and surface reaction rate UDF from ANSYS UDF manual. BEST. |
|
November 21, 2018, 07:08 |
|
#2 |
New Member
Anuja Vijayan
Join Date: Mar 2017
Location: Thiruvananthapuram
Posts: 23
Rep Power: 9 |
Call fluent from visual studio command prompt.
Say for example, if you have VS2015 for 64 bit processor, your command prompt will be VS2015 x64 Native Tools Command Prompt(This may slightly differ based on which version of visual studio you have). Then you make sure that you have set the environment correctly by running vcvars64.bat(for 64 bit OS) or vcvars32.bat(for 32 bit OS). Then you give the path of fluent in command prompt as C:\Program Files\ANSYS INC\v181\ntbin\win64\fluent.exe (this will also vary depending on your ANSYS version and its installed location) Now, fluent launch window will appear. Then compile the UDF. It should work fine. |
|
November 21, 2018, 10:36 |
|
#3 | |
Senior Member
Weiqiang Liu
Join Date: Feb 2018
Posts: 278
Rep Power: 9 |
Quote:
Hello, I’ve already solve this problem. Now I have convergence problem. Thanks all the same. Weiqiang. |
||
Tags |
compiling, source term, surface rate, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
error compiling modified applications | yvyan | OpenFOAM Programming & Development | 21 | March 1, 2016 05:53 |
[swak4Foam] installing funkySetFields | igo | OpenFOAM Community Contributions | 1 | November 20, 2012 21:16 |
[swak4Foam] groovyBC: problems compiling: "flex: not found" and "undefined reference to ..." | sega | OpenFOAM Community Contributions | 12 | February 17, 2010 10:30 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
user subroutine error | CFDUSER | CFX | 2 | December 9, 2006 07:31 |