|
[Sponsors] |
July 5, 2019, 23:30 |
Density UDF Parallel
|
#1 |
New Member
Ali Gürcan
Join Date: Jun 2019
Posts: 7
Rep Power: 7 |
Code:
#include "udf.h" int printStopper=0; /*This is a dummy counter */ DEFINE_PROPERTY(cell_density,c,t) { #if!RP_HOST /* SERIAL or NODE */ real rho; real temp = C_T(c,t); PROP_rho=(-0.00357*(pow(temp,2))+(1.88*temp+753.2)); #if PARALLEL if(I_AM_NODE_ZERO_P) #endif if(printStopper<=100) {printStopper++; CX_Message("*****Cell Temp: %3.2f Kelvin, Rho= %E kg/m3 \n",temp,rho); } #endif /* !RP_HOST */ return PROP_rho; } HTML Code:
Copied C:\Users\LENOVO\Desktop/C:\Users\LENOVO\Desktop\rho.c to libudf\src udf_names.c and user_nt.udf files in 3ddp_host are upto date. (system "copy "C:\PROGRA~1\ANSYSI~1\v193\fluent"\fluent19.3.0\src\udf\makefile_nt.udf "libudf\win64\3ddp_host\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3ddp_host")udf_names.c and user_nt.udf files in 3ddp_node are upto date. (system "copy "C:\PROGRA~1\ANSYSI~1\v193\fluent"\fluent19.3.0\src\udf\makefile_nt.udf "libudf\win64\3ddp_node\makefile" ") 1 file(s) copied. (chdir "libudf")(chdir "win64\3ddp_node")# Generating ud_io1.h rho.c ..\..\src\rho.c(9) : error C2106: '=' : left operand must be l-value Done. Where am I making a mistake? (Ansys v19.3) |
|
July 8, 2019, 02:02 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
PROP_rho is OTHER macro, you don't need it
Code:
#include "udf.h" int printStopper=0; /*This is a dummy counter */ DEFINE_PROPERTY(cell_density,c,t) { #if!RP_HOST /* SERIAL or NODE */ real rho; real temp = C_T(c,t); rho=(-0.00357*(pow(temp,2))+(1.88*temp+753.2)); #if PARALLEL if(I_AM_NODE_ZERO_P) #endif if(printStopper<=100) {printStopper++; CX_Message("*****Cell Temp: %3.2f Kelvin, Rho= %E kg/m3 \n",temp,rho); } #endif /* !RP_HOST */ return rho; } best regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 19:45 |
Identifying cell in parallel UDF | upeksa | Fluent UDF and Scheme Programming | 0 | July 24, 2013 12:27 |
Density UDF for supersonic flow | David Christopher | Fluent UDF and Scheme Programming | 0 | April 18, 2013 06:48 |
Fluent udf in parallel | Zheng | Fluent UDF and Scheme Programming | 1 | March 21, 2013 07:19 |
UDF for solid density | gghazal | Fluent UDF and Scheme Programming | 3 | November 13, 2012 04:10 |