CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Total Volume of a phase interFoam (https://www.cfd-online.com/Forums/openfoam-solving/253869-total-volume-phase-interfoam.html)

Volkanatar January 6, 2024 09:40

Total Volume of a phase interFoam
 
Hello Foamers,

i wanted to ask. How can i write into a file of the total volume of a phase (lets say water) for the specific time steps in the whole domain. Should i use functions in controlDict?

I did something like that but how should i modify it?

functions
{
waterVolume
{
type volFieldValue;
libs (fieldFunctionObjects);

writeControl timeStep;
writeInterval 1;
writeFields false;
writeToFile true;
log true;
regionType all;

operation sum;

fields
(
V()*alpha.water
);
}
};

Thanks in advance:)


All times are GMT -4. The time now is 10:29.