|
[Sponsors] |
September 23, 2012, 20:40 |
mass does not conserve in Openfoam
|
#1 |
Member
Join Date: Jun 2012
Posts: 65
Rep Power: 14 |
Hi guys, right now I am running SprayFoam using C12H26. And I found the mass does not conserve(figure 1). So the liq+gas mass != injected mass. The input is mass flow rate data from Engine Combustion Network Website and the injected mass should be calculated by the data. However, actually the mass conserves, I mean I calculated the injected mass by using the mass flow rate data to integrate with time numerically by Matlab and found the two lines meet together!(figure 2) So actually the calculation for liq+gas mass is correct. I guess this should be caused by some coding bug problem, which is not correct for the injected mass calculation(the "Total mass injected" term in output file). Since I am not familiar with C++, I need this help for correcting the bug. Thanks!
|
|
September 24, 2012, 16:03 |
|
#2 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
are you injecting into a closed volume?
what is the convergence criteria for the pressure solver? |
|
September 24, 2012, 21:05 |
|
#3 |
Member
Join Date: Jun 2012
Posts: 65
Rep Power: 14 |
Hi, right, I am injecting into a closed volume, which is a cuboid. I don't know what is the convergence criteria for pressure solver, where can I check this?
Today I plus some debug codes in openfoam's code, specifically in InjectionModel.C: (first plus in line 479): // Pad injection time if injection starts during this timestep const scalar padTime = max(0.0, SOI_ - time0_); //for Debug Info<<"unsteady condition-newParcels:"<<newParcels<<endl; // Introduce new parcels linearly across carrier phase timestep for (label parcelI = 0; parcelI < newParcels; parcelI++) (second plus in line 561) if (pPtr->move(td, dt)) { td.cloud().addParticle(pPtr); massAdded += pPtr->nParticle()*pPtr->mass(); Info<<"unsteady condition-massAdded:"<<massAdded<<endl; parcelsAdded++; } (third plus in line 572): } Info<<"unsteady condition-Total massAdded:"<<massAdded<<endl<<endl; postInjectCheck(parcelsAdded, massAdded); } And after I run the case again, the output file outputs: unsteady condition-newParcels:96 (the number is varying,should be all right) unsteady condition-Total massAdded:0 (the number is always 0, unusual!) since massInjected += returnReduce (massAdded)=massAdded, and the output injected mass is massInjected term, there should be some fatal problem here. |
|
January 10, 2013, 02:18 |
|
#4 |
New Member
pushkaraj
Join Date: Nov 2012
Posts: 8
Rep Power: 14 |
hi conceptone
i am also trying to use sprayfoam for the spray A data given on ECN network... I f you have solved the issue can you share me your files regarding dodecane specially spraycloud properties?? i am unable to determine the mass flow rate profile data.... how did u determine that? regards, Pushkaraj |
|
February 3, 2013, 17:14 |
|
#5 |
Member
Join Date: Jun 2012
Posts: 65
Rep Power: 14 |
hi, sorry for the delay
you can tell me your email address, I will send you the file |
|
February 8, 2013, 04:35 |
hi
|
#6 |
New Member
pushkaraj
Join Date: Nov 2012
Posts: 8
Rep Power: 14 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
calculate mass flow rate on face OpenFoam | ronaldo | OpenFOAM | 7 | November 8, 2019 01:10 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 07:25 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |
Mass flux and mass flow rate | us | Phoenics | 10 | March 31, 2006 03:06 |