CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   coding (https://www.cfd-online.com/Forums/main/65998-coding.html)

Moradi July 2, 2009 14:58

coding
 
Hi,
Do somebody know about coding in collocated grid?
I wan't to know which option is more proper:
1) storing the variable density and viscosity, when they vary.
2) calculating them when they are required.

there is a material in the fluid that changes fluid's density and viscosity. this change is due to the concentration of this material.
thanks.

hadian July 4, 2009 01:13

it depends on your code. how many times do you need these variables.
in my code the eddy viscosity was needed in different parts and i stored them. if you need the variables only one time, maybe it is better not to store them. if you need them in different part (mometum equations, pressure equation and subroutine for printing output) you should store them.

Moradi July 6, 2009 09:53

thanks for your answer
 
Dear Hadian,

Yes, I think you are right.
I have already stored them.
I need the density and viscosity many times.

Thanks again,
Mohammad.


All times are GMT -4. The time now is 09:21.