# Calculate Force over beam

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

 September 10, 2020, 09:13 Calculate Force over beam #1 Member   Join Date: Jan 2020 Posts: 31 Rep Power: 6 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

 September 15, 2020, 05:00 #2 Senior Member   Alexander Join Date: Apr 2013 Posts: 2,363 Rep Power: 34 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

September 16, 2020, 08:24
#3
Member

Join Date: Jan 2020
Posts: 31
Rep Power: 6
Quote:
 Originally Posted by AlexanderZ 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
 Force.png (44.2 KB, 2 views)

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Rob Wilk Main CFD Forum 40 May 10, 2020 04:47 keepfit OpenFOAM 2 May 6, 2015 12:04 T.Matrix OpenFOAM Post-Processing 0 October 14, 2012 00:39 T.Matrix OpenFOAM Post-Processing 2 October 14, 2012 00:15 e30.lsb FLUENT 7 June 27, 2011 21:31

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