CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   How to define a rather complex custom field (https://www.cfd-online.com/Forums/fluent/237991-how-define-rather-complex-custom-field.html)

ata313ata August 17, 2021 07:55

How to define a rather complex custom field
 
Hi everybody,

How can I Define a new custom field such as, "grad(rho).grad(p)" in Ansys Fluent (the "." in the formula reads dot product)?
Is it possible without creating a UDF or I need to define one? If so, how?

Thanks very much in advance.

LoGaL August 17, 2021 15:31

In cfx-post it should be easy

LuckyTran August 17, 2021 19:57

Maybe... Some issues that arise are that gradients need discretization and you have to be clear whether you want the raw gradients or the ones with flux limiters (the reconstruction gradients).

First you need to keep temporary memory from being freed. Type into the TUI

solve/set/expert
and find the prompt to keep temporary solver memory from being freed and answer yes.

Then run an iteration so that the solver fills up the memory. If you can find all the field variables needed for your formula and you know how to write it out the long way, then you're set. Otherwise, it does now allow you to access gradient macros for the UDF.


All times are GMT -4. The time now is 10:50.