|
[Sponsors] |
September 10, 2020, 10: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, 06: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); 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, 09:24 |
|
#3 | |
Member
Join Date: Jan 2020
Posts: 31
Rep Power: 6 |
Quote:
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 |
||
Tags |
beam, blade, piezoelectric, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drag Force Ratio for Flat Plate | Rob Wilk | Main CFD Forum | 40 | May 10, 2020 05:47 |
how to calculate the drag force on a 3D sphere in OF? | keepfit | OpenFOAM | 2 | May 6, 2015 13:04 |
how to calculate force with dynamic pressure | T.Matrix | OpenFOAM Post-Processing | 0 | October 14, 2012 01:39 |
How to calculate total force? | T.Matrix | OpenFOAM Post-Processing | 2 | October 14, 2012 01:15 |
how does Fluent calculate the pressure and viscous force ? | e30.lsb | FLUENT | 7 | June 27, 2011 22:31 |