CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Add a mass source/sink to simpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By palarcon
  • 1 Post By mAlletto

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2019, 07:56
Default Add a mass source/sink to simpleFoam
  #1
Member
 
Pablo Alarcón
Join Date: Mar 2018
Location: Liège
Posts: 59
Rep Power: 8
palarcon is on a distinguished road
Hello everybody

I want to add a mass source/sink term to the simpleFoam solver, but I fear that it will need more modifications than I would expect.
In summary, what I want to code is the following system:

\nabla\cdot U = S
U\cdot \nabla U = - \nabla p + \nabla \cdot \nu(\nabla U + \nabla U^T)


Given the fact that \nabla\cdot U is no longer equal to 0, I assume that in addition to the pressure equation, the stress computation will be also affected, meaning that adding that source term is not as easy as adding a constant to the continuity equation.

My question is, is there any way of adding that source term into simpleFoam, without going into deep modification of additional functions like devDivReff or others?

I was looking and I found that using fvOption could be an option to add a source term without modifying the solver, but it will add a source term to the momentum equation, not to the continuity equation.
Kummi likes this.

Last edited by palarcon; March 14, 2019 at 02:58.
palarcon is offline   Reply With Quote

Old   May 13, 2019, 09:50
Default
  #2
Member
 
Niu
Join Date: Apr 2014
Posts: 55
Rep Power: 12
Z.Q. Niu is on a distinguished road
Hi Pablo,
Have u got it? Thanks!
Z.Q. Niu is offline   Reply With Quote

Old   May 14, 2019, 11:58
Default
  #3
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
in the solver firefoam there is mass source term included. it has to be added in the pressure equation.

you can have a look https://openfoamwiki.net/index.php/FireFoam where the principle is explained a bit.
Kummi likes this.
mAlletto is offline   Reply With Quote

Old   May 15, 2019, 02:31
Default
  #4
Member
 
Pablo Alarcón
Join Date: Mar 2018
Location: Liège
Posts: 59
Rep Power: 8
palarcon is on a distinguished road
Quote:
Originally Posted by Z.Q. Niu View Post
Hi Pablo,
Have u got it? Thanks!
Hi.
Yes, I did, but not in a "simple way" like I was looking for. I developed all the equations by hand starting from the transport equations and then I add the necessary terms to the mass equation and the momentum equation.
After that, I just wrote on the code the resultant equations.
palarcon is offline   Reply With Quote

Old   May 15, 2019, 02:33
Default
  #5
Member
 
Pablo Alarcón
Join Date: Mar 2018
Location: Liège
Posts: 59
Rep Power: 8
palarcon is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
in the solver firefoam there is mass source term included. it has to be added in the pressure equation.

you can have a look https://openfoamwiki.net/index.php/FireFoam where the principle is explained a bit.
Thank you for the tip, I will have a look and compare to what did I do.

Pablo
palarcon is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 01:27
[PyFoam] and paraview eelcovv OpenFOAM Community Contributions 28 May 30, 2016 09:23
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00:00
mass does not conserve in Openfoam conceptone OpenFOAM 5 February 8, 2013 03:35
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32


All times are GMT -4. The time now is 05:08.