I am learning CFD and I have a problem that has density as a function of Temperature and Pressure. To start, I wrote a user defined function (usrMyDensity.c) where density is only a function of temperature (linear equation). I was able to compile the function and call it in my input file, but when i run a simple analysis (internal flow with constant temperature at the walls), i am not able to plot density in FieldView. I'm assuming that i'm not using the correct problem set up.
I know that it is using the complied user function because initially it was giving me an error of negative density, which i fixed with an if statement in my user function.
Any advice will be greatly appreciated.
thank you for your time and patience
Unable to find an attachment - read this blog