-
-
July 4, 2019 at 9:48 am
uconcorde
SubscriberHi Amine,
I am trying to use ADJUST macro to get second derivatives of my converged velocity field, but I got all zero values. Here is the code and procedure I am using. Can you please help me to find any mistake I have?
# include "udf.h"
DEFINE_ADJUST(adjust_gradient,domain)
{
Thread *t;
cell_t c;
face_t f;
domain = Get_Domain(1);
thread_loop_c(t,domain)
{
begin_c_loop(c,t)
{
C_UDSI(c,t,0) = C_DUDX(c,t); // calculate d2u/dx2
}
end_c_loop(c,t)
}
}
Procedure:
1) Open my .cas file
2) Interpreted udf
3) Open my converged .dat file
4) User defined -> Scalars -> 1 -> Solution Zones: all fluid zones; Flux Function: none; Unsteady Function: none
5) Solving -> deselect User Scalar 0
6) Run calculation for 1 time steps
7) Check contour plot of User Defined Scalar: all zero values.
Best,
David
-
July 4, 2019 at 9:56 am
Rob
Ansys EmployeeI suspect the solver is clearing the gradient value before it's saved in the case. I'd have a look at UDM rather than UDS: there is a difference, and also check the options in the TUI /solve/set/expert
As an aside, please don't post into old threads which are marked as "solved": we don't tend to check in those!
-
- 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.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
-
3694
-
2564
-
1765
-
1234
-
590
© 2023 Copyright ANSYS, Inc. All rights reserved.