CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Contour Plot/Report of Volumetric Heating (https://www.cfd-online.com/Forums/fluent/187806-contour-plot-report-volumetric-heating.html)

jbo214 May 15, 2017 15:30

Contour Plot/Report of Volumetric Heating
 
Is there a way to create a contour plot or report of the volumetric heating?

jbo214 May 16, 2017 10:09

There is a macro to access the source term value for each cell, so you can use a UDF to pull that data into a UDM and plot from there.

https://support.ansys.com/portal/sit...extfmt=default

Quote:

You can define a User Defined Memory (UDM) location in your UDF to check the source term in a cell of interest with the following command:

C_UDMI(c,tc,0)=F_VAR(c,tc,THREAD_VAR(tc).fluid.sou rce[i][j]);

The above command will store the source value in the first UDM location (index 0) of the cell.

Use:
- i=2, if the source term refers to the x momentum equation
- i=3, if the source term refers to the y momentum equation
- i=4, if the source term refers to the z momentum equation
- i=5, if the source term refers to the the energy equation

And j is the index of the jth source (you can define several source terms for an equation)

For example:
- j=0 gives the source term number 1 on equation i
- j=1 gives the source term number 2 on equation i

Please note:
- you have to define one User Defined Memory (UDM) location in order to use the snippet above through User Defined -> Memory ...
- you can use the macro to access sources which have been effectively defined in the cell zone of interest. If the source is not existing (i.e. has not been defined), Fluent will stop with a "Segmentation fault" error message


All times are GMT -4. The time now is 18:09.