Have a look here https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v232/en/flu_udf/flu_udf_DPMDEFINE.html%23flu_udf_sec_define_dpm_source and read the example carefully.
Just a note coloured text isn't overly easy to read on here. That or I need to get reading glasses....