TAGGED: porous-media, tutorials, udf-fluent
-
-
July 9, 2021 at 4:36 pm
vinaychandrakar11
SubscriberHi Everyone,
I am trying to simulate the 2D (planar) domain consists of a 90-degree bend. The duct has a porous region covers the bottom and right-hand wall, and the reaction takes place in the porous region only.
This problem is from the FLUENT UDF tutorial . link for the problem is given below.
https://www.afs.enea.it/project/neptunius/docs/fluent/html/udf/node246.htm
Code for reaction rate mentioned in the tutorial is
/****************************************************************** rate.c Compiled UDF for specifying a reaction rate in a porous medium *******************************************************************/ #include "udf.h" #define K1 2.0e-2 #define K2 5. DEFINE_VR_RATE(vol_reac_rate,c,t,r,mole_weight,species_mf,rate,rr_t) { real s1 = species_mf[0]; real mw1 = mole_weight[0]; if (FLUID_THREAD_P(t) && THREAD_VAR(t).fluid.porous) *rate = K1*s1/pow((1.+K2*s1),2.0)/mw1; else *rate = 0.; *rr_t = *rate; }
My problem is that I am not able to compile this code and its showing error in the line shown below.
if (FLUID_THREAD_P(t) && THREAD_VAR(t).fluid.porous)
As per the problem shown in the tutorial, reaction happens only in the porous zone and above line which is showing error makes sure that its taking porous domain only. But I am not getting why its showing error in this line.
Can anyone help me with this?
Thanks in Advance.
July 9, 2021 at 7:21 pmDrAmine
Ansys EmployeeError message?
July 10, 2021 at 6:26 amJuly 13, 2021 at 9:50 amvinaychandrakar11
SubscriberHi Everyone, Problem is resolved now. There are two problems.
1) It reads only ".c" File not ".C" file.
2) I am able to compile the UDF with command prompt in my windows system. But unable to do it directly.
July 13, 2021 at 11:58 amDrAmine
Ansys EmployeeTry compiling a dummy Hello World UDF (DEFINE_ON_DEMAND) without reading any Fluent case file.
Viewing 4 reply threads- The topic ‘UDF execution problem in Porous media tutorial of FLUENT’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
3587
-
1193
-
1086
-
1068
-
952
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-