Hi Guys,<br>I want to compute the enclosed mass for a given radius to make use of it for computing other quantities. I would like  to define a new field like EnclosedMass. How can i use accumulation flag in combination with new defined field to compute the enclosed mass(like in prof.add_fields case). Unfortunately, add_field does not accept it. May be there be there is another way to do this.  Any help in this regard will appreciated.<br>
<br>prof.add_fields("CellMass",weight=None,accumulation=True)<br><br>def EnclosedMass(field,data):<br>    return data["Density"]*data["CellVolume"]<br><br>add_field("EnclosedMass", function=EnclosedMass,weight=None,accumulation=True)<br>
<br>Thanks in advance!<br>Cheers<br>Latif<br>