CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Odd initial parcel found (

fabianpk July 27, 2006 08:31

I'm doing a spray simulation,
I'm doing a spray simulation, where I'm going through all the parcels to sum up their properties. Before my forloop I check if the spray is empty by checking value of:


this returns 1 in the first iteration, but it's an odd parcel it has found. It has garbage velocity, diameter, position, and when I check which injector it's been injected from it returns something like 1.19889e+195. If I try using the elmnt().onBoundary() to check if it's outside domain or on boundary, it gives me the value 2. However, if I then add

if (elmnt().onBoundary()<2)

to my code, it's altered to 0, but the parcel is still in the same position. So I'm wondering:

If mySpray.size() returns 1, does that mean I have a parcel or not?

Is there some other value to trust than size() for when I have parcels in my domain?

Is there any other function I can use to check if my parcel really is in the domain? As this would be an alternative way of checking if my parcel is 'real'.


fabianpk July 28, 2006 06:08

Ok sorry for spam, but I reali
Ok sorry for spam, but I realize that my questions have been a bit lacking of info, so I've boiled it down to this.

I'd like to access the spray class, parcels etc, within the turbulence model. What's the best way for doing this?
I tried making a new turbulence class that has the spray in the constructor, but it didn't make a proper reference to the spray.

All times are GMT -4. The time now is 16:23.