-
-
September 27, 2017 at 11:19 am
admin
Ansys EmployeeUser can set a dummy user defined scalar (do not need to solve that UDS), assign the varible he wants to compute the gradient to that UDS. Then use the following udf: #include "udf.h" DEFINEEXECUTEATEND(myadjust) { Domain *d=GetDomain(1); Thread *t; cellt c; threadloopc(t,d) { begincloop(c,t) CUDSI(c,t,0)=CU(c,t); endcloop(c,t) } AllocStorageVars(d, SVUDSIRG(0), SVUDSIG(0), SVNULL); ScalarReconstruction(d, SVUDSI(0), -1, SVUDSIRG(0), NULL); ScalarDerivatives (d, SVUDSI(0), -1, SVUDSIG(0), SVUDSIRG(0), NULL); threadloopc(t,d) { begincloop(c,t) { CUDMI(c,t,0)=CUDSIG(c,t,0)[0]; CUDMI(c,t,1)=CUDSIG(c,t,0)[1]; CUDMI(c,t,2)=CUDSIG(c,t,0)[2]; } endcloop(c,t) } FreeStorageVars(d,SVUDSIRG(0), SVUDSIG(0), SV_NULL); }
-
September 27, 2017 at 11:19 am
admin
Ansys EmployeeHow to compute the derivative of an arbitrary varaible in a FLUENT UDF?
-
- The topic ‘Compute the derivative of an arbitrary varaible in a FLUENT UDF’ is closed to new replies.
- air flow in and out of computer case
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Eroded Mass due to Erosion of Soil Particles by Fluids
- Guidance needed for Conjugate Heat Transfer Analysis for a 3s3p Li-ion Battery
- Centrifugal Fan Analysis for Determination of Characteristic Curve
- I am doing a corona simulation. But particles are not spreading.
- Issue to compile a UDF in ANSYS Fluent
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
-
3862
-
1414
-
1231
-
1118
-
1015
© 2025 Copyright ANSYS, Inc. All rights reserved.