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

Using 'Compute_Force_And_Moment' funtion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 11, 2015, 07:31
Default Using 'Compute_Force_And_Moment' funtion
  #1
New Member
 
Shree
Join Date: May 2014
Posts: 10
Rep Power: 11
sarjerao is on a distinguished road
hi,

I am using Compute_Force_And_Moment function to access lift and drag acting on cylinder whose boundary id is 17. my udf is as follows:

#include "udf.h"

DEFINE_PROFILE(update_velocity,t_inlet,i)
{
/* get moment or force */
Domain *d = Get_Domain(1); /* for single phase flow*/
face_t f;
Thread *t_object = Lookup_Thread(d,17); /* you get Boundary_ID from the boundary condition panel in Fluent*/
real force[3], moment[3], cg[ND_ND]; /*initialise*/
real force_y,v_new;
Compute_Force_And_Moment (d,t_object,cg,force,moment,TRUE)

v_new = 0.0*force[0]; // at this line parse error is coming!!

/* update inlet velocity */

begin_f_loop(f,t_inlet) /* loop over all faces at velocity inelt */
{
F_PROFILE(f,t_inlet,i) = v_new;
}
end_f_loop(f,t_inlet)

}

it shows parse error at line 13 (red color line). p
please help me
sarjerao is offline   Reply With Quote

Old   May 11, 2015, 09:01
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
You have asked the same question twice. I already replied at your first question.
pakk 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
Low-Reynolds Wall Funtion OF crossley90 OpenFOAM 2 December 4, 2018 09:59
Algebraic Interfacial Area Density Funtion (IAID) Mechaniker CFX 2 February 27, 2014 11:35
Creating a user-defined funtion mathewg Fluent UDF and Scheme Programming 1 February 14, 2012 17:36
patch funtion tincho FLUENT 0 April 1, 2010 11:59
Using CEL Funtion jaiye CFX 6 August 18, 2008 19:37


All times are GMT -4. The time now is 08:51.