CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   mass source term in buoyantSimpleFoam (

OMN September 29, 2010 08:22

mass source term in buoyantSimpleFoam

I would like to add a mass source term in buoyantSimpleFoam. I define msource in a dictionary.
The continuity equation looks like this in that case:

div(rho*U) = msource

And I have added source terms in
1) the momentum equation: + fvm::Sp(msource, U) on the RHS
2) the energy equation: +fvm::Sp(msource, h) on the RHS

Is it enough to modify the definition of p_rghEqn() in the pEqn.H file by adding the term -msource on the RHS?

Any help would be greatly appreciated.



Bahram April 30, 2014 06:49

Hello Olivier

I have the same question, did you found the answer to your question?



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