CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Calculating derivatives in Fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 24, 2023, 03:00
Default Calculating derivatives in Fluent
  #1
New Member
 
Alex
Join Date: Jan 2023
Posts: 1
Rep Power: 0
abc777 is on a distinguished road
Good afternoon, please, can someone help me in calculating derivatives in Fluent?
Please tell me:
1) How can I calculate derivatives in Fluent for all values, or in particular, for temperature or impurity?
2) Why does UDS_Derivatives.c for calculating the derivative not work in the latest versions of ANSYS Fluent?

Example of UDS_Derivatives.c:

#include "udf.h"
#include "sg.h"

DEFINE_ADJUST(adjust,d)
{
int n;
for(n=0; n<n_uds; ++n) uds_derivatives(d, n);

/* The UDS gradients are now available */


}

void uds_derivatives(Domain *d, int n)
{
/* Code to compute derivative of a variable. Variable storage allocation first.... */
MD_Alloc_Storage_Vars(d, SV_UDSI_RG(n), SV_UDSI_G(n), SV_NULL);
Scalar_Reconstruction(d, SV_UDS_I(n), -1, SV_UDSI_RG(n), NULL);
Scalar_Derivatives(d, SV_UDS_I(n), -1, SV_UDSI_G(n), SV_UDSI_RG(n), NULL);
return;
}
abc777 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating drag coefficient from Fluent Richard FLUENT 12 April 11, 2018 15:35
The fluent stopped and errors with "Emergency: received SIGHUP signal" yuyuxuan FLUENT 0 December 3, 2013 22:56
Calculating displacement and momentum thickness from Fluent VSAndroid Main CFD Forum 0 April 14, 2011 13:45
Calculating Second Derivatives fluidsguy1001 FLUENT 0 December 12, 2007 11:50
Calculating Centre of Pressure within FLUENT Matt FLUENT 1 March 5, 2006 08:29


All times are GMT -4. The time now is 05:55.