ORourkeCollisionModel.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "error.H"
00028
00029 #include "ORourkeCollisionModel.H"
00030 #include "addToRunTimeSelectionTable.H"
00031
00032
00033
00034 namespace Foam
00035 {
00036
00037
00038
00039 defineTypeNameAndDebug(ORourkeCollisionModel, 0);
00040
00041 addToRunTimeSelectionTable
00042 (
00043 collisionModel,
00044 ORourkeCollisionModel,
00045 dictionary
00046 );
00047
00048
00049
00050
00051
00052 ORourkeCollisionModel::ORourkeCollisionModel
00053 (
00054 const dictionary& dict,
00055 spray& sm,
00056 Random& rndGen
00057 )
00058 :
00059 collisionModel(dict, sm, rndGen),
00060 vols_(sm.mesh().V()),
00061 coeffsDict_(dict.subDict(typeName + "Coeffs")),
00062 coalescence_(coeffsDict_.lookup("coalescence"))
00063 {}
00064
00065
00066
00067
00068 ORourkeCollisionModel::~ORourkeCollisionModel()
00069 {}
00070
00071
00072
00073
00074 void ORourkeCollisionModel::collideParcels(const scalar dt) const
00075 {
00076
00077 if (spray_.size() < 2)
00078 {
00079 return;
00080 }
00081
00082 spray::iterator secondParcel = spray_.begin();
00083 ++secondParcel;
00084 spray::iterator p1 = secondParcel;
00085
00086 while (p1 != spray_.end())
00087 {
00088 label cell1 = p1().cell();
00089
00090 spray::iterator p2 = spray_.begin();
00091
00092 while (p2 != p1)
00093 {
00094 label cell2 = p2().cell();
00095
00096
00097 if (cell1 == cell2)
00098 {
00099 # include "sameCell.H"
00100 }
00101
00102
00103 if (p2().m() < VSMALL)
00104 {
00105 spray::iterator tmpElmnt = p2;
00106 ++tmpElmnt;
00107 spray_.deleteParticle(p2());
00108 p2 = tmpElmnt;
00109 }
00110 else
00111 {
00112 ++p2;
00113 }
00114
00115 }
00116
00117
00118 if (p1().m() < VSMALL)
00119 {
00120 spray::iterator tmpElmnt = p1;
00121 ++tmpElmnt;
00122 spray_.deleteParticle(p1());
00123 p1 = tmpElmnt;
00124 }
00125 else
00126 {
00127 ++p1;
00128 }
00129 }
00130
00131 }
00132
00133
00134
00135
00136 }
00137
00138
Copyright © 2000-2009 OpenCFD Ltd