{"id":161660,"date":"2023-01-25T07:16:37","date_gmt":"2023-01-25T07:16:37","guid":{"rendered":"\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/"},"modified":"2023-07-31T12:36:43","modified_gmt":"2023-07-31T12:36:43","slug":"how-to-check-the-source-term-definition-with-a-profile","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/","title":{"rendered":"How to check the source term definition with a profile?"},"content":{"rendered":"<p>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.source[i][j]);  The above command will store the source value in the first UDM location (index 0) of the cell.  Use:  &#8211; i=2, if the source term refers to the x momentum equation &#8211; i=3, if the source term refers to the y momentum equation &#8211; i=4, if the source term refers to the z momentum equation &#8211; 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:  &#8211; j=0 gives the source term number 1 on equation i &#8211; j=1 gives the source term number 2 on equation i  Please note: &#8211; you have to define one User Defined Memory (UDM) location in order to use the snippet above through User Defined -> Memory &#8230; &#8211; 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 &#8220;Segmentation fault&#8221; error message<\/p>\n","protected":false},"template":"","class_list":["post-161660","topic","type-topic","status-publish","hentry","topic-tag-fluent","topic-tag-fluid-dynamics","topic-tag-general-fluent","topic-tag-udm"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"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.source[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\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Knowledge | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to check the source term definition with a profile? | Ansys Knowledge\" \/>\n\t\t<meta property=\"og:description\" content=\"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.source[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\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-01-25T07:16:37+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-07-31T12:36:43+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to check the source term definition with a profile? | Ansys Knowledge\" \/>\n\t\t<meta name=\"twitter:description\" content=\"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.source[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\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/how-to-check-the-source-term-definition-with-a-profile\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/fluent\\\/#listItem\",\"name\":\"fluent\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/fluent\\\/#listItem\",\"position\":3,\"name\":\"fluent\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/fluent\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/how-to-check-the-source-term-definition-with-a-profile\\\/#listItem\",\"name\":\"How to check the source term definition with a profile?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/how-to-check-the-source-term-definition-with-a-profile\\\/#listItem\",\"position\":4,\"name\":\"How to check the source term definition with a profile?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic-tag\\\/fluent\\\/#listItem\",\"name\":\"fluent\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/how-to-check-the-source-term-definition-with-a-profile\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/how-to-check-the-source-term-definition-with-a-profile\\\/\",\"name\":\"How to check the source term definition with a profile? | Ansys Knowledge\",\"description\":\"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.source[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\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/forums\\\/topic\\\/how-to-check-the-source-term-definition-with-a-profile\\\/#breadcrumblist\"},\"datePublished\":\"2023-01-25T07:16:37+00:00\",\"dateModified\":\"2023-07-31T12:36:43+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/\",\"name\":\"Ansys Knowledge\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/knowledge\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to check the source term definition with a profile? | Ansys Knowledge","description":"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.source[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","canonical_url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/knowledge","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluent\/#listItem","name":"fluent"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluent\/#listItem","position":3,"name":"fluent","item":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluent\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/#listItem","name":"How to check the source term definition with a profile?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/#listItem","position":4,"name":"How to check the source term definition with a profile?","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluent\/#listItem","name":"fluent"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization","name":"Ansys Knowledge","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/knowledge\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/#webpage","url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/","name":"How to check the source term definition with a profile? | Ansys Knowledge","description":"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.source[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","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/#breadcrumblist"},"datePublished":"2023-01-25T07:16:37+00:00","dateModified":"2023-07-31T12:36:43+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#website","url":"https:\/\/innovationspace.ansys.com\/knowledge\/","name":"Ansys Knowledge","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/knowledge\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Knowledge | Ansys Innovation Space","og:type":"article","og:title":"How to check the source term definition with a profile? | Ansys Knowledge","og:description":"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.source[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","og:url":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/","article:published_time":"2023-01-25T07:16:37+00:00","article:modified_time":"2023-07-31T12:36:43+00:00","twitter:card":"summary_large_image","twitter:title":"How to check the source term definition with a profile? | Ansys Knowledge","twitter:description":"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.source[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"},"aioseo_meta_data":{"post_id":"161660","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2025-10-17 19:17:22","updated":"2026-07-29 05:46:33","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluent\/\" title=\"fluent\">fluent<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to check the source term definition with a profile?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/knowledge"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/knowledge\/topics\/"},{"label":"fluent","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic-tag\/fluent\/"},{"label":"How to check the source term definition with a profile?","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-check-the-source-term-definition-with-a-profile\/"}],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_forum_id":["27796"],"_bbp_author_ip":["23.56.168.180"],"_bbp_last_active_time":["1-24-2023  20:20:14"],"_btv_view_count":["3135"],"siebel_km_number":["2043026"],"product_version":["0"],"km_published_date":["2016-08-29T14:34:58.000Z"],"family":["Fluid Dynamics"],"application_name":["FLUENT"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/161660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/161660\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=161660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}