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/)
-   -   position of body force on the momentum equation (https://www.cfd-online.com/Forums/openfoam-programming-development/142089-position-body-force-momentum-equation.html)

lin September 23, 2014 04:48

position of body force on the momentum equation
 
Hi, I have a question on the position of the body force on the momentum equation. I have search the forum and find two different strategy:

1. It should be included in the Ueqn:

fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) == F );

2: It should be included in the predictor step:

solve(UEqn ==F -fvc::grad(p));

Can any expert explain to me which one is correct?

Cyp September 26, 2014 14:00

You can do whatever you want as far as the PISO loop is consistent.

I mean, with the first option, you don't have to change anything in the algorithm (F is part of H).

For the second option, you have to modify the recontruction of the velocity from the pressure gradient to include F.

Both options leads to the same results.

Best,
Cyp

lin September 26, 2014 21:31

Thanks Cyp for your help.


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