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.

Initial parameter selection

Please login with a confirmed email address before reporting spam

I'm running a coupled flow and transport model (transport is stationary) and wish to solve both equations simultaneously. From scratch, I receive a bunch of NaN's on the first iteration of the solver because the velocity, 'u', is set to u_esdl (linked to the velocity from Darcy's law), which is initially zero on the first iteration.

I've seen two workarounds:

1. Solve the flow problem first and then solve the transport problem. I can't stand this solution because it is a waste of time for a simple issue.

2. Set 'u' to 'u_esdl+eps' so that the velocity is initially a small number. This gets the solver rolling but affects my solution in the 0.001 spot.

Any better ideas at specifying an initial value for the 'u' parameter in the transport solver? The documentation is clear about initializing the dependent variable but I can't seem to find where just any parameter can receive an initial value.

Thanks,
Kevin

4 Replies Last Post Mar 5, 2010, 9:32 a.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 4, 2010, 2:58 p.m. EST
Hi

I believe you have the segregated solver too that should allow you to separate somewhat the solving processwhile keeping them linked, no ?

and further I do not really understand why you cannot set a non zero initial condition for "u" ("u" being the generic name for "u_esld" in that application mode).

Bit I'm not sure I understood everything from your comments (as I do no have the Earth Science) I have tried to reproduce the effect by similarity but I'm not sure I have managed

Good luck
Ivar
Hi I believe you have the segregated solver too that should allow you to separate somewhat the solving processwhile keeping them linked, no ? and further I do not really understand why you cannot set a non zero initial condition for "u" ("u" being the generic name for "u_esld" in that application mode). Bit I'm not sure I understood everything from your comments (as I do no have the Earth Science) I have tried to reproduce the effect by similarity but I'm not sure I have managed Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 4, 2010, 3:11 p.m. EST
Ivar,

Correct, the segregated solver will keep them linked but should not be necessary (I believe) for this staionary problem.

Essentially, I have two stationary PDEs, connected by the velocity (the resulting dependent variable from the Darcy's Law setup). The transport advection dispersion equation uses this variable (u_esdl). Solving separately, using the segregated solver or by hand, should not be necessary since, I believe, Comsol should be able to find u_esdl while solving for c_esst. And, this is true since it works when I add the epsilon to by velocity, 'u_esdl+esp', in my transport module.

>>and further I do not really understand why you cannot set a non zero initial condition for "u" ("u" being the generic name for "u_esld" in that application mode).

Exactly. How do I explicitly set an initial condition for u_esdl?

Kevin
Ivar, Correct, the segregated solver will keep them linked but should not be necessary (I believe) for this staionary problem. Essentially, I have two stationary PDEs, connected by the velocity (the resulting dependent variable from the Darcy's Law setup). The transport advection dispersion equation uses this variable (u_esdl). Solving separately, using the segregated solver or by hand, should not be necessary since, I believe, Comsol should be able to find u_esdl while solving for c_esst. And, this is true since it works when I add the epsilon to by velocity, 'u_esdl+esp', in my transport module. >>and further I do not really understand why you cannot set a non zero initial condition for "u" ("u" being the generic name for "u_esld" in that application mode). Exactly. How do I explicitly set an initial condition for u_esdl? Kevin

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 5, 2010, 8:48 a.m. EST
Hi

For me he segregated solver eases (and shortenes) the solving in many cases, that is why I like to use it, it also forces me to think which part of the system isthe most stable and should be treated first.

They way I understand is that when you define the "init" and derivatives "dinit" of "u" they are later copied into the application specific name "u_whatever" during the solving preparation. One way to check is to do first a "Solve - Get initial value" and check by postprocessing that these are coherent.

Good luck
Ivar
Hi For me he segregated solver eases (and shortenes) the solving in many cases, that is why I like to use it, it also forces me to think which part of the system isthe most stable and should be treated first. They way I understand is that when you define the "init" and derivatives "dinit" of "u" they are later copied into the application specific name "u_whatever" during the solving preparation. One way to check is to do first a "Solve - Get initial value" and check by postprocessing that these are coherent. Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 5, 2010, 9:32 a.m. EST
Hi,

The segregated solver doesn't increase solver efficiency in this case. However, I can understand how there would be many cases where it makes more sense to do this.

Again, my question is how do I set 'init' for 'u'? 'u' is just a parameter and I haven't been able to find where I can set the initial value for a parameter. There are many examples of setting the initial value for dependent variables (in this case 'p' and 'c' are the dependent variables, respectively, for the Darcy and transport modules).

Thanks,
Kevin
Hi, The segregated solver doesn't increase solver efficiency in this case. However, I can understand how there would be many cases where it makes more sense to do this. Again, my question is how do I set 'init' for 'u'? 'u' is just a parameter and I haven't been able to find where I can set the initial value for a parameter. There are many examples of setting the initial value for dependent variables (in this case 'p' and 'c' are the dependent variables, respectively, for the Darcy and transport modules). Thanks, Kevin

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.