CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   COMSOL (https://www.cfd-online.com/Forums/comsol/)
-   -   Mass conservation in COMSOL (https://www.cfd-online.com/Forums/comsol/82434-mass-conservation-comsol.html)

Diego November 26, 2010 03:26

Mass conservation in COMSOL
 
Hello,

I am a user of COMSOL 3.5 and have realized something a little bit strange with mass conservation during my simulations. Therefore, I decided to build the easiest model I could in order to study this issue. I created a hexahedral pipe through which oxygen and water (gas phase) circulate. Navier-Stokes and Maxwell-Stefan equations are used to describe momentum and mass transport. The lower boundary is supposed to be a reactive surface and therefore an oxygen flux is set as boundary condition. If I calculate the oxygen mass flow (kg/s) that is going into the system (using the boundary integration tool, integrating the flux) and subtract the oxygen mass flow that is going out, I approximately obtain the same amount of oxygen that is disappearing through the reactive boundary, which means that mass balance for oxygen meets satisfactorily. However, if I do the same to check the water mass balance, the result is really not good. Calculating the difference between the water mass flux at the inlet and at the outlet, I obtain a noticeably different amount than the water that is being generated on the reactive boundary, which is the same (in mass terms) as the oxygen that is being consumed. The minimum mesh element quality is 1.000, so I guess that I cannot blame this on truncation errors or similar.
Can you give me an explanation for this?


Thank you very much for your help.

niklas.rom December 27, 2010 05:14

Hi, I suspect that you need to compensate the total mass balance for the reacting species. It is all described here:

http://www.comsol.com/support/knowledgebase/1100/

Niklas Rom, COMSOL

Quote:

Originally Posted by Diego (Post 284862)
Hello,

I am a user of COMSOL 3.5 and have realized something a little bit strange with mass conservation during my simulations. Therefore, I decided to build the easiest model I could in order to study this issue. I created a hexahedral pipe through which oxygen and water (gas phase) circulate. Navier-Stokes and Maxwell-Stefan equations are used to describe momentum and mass transport. The lower boundary is supposed to be a reactive surface and therefore an oxygen flux is set as boundary condition. If I calculate the oxygen mass flow (kg/s) that is going into the system (using the boundary integration tool, integrating the flux) and subtract the oxygen mass flow that is going out, I approximately obtain the same amount of oxygen that is disappearing through the reactive boundary, which means that mass balance for oxygen meets satisfactorily. However, if I do the same to check the water mass balance, the result is really not good. Calculating the difference between the water mass flux at the inlet and at the outlet, I obtain a noticeably different amount than the water that is being generated on the reactive boundary, which is the same (in mass terms) as the oxygen that is being consumed. The minimum mesh element quality is 1.000, so I guess that I cannot blame this on truncation errors or similar.
Can you give me an explanation for this?


Thank you very much for your help.



All times are GMT -4. The time now is 10:00.