piccinini |
March 6, 2012 18:46 |
Writing particle properties to the grid cells they are in
Hello,
I've used the code bellow in dieselFoam.C of dieselFoam 1.7.1 to write some particle properties to the grid cells particles are in. The code compiles and runs in serial, but hangs when running in parallel mode. Anybody could help me?
Quote:
if (runTime.write())
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Output parcel properties to grid cells
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
drop_m= 0.0*drop_m;
drop_T= 0.0*drop_T;
drop_smd= 0.0*drop_smd;
drop_U= 0.0*drop_U;
spray::iterator mol(dieselSpray.begin());
for (mol = dieselSpray.begin(); mol != dieselSpray.end(); ++mol)
{
label cellI=mol().cell();
drop_m[cellI]+=mol().m();
}
for (mol = dieselSpray.begin(); mol != dieselSpray.end(); ++mol)
{
label cellI=mol().cell();
drop_T[cellI]+=mol().m()*mol().T()/drop_m[cellI];
drop_U[cellI]+=mol().m()*mol().U()/drop_m[cellI];
drop_smd[cellI]=dieselSpray.smdcell(cellI);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
drop_m.write();
drop_U.write();
drop_T.write();
drop_smd.write();
}
|
thanks
|