The porosity of the preform is the total volume of the preform minus the fiber volume. The fiber volume is the weight of the preform divided by the fiber density.
The total volume of the preform will depend on how you process it. It will change with compaction pressure. Normally, a mold is used to shape the part, in which case, the mold volume is the total volume. If you are wicking the aluminum then get the preform volume by measuring the dimensions of the preform or envelope bag the preform and measure water displacement.