mass does not conserve in Openfoam
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!
are you injecting into a closed volume?
what is the convergence criteria for the pressure solver?
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_);
// 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))
massAdded += pPtr->nParticle()*pPtr->mass();
(third plus in line 572):
Info<<"unsteady condition-Total massAdded:"<<massAdded<<endl<<endl;
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.
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?
hi, sorry for the delay
you can tell me your email address, I will send you the file
my email id:
thanks in advance
|All times are GMT -4. The time now is 05:39.|