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

UDS programming in porous media

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2014, 14:18
Default UDS programming in porous media
  #1
New Member
 
Aravind
Join Date: Oct 2014
Posts: 3
Rep Power: 12
aravindbpillai is on a distinguished road
#include "udf.h"
#include"sg.h"
enum
{
E,
N_REQUIRED_UDS
};
DEFINE_ADJUST(e_adjust,domain)
{
if (n_uds < N_REQUIRED_UDS)
Internal_Error("not enough user-defined scalars allocated");
}


DEFINE_SOURCE(energy_source_up,c,t,dS,eqn)
{

dS[eqn]= -49574.9 *pow((C_R(c,t)*C_U(c,t))/C_MU_L(c,t), 0.42 );
return 49574.9 *pow((C_R(c,t)*C_U(c,t))/C_MU_L(c,t), 0.42 )*( 400 -C_UDSI(c,t,E));
}
DEFINE_SOURCE(energy_down_source,c,t,dS,eqn)
{
dS[eqn]= -12.45 *pow((C_R(c,t)*C_U(c,t))/C_MU_L(c,t), 0.96 );
return 12.45 *pow((C_R(c,t)*C_U(c,t))/C_MU_L(c,t), 0.96 )*( 400 -C_UDSI(c,t,E));
}

DEFINE_DIFFUSIVITY(e_diffusivity,c,t,i)
{
real X[ND_ND],xp;

C_CENTROID(X,c,t);
xp = X[0];
if(xp <= 0.035)
{
return 0.2 +( 1.772 *pow( 10.0 ,- 10 )*pow(C_UDSI(c,t,E), 3 ));
}
else
{

return 0.1 +( 1.77 *pow( 10.0 ,- 9 )*pow(C_UDSI(c,t,E), 3 ));
}
}
DEFINE_PROFILE(e_profile,t,i)
{
face_t f;
begin_f_loop (f,t)
{
F_PROFILE(f,t,i)= -2.367*pow(10.0 ,-7 )*(pow(F_UDSI(f,t,i), 4 )- pow( 300.0 , 4 ));
}
end_f_loop (f,t)
}

After hooking the above source code in the fluent, I tried for initializing it.then it showing the error that hav noted blow.Please help me.


Error:
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f
aravindbpillai is offline   Reply With Quote

Old   October 14, 2014, 14:45
Default
  #2
New Member
 
Aravind
Join Date: Oct 2014
Posts: 3
Rep Power: 12
aravindbpillai is on a distinguished road
page 197 talking about flux fuction.What will be the error with my defined variables.?help me plz
aravindbpillai 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
UDS porous media Nagendra FLUENT 12 August 17, 2022 14:30
Porous media setup issues in Fluent Bernard Van FLUENT 29 January 26, 2017 05:09
UDS Diffusivity in porous media pmtgt Fluent UDF and Scheme Programming 2 February 13, 2014 07:21
UDS for Porous Media cp FLUENT 6 June 26, 2012 14:44
porous media: Fluent or Star-CD? Igor Main CFD Forum 0 December 5, 2002 16:16


All times are GMT -4. The time now is 03:28.