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

Calculate Force over beam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2020, 09:13
Default Calculate Force over beam
  #1
Member
 
Join Date: Jan 2020
Posts: 31
Rep Power: 6
etedalgara is on a distinguished road
Hi, I am trying to calculate the force on the beam! the formula is like this:

L is the length of the beam.
and I am using this code(part of the code) in DEFINE_EXECUTE_AT_END macro:

Domain *d= Get_Domain(1);
Thread *t=Lookup_Thread(d,ID);
face_t f;

begin_f_loop(f, t)
if (PRINCIPAL_FACE_P(f,t))
{
F_CENTROID(x,f,t);
yy = x[0];
F_AREA(area,f,t);
phi = 1-cos((PI/2)*(yy/L));
Fpy+=L*area[1]*F_P(f,t)*phi;
}
fout = fopen ("Pressure.out","a");
fprintf(fout," %f %f %f %f %f %f %f\n",time,area[1],Fpy,F_P(f,t),phi);
fclose(fout);
end_f_loop(f, t)
Fy = Fpy;
#if RP_NODE /* SERIAL or NODE */
Fy=PRF_GRSUM1(Fy);
#endif /* RP_NODE */

Is this true?! should I multiply (L) for calculating Force (Fpy+=L*area[1]*F_P(f,t)*phi)
THANKS
etedalgara is offline   Reply With Quote

Old   September 15, 2020, 05:00
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
unfortunately, I don't see any formula, may be, cause the picture is blocked.

I have no Idea, if you need L (length of the beam) in the formula or not, so I can comment the code only

most likely you have problems in writing to file
Code:
fout = fopen ("Pressure.out","a");
fprintf(fout," %f %f %f %f %f %f %f\n",time,area[1],Fpy,F_P(f,t),phi);
fclose(fout);
cause to write into file in parallel mode you should transfer data from computational modes to host first.
Read Ansys Fluent Customization manual for detailed information. Look for parallelization chapter

if you remove that part, I think, code should work well
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   September 16, 2020, 08:24
Default
  #3
Member
 
Join Date: Jan 2020
Posts: 31
Rep Power: 6
etedalgara is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
unfortunately, I don't see any formula, may be, cause the picture is blocked.

I have no Idea, if you need L (length of the beam) in the formula or not, so I can comment the code only

most likely you have problems in writing to file
Code:
fout = fopen ("Pressure.out","a");
fprintf(fout," %f %f %f %f %f %f %f\n",time,area[1],Fpy,F_P(f,t),phi);
fclose(fout);
cause to write into file in parallel mode you should transfer data from computational modes to host first.
Read Ansys Fluent Customization manual for detailed information. Look for parallelization chapter

if you remove that part, I think, code should work well
Thank you Alexander, I am trying to attach the picture which describe the formulas.
here is my question: should I multiply (L) for calculating Force or not?!(Fpy+=L*area[1]*F_P(f,t)*phi)
and for more details I use the series form when I open fluent not parallel
Attached Images
File Type: png Force.png (44.2 KB, 2 views)
etedalgara is offline   Reply With Quote

Reply

Tags
beam, blade, piezoelectric, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Drag Force Ratio for Flat Plate Rob Wilk Main CFD Forum 40 May 10, 2020 04:47
how to calculate the drag force on a 3D sphere in OF? keepfit OpenFOAM 2 May 6, 2015 12:04
how to calculate force with dynamic pressure T.Matrix OpenFOAM Post-Processing 0 October 14, 2012 00:39
How to calculate total force? T.Matrix OpenFOAM Post-Processing 2 October 14, 2012 00:15
how does Fluent calculate the pressure and viscous force ? e30.lsb FLUENT 7 June 27, 2011 21:31


All times are GMT -4. The time now is 19:54.