Now the mathematical model has to take into account all these effects. So we need the mass balance equation where we take into account all the phase changes.
In particular we have the solid matrix, where the chemically bound water is taken as a source, then we have the liquid phases, then we have free water and physically absorbed water.
Finally we need a mass balance equation for the gas phases which is water vapour and dry air.