I am doing a two-phase flow analysis in Comsol, based on the model found in the Comsol application gallery called "two-phase flow in column". I have some problems because when I do the analysis I get the following error "Attempt to evaluate the power of zero". According to this i think that the error is due to one of the definitions that is used to calculate the effective saturation degree of the liquid phase.
The definitions that I have in the retention model are:
p_c p_nw-p_w Capillary pressure
Hc p_c / (rho_w * g_const) Capillary pressure head
Se_w (1+ (alpha * rm1 (Hc [1 / m]) [m]) ^ N) ^ (- M) Effective saturation, wetting phase
Se_nw 1-Se_w Effective saturation, non-wetting phase
theta_w theta_r+Se_w*(theta_s-theta_r) Volume fraction, wetting phase
theta_nw theta_s-theta_w Volume fraction, non-wetting phase
kr_w (Se_w^L*(1-(1-Se_w^(1/M))^M)^2)+eps Relative permeability, wetting phase
kr_nw ((1-Se_w)^L(1-Se_w^(1/M))^(2M))+eps Relative permeability, non-wetting phase
Cp ((alphaM/(1-M)(theta_s-theta_r)Se_w^(1/M)(1-Se_w^(1/M))^M))/(rho_w*g_const) Specific capacity
i think that the problem is in the third definition. The question is that there is the possibility of applying a conditional to the definitions in comsol to restrict the analysis to that if Hc <= 0 then Se_w = 1.
Thank you for your attention.