Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
How to create a conditional in a definition?
Posted 14 févr. 2018, 18:05 UTC−5 Computational Fluid Dynamics (CFD), Porous Media Flow, Parameters, Variables, & Functions Version 5.3 0 Replies
Please login with a confirmed email address before reporting spam
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.
Hello Sebastian Sepulveda Cano
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.