CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   User defined function for density gradient (

ben akih October 8, 2006 17:51

User defined function for density gradient
hi folks, i want to create a user defined function to give density gradients so that i can compare simulation results with schlieren images. i know this is possible using a fortran udf but will be grateful if someone with experience out there could give me useful tips on how to do this. thanks in advance ben

Joe October 9, 2006 08:11

Re: User defined function for density gradient
The solver does not provide density gradients AFAIK i.e. density.Gradient is not supported by USER_GERVAR. You also can't create arbitrary variable gradients within CFX Post AFAIK.

So you will probably have to export the density data from Post to a flat file (x,y,z,density) and post-process it yourself e.g. with matlab.

Felix October 10, 2006 10:49

Re: User defined function for density gradient
When I created a particle fortran routine it was not possible to pass temperature.gradient from cfx-pre to the routine but I got the hint from ANSYS-Support to specify temperature.gradient in the ccl. Now it is working when you ignore the error messages from cfx-pre. Maybe you can specify the density.gradient in the ccl to pass it to your routine? Let us know if this works :)

HeKleR October 10, 2006 21:47

Re: User defined function for density gradient
No need for user fortran.

For compressible flows the solver writes density gradients to the results file.

With some creativity you can recreate "Schlieren" like plots in CFX Post. Start with the inverse logarithmic grayscale colormap. You may need to post process it.

All times are GMT -4. The time now is 16:12.