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.

Iterative solver for Forchheimer flow

Willem Johannes Dirkx

Please login with a confirmed email address before reporting spam

Dear all,

I am relatively new to COMSOL so please bear with me. I have made a simple axysmmetric model with an inlet on the left hand side and an outlet on the right. The flow between the two has to be resolved with the Forchheimer equation, meaning that the hydraulic conductivity of the porous medium is decided by the flow velocity as such: K = 1/(a+b*q).
Of course hydraulic conductivity is needed to calculate flow velocity so thus a circular variable dependency is born. The formula for hydraulic conductivity I entered in my storage model (my model is time dependent) as 1/(a+b*dl.U), where a and b are empirically established values. Of course the bar where I entered the formula instantly turned yellow.
So under the solver options I added an iterative solver. I hoped that that would get rid of the circular dependency error but it seemingly does not. I have not modified any of the solver values after I added it. What am I doing wrong here, the iterative solver should get me rid of the circularity error right?

3 Replies Last Post 2016年1月27日 GMT-5 07:30
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2016年1月15日 GMT-5 13:15
Hi,

Selecting an iterative solver only defines how you solve the system of linear equations which forms the innermost loop of the Newton method. The choice of direct versus iterative solver should be based on speed vs. memory considerations, numerical conditioning of the matrix etc.

When a problem is nonlinear, the software automatically switches to a nonlinear algorithm (usually a Newton-Raphson method).

A circular dependency error message is something else. A model with a circular dependency is in some way ill formulated. Please see

www.comsol.com/community/forums/general/thread/48995

for a longer discussion on this topic.

Regards,
Henrik
Hi, Selecting an iterative solver only defines how you solve the system of linear equations which forms the innermost loop of the Newton method. The choice of direct versus iterative solver should be based on speed vs. memory considerations, numerical conditioning of the matrix etc. When a problem is nonlinear, the software automatically switches to a nonlinear algorithm (usually a Newton-Raphson method). A circular dependency error message is something else. A model with a circular dependency is in some way ill formulated. Please see http://www.comsol.com/community/forums/general/thread/48995 for a longer discussion on this topic. Regards, Henrik

Willem Johannes Dirkx

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2016年1月26日 GMT-5 09:47
Thank you for the reply Henrik,

Thank you for the explanation of the iterative solver, I have put that back to a direct solver, but that leaves the circular dependency error.

So of the two suggestions offered in the linked thread the first is unfortunately not an option since using the flow velocity to calculate the hydraulic conductivity (to in turn calculate the flow velocity again) is the entire premise of what I intend to do. So I looked at the stress dependent elasticity model and tried to incorporate the weak contribution in the exact same manner to create an intermediate value for dl.u . I switched my model from time dependent to stationary (Even in time dependent it is supposed to trend to a stationary solution anyway, so I can still work with that). Since COMSOL wants an intrinsic permeability (kappa) in in the material properties and my equation solves for hydraulic conductivity I tried to get around this issue by instead of putting what is defined as E0(p) in the example model in my parameters section and used that in turn as the input in my storage model for hydraulic conductivity (I use 'q' by the way and not 'p' because p is already used by pressure). This time however it does not know E0 as an operator when I try to compute. I am suspecting that E0 is some kind of operator in the solid mechanics module that is not present in the darcy module (structural mechanics is a completely unknown field to me). Even if i remove E0 and just leave q there it fails to find q as a variable.

Any suggestions on how to fix this? I feel as if I am very close but just not there yet.
Thank you for the reply Henrik, Thank you for the explanation of the iterative solver, I have put that back to a direct solver, but that leaves the circular dependency error. So of the two suggestions offered in the linked thread the first is unfortunately not an option since using the flow velocity to calculate the hydraulic conductivity (to in turn calculate the flow velocity again) is the entire premise of what I intend to do. So I looked at the stress dependent elasticity model and tried to incorporate the weak contribution in the exact same manner to create an intermediate value for dl.u . I switched my model from time dependent to stationary (Even in time dependent it is supposed to trend to a stationary solution anyway, so I can still work with that). Since COMSOL wants an intrinsic permeability (kappa) in in the material properties and my equation solves for hydraulic conductivity I tried to get around this issue by instead of putting what is defined as E0(p) in the example model in my parameters section and used that in turn as the input in my storage model for hydraulic conductivity (I use 'q' by the way and not 'p' because p is already used by pressure). This time however it does not know E0 as an operator when I try to compute. I am suspecting that E0 is some kind of operator in the solid mechanics module that is not present in the darcy module (structural mechanics is a completely unknown field to me). Even if i remove E0 and just leave q there it fails to find q as a variable. Any suggestions on how to fix this? I feel as if I am very close but just not there yet.

Willem Johannes Dirkx

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2016年1月27日 GMT-5 07:30
Sorry for the double post.

With some rewriting I managed to use an intermediate value for dl.u to calculate intrinsic permeability, to in turn calculate the end result with the help of the linked tutorial. It all works like a charm now. Thank you very much!
Sorry for the double post. With some rewriting I managed to use an intermediate value for dl.u to calculate intrinsic permeability, to in turn calculate the end result with the help of the linked tutorial. It all works like a charm now. Thank you very much!

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.