-
-
March 23, 2021 at 4:40 pm
rmoss06
SubscriberHi all,nnI am using the following body force trying to force my particles to accelerate towards the walls of my rectangular electrostatic precipitator which they are flowing through. I compiled and added the body force to my simulation with no errors and the simulation runs, but this force doesn't seem to affect my particles motion at all. Could I have made a mistake in my code?./* UDF for computing the electric force on a charged particle */nn#include udf.hnn#define Q 7.0 /* particle electric charge */n#define E 4 /* electric field magnitude */n#define TSTART 0 /* field applied at t = tstart */ nn/* Calculate electric force on charged particle. */n/* velocity with electric field: Fx= q*bz*Vy, Fy= -q*bz*Vx */nnDEFINE_DPM_BODY_FORCE(electric_force, p, i)n{ntreal bforce = 0;ntif (P_TIME(p) >= TSTART)nt{nttif (i == 0) bforce = Q * E*P_VEL(p)[0];nnttelse if (i == 1) bforce = -Q * E*P_VEL(p)[1];nnt}ntelsenttbforce = 0.0;nt/* an acceleration should be returned */ntreturn (bforce / P_MASS(p));n}Continued from /forum/discussion/26077/issues-creating-a-udf-to-act-as-a-force-on-particles#latestn -
March 23, 2021 at 5:06 pm
YasserSelima
SubscribernWhat is the injection velocity? If the particle initial velocity is zero, the force will be zeron -
March 23, 2021 at 5:10 pm
rmoss06
Subscriberthe injection velocity is 5 m/sn -
March 23, 2021 at 5:54 pm
YasserSelima
Subscriberin the UDF, before the return line, add this to see the value of the acceleration ... when dividing this by your time step, you should get an approximate value of the velocity change due to the particle.nn#if RP_HOSTn Message(
acceleration = %f, bforce/P_MASS(p));n#endifn -
March 23, 2021 at 7:50 pm
rmoss06
SubscriberAdding that line didn't seem to change anything. After some trouble shooting, it appears that when I run my simulation without any body forces enabled, my particles travel through the space between my two plates with no issues. When I go into discreate phases and set my body force to be electric_force my particles hit the inlet of my simulation and do go up or down, never entering the fluid area between the two plates.n -
March 23, 2021 at 7:59 pm
YasserSelima
SubscriberCan you show the geometry?n -
March 23, 2021 at 8:11 pm
-
March 23, 2021 at 8:14 pm
YasserSelima
SubscriberFrom where are you injecting the particles? and what is the velocity direction?n -
March 23, 2021 at 8:19 pm
rmoss06
Subscriberthe inlet is set as the left edge, the outlet as the right edge, the inlet velocity is 5m/s in the x-direction (left to right) and the injection velocity is set as the same. I checked to see that the inlet and outlet are set on the right axis and they are (x-positive is inlet to outlet direction)nn -
March 23, 2021 at 8:40 pm
YasserSelima
Subscriberremove the #if RP_HOST and #endif lines ... leave only the message line and check if fluent write any numbers when you are simulatingn
-
Viewing 9 reply threads
- The topic ‘Body Force not affecting particle motion’ is closed to new replies.
Ansys Innovation Space
Trending discussions
Top Contributors
-
3647
-
1313
-
1142
-
1075
-
1013
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.