-
-
May 2, 2023 at 1:42 pm
Dana Moses
Subscriberhi!
Im writing a UDF and getting this error-
P_USER_REAL: undeclared variable
this is the UDF:
include "udf.h"
#include "dpm.h"
DEFINE_DPM_SCALAR_UPDATE(boron_scalar, c, t, initialize, p)
{
if (initialize)
{
P_USER_REAL(p,0)=0.1;
}
else
{
P_USER_REAL(p,0)=P_USER_REAL(p,0);
}
}I already activeted the discreat phase model and define Number of scalars as "1" in User Variables in the discreat phase model tab.
Asking kindly for any help! -
May 2, 2023 at 3:34 pm
Rob
Ansys EmployeeIs it a real, integer, array etc?
-
May 2, 2023 at 3:41 pm
Dana Moses
Subscriberp_user_real is a macro - "Particle values can be stored in an array associated with the Tracked_Particle (accessed with the macro P_USER_REAL(p,i))" (from Fluent UDF manual)
-
May 2, 2023 at 3:55 pm
Rob
Ansys EmployeeYou sure about that? https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v231/en/flu_udf/flu_udf.html
-
May 2, 2023 at 4:01 pm
Dana Moses
Subscriberyes :)
Unfortunatly I cant access the link you attached for some reason - can you elaborate?
-
May 2, 2023 at 4:15 pm
Rob
Ansys EmployeeAre you REALLY sure?
Click on Help in Fluent and have a look for DEFINE_DPM_SCALAR There's a very good reason we don't like third party copies of the documentation, not just copyright.
-
May 2, 2023 at 6:33 pm
Dana Moses
SubscriberI sure understand. can you guide me to where Help is in fluent softwhere? I'm afraid I don't know where to look :)
-
May 3, 2023 at 8:26 am
Rob
Ansys EmployeeOpen any panel in the Fluent software, and look for the button towards the bottom left of that panel. It's labelled as "Help" to guide you! :) You may want to look into the Learning section on here, and in Fluids you'll find some courses on how to use Fluent: do those and then the tutorials you'll find in the Help system.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Limitations to Student License?
- Not seeing any items in the ANSYS Workbench toolbox?
- Missing Analysis Systems from toolbox
- “An error occurred while starting the solver module.” – Maybe licence problem?
- FLUENT application Failed to start
- Please recommend the configuration of the computer workstation
- No license available at this time
- ANSYS License Manager Error
- I am using MacBook Pro with M1chip, how can I install or any other ways to use Ansys ?
- Your product license has numerical problem size limits…..
-
5242
-
3299
-
2469
-
1308
-
988
© 2023 Copyright ANSYS, Inc. All rights reserved.