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

DEFINE_PROFILE for wall shear stress

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 24, 2012, 13:29
Default DEFINE_PROFILE for wall shear stress
  #1
Member
 
Indrajit
Join Date: Nov 2012
Posts: 33
Rep Power: 13
IndrajitW is on a distinguished road
Hi all,
I wish to provide a user defined wall shear stress and for that I am using DEFINE_PROFILE macro. In that I am using the F_PROFILE(f,t,i)= 2*C_U(c,t0)+0.07;
However I am getting a segmentation violation error. Is my way of defining F_PROFILE wrong?
Regards,
Indrajit
IndrajitW is offline   Reply With Quote

Old   December 25, 2012, 00:46
Default
  #2
Senior Member
 
SSL
Join Date: Oct 2012
Posts: 226
Rep Power: 14
msaeedsadeghi is on a distinguished road
May you please share full UDF to check?
msaeedsadeghi is offline   Reply With Quote

Old   December 25, 2012, 01:01
Default
  #3
Member
 
Indrajit
Join Date: Nov 2012
Posts: 33
Rep Power: 13
IndrajitW is on a distinguished road
Hi,
Here's the UDF part of DEFINE_PROFILE for shear stress:
DEFINE_PROFILE(shear_stress, t, pos)
{ face_t f;
cell_t c;
Thread *t0,*pt;
real a=0,r=20,s=20,p=0;
real vel_val[3],VOF_NORMAL[3];
real con_line_vel,z,stress;

begin_f_loop(f,t)
{ c= F_C0(f,t);
t0=THREAD_T0(t);
pt=THREAD_SUB_THREAD(t0,1);
if(C_VOF(c,pt)!=1 && C_VOF(c,pt)>0.5)
{ a=1;
vel_val[0]=C_U(c,t0);
vel_val[1]=C_V(c,t0);
vel_val[2]=C_W(c,t0);
VOF_NORMAL[0]=C_UDMI(c,t0,0);
VOF_NORMAL[1]=C_UDMI(c,t0,1);
VOF_NORMAL[2]=C_UDMI(c,t0,2);
con_line_vel=NV_DOT(vel_val,VOF_NORMAL);
z=NV_MAG(C_UDSI_G(c,t0,0));
if(con_line_vel>0)
{ stress=-((BETA*vel_val[0])+(SIGMA*2))*r/13;
F_PROFILE(f,t,pos)=stress;
r=r-1;
p=2;
}
else if (con_line_vel<0)
{ stress=((BETA*vel_val[0])+(SIGMA*2))*r/13;
F_PROFILE(f,t,pos)=stress;
r=r-1;
p=1;
}
}
This F_PROFILE is responsible for segmentation violation error.Even C_UDSI_G gives me the same error but I feel if I hook it after few iterations it might get sorted. However what about the F_PROFILE?
Reagrds,
Indrajit
IndrajitW is offline   Reply With Quote

Old   December 25, 2012, 02:38
Default
  #4
Senior Member
 
SSL
Join Date: Oct 2012
Posts: 226
Rep Power: 14
msaeedsadeghi is on a distinguished road
There are so many errors in it. Have asked fluent to save UDSI_G? If no, you can not use this code.
set/solve/expert/....
msaeedsadeghi is offline   Reply With Quote

Old   December 25, 2012, 03:31
Default
  #5
Member
 
Indrajit
Join Date: Nov 2012
Posts: 33
Rep Power: 13
IndrajitW is on a distinguished road
I have asked fluent to save UDSI_G by set/solve/expert....Since the UDF compiles I am sure there aren't any syntax errors. As also I have checked by commenting certain parts and expect for the F_PROFILE Part I do not get segmentation violation. What else do you think could be wrong??I feel theres something wrong with F_PROFILE.
Regards,
Indrajit
IndrajitW 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
Shear Stress Calculation in the flow. auburnuser FLOW-3D 11 May 12, 2018 13:49
Fluid wall shear stress Sinead Kelly (Kelly) OpenFOAM Running, Solving & CFD 2 March 30, 2011 06:41
shear stress scalar definitions? Novak Elliott CFX 0 April 6, 2003 01:45
WALL SHEAR STRESS Min-Hua Wang CFX 0 April 3, 2002 17:40
What is the detail definition of wall shear stress zjm FLUENT 0 January 2, 2002 07:43


All times are GMT -4. The time now is 01:35.