CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Density UDF Parallel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 5, 2019, 23:30
Exclamation Density UDF Parallel
  #1
New Member
 
Ali Gürcan
Join Date: Jun 2019
Posts: 7
Rep Power: 7
Daryun is on a distinguished road
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)
Daryun is offline   Reply With Quote

Old   July 8, 2019, 02:02
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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;
}
also you counter is strange from my point of view

best regards
AlexanderZ is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 12:49.