View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001036 | OpenFOAM | Bug | public | 2013-10-03 16:52 | 2013-11-05 10:13 |
Reporter | dkxls | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Platform | Linux x86_64 | OS | openSUSE | OS Version | 12.2 |
Summary | 0001036: [InjectionModel]: Reported "mass introduced" is incorrect | ||||
Description | The "mass introduced" printed out to the info file is incorrect. The bug is in the function 'void Foam::InjectionModel<CloudType>::inject(TrackData& td)' where the 'massAdded' is summed up [1]. Here only mass that is introduced as parcel is added to 'massAdded', mass that is added to the continues phase (e.g. evaporated in the 'move' function) will be lost in this summary, which is incorrect. The error can be significant in high temperature fuel sprays! [1] https://github.com/OpenFOAM/OpenFOAM-2.2.x/blob/master/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C#L589 | ||||
Tags | No tags attached. | ||||
|
0001-InjectionModel-Correct-summation-of-injected-mass.patch (1,319 bytes)
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index f49e790..7514de2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -586,8 +586,10 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) pPtr->rho() ); + const scalar mParcel0 = pPtr->nParticle()*pPtr->mass(); if (!pPtr->move(td, dt)) { + massAdded += mParcel0; delete pPtr; } else @@ -595,7 +597,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) if (pPtr->nParticle() >= 1.0) { td.cloud().addParticle(pPtr); - massAdded += pPtr->nParticle()*pPtr->mass(); + massAdded += mParcel0; parcelsAdded++; } else |
|
With the corrections in the provided patch, the reported masses are consistent for my simulation (with one injector), i.e.: 'mass introduced' - 'Current mass in system' = 'Mass transfer phase change' |
|
Thanks for the report - fixed by commit 6ffa11f |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-10-03 16:52 | dkxls | New Issue | |
2013-10-07 11:44 | dkxls | File Added: 0001-InjectionModel-Correct-summation-of-injected-mass.patch | |
2013-10-07 11:44 | dkxls | Note Added: 0002535 | |
2013-11-05 10:13 |
|
Priority | urgent => normal |
2013-11-05 10:13 |
|
Severity | major => minor |
2013-11-05 10:13 |
|
Note Added: 0002605 | |
2013-11-05 10:13 |
|
Status | new => resolved |
2013-11-05 10:13 |
|
Fixed in Version | => 2.2.x |
2013-11-05 10:13 |
|
Resolution | open => fixed |
2013-11-05 10:13 |
|
Assigned To | => user2 |