CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Density as a function of height. (https://www.cfd-online.com/Forums/fluent/27912-density-function-height.html)

Børge Kvingedal September 26, 2000 05:01

Density as a function of height.
 
Hello, I want to define a density profile as a function of height only. I do not want to use temperature in my simulation. Is this possible. I am planning to simulate waves over a mountain in a stratified ocean. Is is possible to define a profile in the materials panel?? Thanks for any help....

Regards Børge

Phil September 26, 2000 06:35

Re: Density as a function of height.
 
I think you have to write a user defined function in c++. Than you have to compile it in Fluent!Some examples are given in the fluent manual. I don't think that this is possible to define in the materials panel. Only the temperature dependence can be defined in the material panel.

Regards Philipp

Børge Kvingedal September 26, 2000 07:39

Re: Density as a function of height.
 
I have tried to write a UDF with the density varying whith height but I can not get it right. I have defined the velocity as a function of height, using UDF and that works well. I have now also defined the temperature at the inlet as function of height, but it does not work for density. Maybe I just have to use the temperature profile as a reference for the density although this is not what I wanted to do. This leads to unwanted convections....


All times are GMT -4. The time now is 20:16.