|
[Sponsors] |
udf - get second derivative of a converged velocity field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 3, 2019, 16:09 |
udf - get second derivative of a converged velocity field
|
#1 |
New Member
David
Join Date: Nov 2017
Posts: 14
Rep Power: 9 |
Hello,
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? Code:
# 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, Dv |
|
July 4, 2019, 01:01 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you dont need scalar, change to udmi
you should allocate memory for UDMI Code:
C_UDMI(c,t,0) = C_DUDX(c,t); // calculate d2u/dx2 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accuracy of the velocity field in a low speed wind tunnel? | hob | Main CFD Forum | 1 | April 24, 2016 15:35 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Simulation with UDF for species mass fraction and velocity profile | virgy | Fluent UDF and Scheme Programming | 8 | February 7, 2012 05:30 |
velocity of massless particles and velocity of flow field in same coordinate | payam_IUST | FLUENT | 0 | October 19, 2009 00:24 |
UDF for Second Derivative of Velocity | Satish | FLUENT | 1 | March 8, 2004 05:15 |