-
-
April 19, 2024 at 10:57 am
Paul Richter
SubscriberHello,
i am doing a transient simulation with a DPM Injection.
I want the injection not to be constant but to be a function of the simulation time (for example t^2).
I think that the only way to implement that is with a UDF, i came up with this Code, but it is not working at all:
#include "udf.h"
DEFINE_DPM_SOURCE(dpm_mass_flow, c, t, initialize, p)
{
  real time = CURRENT_TIME;
  real mass_flow_rate;  mass_flow_rate = time * time;
  return mass_flow_rate;
}My questions are:
1) Is there an easier way to achieve a total flow rate of t^2
2) If not do you know a better option for a UDF Code?
Thanks in advance
-
April 19, 2024 at 12:05 pm
Rob
Forum ModeratorHave a look at DEFINE_DPM_INJECTION_INITÂ Â
-
April 19, 2024 at 12:15 pm
Paul Richter
SubscriberDear Rob,
first of all thanks for your reply!
Yes i came up with this too, i made the Code:
#include "udf.h"
DEFINE_DPM_INJECTION_INIT(init,I)
{
  Particle *p;
  real time = CURRENT_TIME;
  real P_FLOW_RATE;
 Â
  // Einstellung der Partikelmasse
  P_FLOW_RATE(p) = time * time;
}But i get the Error "P_FLOW_RATE: no function prototype"
-
April 19, 2024 at 12:22 pm
Rob
Forum ModeratorWhich manual are you reading?Â
-
April 19, 2024 at 12:27 pm
Paul Richter
SubscriberÂ
ANSYS FLUENT 12.0 UDF - edit Rob to comply with copyright
Â
Â
-
April 19, 2024 at 1:16 pm
Rob
Forum ModeratorThat'll explain it. Use the documentation that comes with the software (click on Help). You're using the old form of the macro.
Â
-
- The topic ‘DPM Particle Injection Total Flow Rate as a function of time’ is closed to new replies.
- How do I get my hands on Ansys Rocky DEM
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- convergence issue for transonic flow
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- Point exception in erosion calculation
- Errors with multi-connected bodies using AQWA
- Script Error Ansys
-
2532
-
933
-
772
-
599
-
591
© 2025 Copyright ANSYS, Inc. All rights reserved.