-
-
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.
- How do I get my hands on Ansys Rocky DEM
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- convergence issue for transonic flow
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- Point exception in erosion calculation
- Script Error Ansys
- Errors with multi-connected bodies using AQWA
-
2612
-
938
-
812
-
599
-
591
© 2025 Copyright ANSYS, Inc. All rights reserved.