CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Line term in the Navier - Stokes equation. (https://www.cfd-online.com/Forums/openfoam-programming-development/239126-line-term-navier-stokes-equation.html)

vgoy October 21, 2021 12:33

Line term in the Navier - Stokes equation.
 
Hi!

I am new in fluid dynamics. In my scientific study required to introduce a linear term to the Navier Stokes equation. It means that on the right-hand side I have -\nabla p-\frac{1}{\tau} U, where \tau is constant. I found that OpenFOAM can solve this type of equation. I chose icoFoam solver for it and added line term in the next way:
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
+ fvm::Sp(tauI, U)
);

Then I did some calculations, it seems to work. The only question left is, did I add the linear term correctly? Can I add it in another way to speed up the calculation? I have been looking for answers to my questions in the Internet for a long time, but for this I need to immerse myself in fluid dynamics with the right textbooks. Can you please tell me if I am on the right path? or a simple mistake?

Many thank for the help!

David* October 26, 2021 08:58

The use of fvm::Sp seems correct to me, also the positive sign. But are you really sure that tauI is correct and not 1/tauI?


Regards,
David


Sources:
https://openfoamwiki.net/index.php/H...sport_equation
https://openfoamwiki.net/index.php/IcoFoam

vgoy October 26, 2021 09:07

Dear David,

thank you for your answer, this is important to me. Whenever you see an easy solution to your problem, it seems that there is a catch somewhere. For me, tauI is inverse tau, namely tauI=1/tau.

Best regards,
Vova.


All times are GMT -4. The time now is 14:46.