|
[Sponsors] |
March 4, 2016, 08:20 |
Compiling Problem with DEFINE_PROFILE
|
#1 | |
New Member
noxtul
Join Date: Mar 2016
Posts: 1
Rep Power: 0 |
Hello People,
I wanna build some custom boundary velocity profile for my Fluent case running in parallel with 2 nodes. I wrote this c source code: Code:
#include "udf.h" #include "math.h" #include "stdio.h" #define z0 1e-2 //unit m #define zref 6 //unit m #define k 0.4 //cte Von Karman #define vref 35.7632 //unit m/s DEFINE_PROFILE(xvinlet,t,i) { float X[ND_ND]; float u,h,Vwind,Vtrain; int alfa; face_t f; FILE *fp; fp=fopen("inputs.txt","r"); fscanf(fp,"%i %f",&alfa,&Vtrain); fclose(fp); u=(k*vref)/(log((zref+z0)/z0)); #if !RP_HOST /* serial or node */ begin_f_loop(f,t) { F_CENTROID(X,f,t); h=X[1]; Vwind=(u/k)*log((h+z0)/z0); F_PROFILE(f,t,i)=-Vwind*cos(alfa)-Vtrain; } end_f_loop(f,t); #endif } Quote:
My system is:
The udf_names.c source code that automatically created the compiler is: Code:
/* This file generated automatically. */ /* Do not modify. */ #include "udf.h" #include "prop.h" #include "dpm.h" extern DEFINE_PROFILE(xvinlet,t,i); __declspec(dllexport) UDF_Data udf_data[] = { {"xvinlet", (void (*)())xvinlet, UDF_TYPE_PROFILE}, }; __declspec(dllexport) int n_udf_data = sizeof(udf_data)/sizeof(UDF_Data); #include "version.h" __declspec(dllexport) void UDF_Inquire_Release(int *major, int *minor, int *revision) { *major = RampantReleaseMajor; *minor = RampantReleaseMinor; *revision = RampantReleaseRevision; } Last edited by D-Nox; March 4, 2016 at 10:55. |
||
March 4, 2016, 10:45 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
In my experience, that error C4113 can be safely ignored, it is a mistake by the Fluent programmers that does not have any real consequences.
I would be more concerned with the two other errors that are shown: LNK2001 and LNK1120. Those are new for me. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
C_T(c,t) problem while compiling (OK interpreted) | crevoise | Fluent UDF and Scheme Programming | 6 | February 4, 2014 08:16 |
Problem with compiling new solver | palazi88 | OpenFOAM Programming & Development | 2 | December 24, 2013 20:52 |
problem with compiling the source code | michel1988 | OpenFOAM Installation | 1 | April 17, 2013 18:19 |
COMPILING PROBLEM | ammi | FLUENT | 1 | December 7, 2006 05:07 |
problem in compiling UDF | ammi reddy | FLUENT | 1 | December 1, 2006 07:45 |