CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   rhoCentralFoam: two questions (http://www.cfd-online.com/Forums/openfoam/108353-rhocentralfoam-two-questions.html)

praveen October 21, 2012 02:03

rhoCentralFoam: two questions
 
In rhoCentralFoam, there is a line like

https://github.com/OpenFOAM/OpenFOAM...ralFoam.C#L190

Where is this variable used ? It seems like commenting this lines has no effect.

Secondly, here

https://github.com/OpenFOAM/OpenFOAM...ralFoam.C#L196

one sees

fvm:ddt(rho,U) - fvc::ddt(rho,U)

but this equation does not make sense. It seems to me that fvc::ddt(rho,U) is identically zero, as discussed here

http://www.cfd-online.com/Forums/ope...tml#post196210

praveen October 21, 2012 02:55

I think I understand the second question.

Solve density equation: \rho^o \to \rho^n

Solve momentum equation with only inviscid terms; this gives an intermediate estimate of the velocity u^o \to u^*

Update velocity to current time level n by taking account of viscous terms

\textrm{fvm::ddt(rho,u) - fvc::ddt(rho,u)} = \frac{\rho^n u^n - \rho^o u^o}{\Delta t} - \frac{\rho^n u^* - \rho^o u^o}{\Delta t} = \frac{\rho^n u^n - \rho^n u^*}{\Delta t}


All times are GMT -4. The time now is 22:12.