We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
General

General

How to check the source term definition with a profile?

    • FAQFAQ
      Participant

      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 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