Ansys: Difference between revisions

Jump to navigation Jump to search
75 bytes removed ,  30 days ago
m
no edit summary
mNo edit summary
mNo edit summary
Line 944: Line 944:
==== Interpreted UDF==== <!--T:521-->
==== Interpreted UDF==== <!--T:521-->


To tell fluent to interpret your UDF at runtime add the following command line into your journal file before the cas/dat files are read or initialized. The filename sampleudf.c should be replaced with the name of your source file.  The command remains the same regardless if the simulation is being run in serial or parallel.  To ensure the UDF can be found in the same directory as the journal file remove any managed definitions from the cas file by opening it in the gui and resaving either before uploading to the Alliance or opening it in the gui on a compute node or gra-vdi then resaving it.  Doing this will ensure only the following command/method will be in control when fluent runs.  To use a interpreted UDF with parallel jobs it will need to be parallelized as described in the section below otherwise it will likely only work when submitted as a serial (1 core) job.
To tell fluent to interpret your UDF at runtime add the following command line into your journal file before the cas/dat files are read or initialized. The filename sampleudf.c should be replaced with the name of your source file.  The command remains the same regardless if the simulation is being run in serial or parallel.  To ensure the UDF can be found in the same directory as the journal file remove any managed definitions from the cas file by opening it in the gui and resaving either before uploading to the Alliance or opening it in the gui on a compute node or gra-vdi then resaving it.  Doing this will ensure only the following command/method will be in control when fluent runs.  To use a interpreted UDF with parallel jobs it will need to be parallelized as described in the section below.


  define/user-defined/interpreted-functions "sampleudf.c" "cpp" 10000 no
  define/user-defined/interpreted-functions "sampleudf.c" "cpp" 10000 no
cc_staff
1,857

edits

Navigation menu