|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Violet
Join Date: Jun 2016
Posts: 8
Rep Power: 10 ![]() |
Hi everyone,
I have been having issues in loading a UDF interpreted (either parallel or serial). I get the line 1 parse error and I am not sure how to fix it. I came here to see if I could use some help. Thank you in advance. I have copied the code I am trying to load below. #include "udf.h" #include "cxndsearch.h" static ND_Search *domain_table = NULL; /* Offset temperature */ #define PERM 2.5E14 #define Coe1 1 #define Coe2 1 DEFINE_PROFILE(mem_perm,t,i) { real flow_time; real x[ND_ND]; /* this will hold the position vector */ cell_t c; cell_t c1; Thread *t1; cell_t c2; Thread *t2; real c_centroid[ND_ND]; CX_Cell_Id *cx_cell; real P1[ND_ND]; real P2[ND_ND]; real deltaP; real u_g; flow_time = CURRENT_TIME; #if !RP_HOST begin_c_loop(c,t) { C_CENTROID(x,c,t); /* P1[0] = x[0]; P1[1] = 0.0005; domain_table = CX_Start_ND_Point_Search(domain_table, TRUE, -1); cx_cell = CX_Find_Cell_With_Point(domain_table, P1, 0.0); c1 = RP_CELL(cx_cell); //the right cell number t1 = RP_THREAD(cx_cell); // the thread domain_table = CX_End_ND_Point_Search(domain_table); P2[0] = x[0]; P2[1] = 0.00064; domain_table = CX_Start_ND_Point_Search(domain_table, TRUE, -1); cx_cell = CX_Find_Cell_With_Point(domain_table, P2, 0.0); c2 = RP_CELL(cx_cell); //the right cell number t2 = RP_THREAD(cx_cell); // the thread domain_table = CX_End_ND_Point_Search(domain_table); deltaP = C_P(c1, t1) - C_P(c2, t2); u_g = C_U_G(c1, t1)[1]; C_UDMI(c, t, 1) = sqrt((Coe1*deltaP / u_g)*(1.0 - exp(-u_g*Coe2*flow_time))); */ F_PROFILE(c, t, i) = PERM + C_UDMI(c, t, 1); } Message("flow time and remainder: %g\n", flow_time); end_c_loop(c,t) #endif } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 ![]() ![]() |
did you try to compile this script?
best regards |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 01:27 |
Installation OF1.5-dev | ttdtud | OpenFOAM Installation | 46 | May 5, 2009 02:32 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 07:36 |
[blockMesh] BlockMeshmergePatchPairs polyTopoChanger | benru | OpenFOAM Meshing & Mesh Conversion | 3 | June 29, 2008 21:24 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 15:16 |