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.

Complex_number_encountered

Please login with a confirmed email address before reporting spam

Hi,

I have the following subdomain condition for the emqvw application mode (Electric Currents). I am dynamically setting the conductivity as a function of the concentration according to the Debye-Huckel equation.

I initially solve for the stokes flow and convection and diffusion, then followed by electric currents using the current solution.

The sequence of global equations start with the a point evaluation to find the concentration [mol/m^3]:


AveConc = (ConcO/1000)
conductivity = (AveConc*Inf_dilution*activity_coeff)
conductivity1 = 5.56e-3+(conductivity3*flc1hs(t-1,10))


I investigate the conductivity1 plot using the global variable evaluation, and I get an expected response.

But the solver (SPOOLES) fails and gives me:


Error:
Failed to find consistent initial values.
Complex_number_encountered
Last time step is not converged.


My thoughts are is there anyway to check the units associated with the global variables. I have made an attempt at validating the SI base units by hand and using the automatic mechanism in the constants window.

Clearly from the plot (attached) there are no silly initial conditions? So my only thought is have I got some strange units (and does this matter?), or is there something else?

Regards,
Tom





3 Replies Last Post 4 nov 2009, 07:57 CET
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 3 nov 2009, 09:08 CET
Hi

From my experience there are many situations when "real" problems end up with complex solutions, particularly with electro magnetics.

Have you tried to allow complex values in the advaned tab of the Solver settings ?

On the other side, it could be something else, but that's where I would start, then solve step by step, separating physics by hand in the solver manager if you have several physis (application modes) running.

Good luck
and Pls keep us informed, always good to know what happened
Ivar
Hi From my experience there are many situations when "real" problems end up with complex solutions, particularly with electro magnetics. Have you tried to allow complex values in the advaned tab of the Solver settings ? On the other side, it could be something else, but that's where I would start, then solve step by step, separating physics by hand in the solver manager if you have several physis (application modes) running. Good luck and Pls keep us informed, always good to know what happened Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 3 nov 2009, 10:04 CET
Hi Ivar,

Thank you for your suggestion! I was reading this as you must have been replying:


For time-dependent problems, the time-stepping algorithm must know if a problem is complex valued. If your model uses a complex-valued initial solution, COMSOL Multiphysics detects this and classifies the problem accordingly. If the problem is complex-valued because of a complex-valued PDE coefficient or other material property, go to the Solver Parameters dialog box, find the General page, and select the Allow complex numbers check box.


This solution works perfectly - I wish I had read this yesterday lunch time ;-)

Regards,
Tom
Hi Ivar, Thank you for your suggestion! I was reading this as you must have been replying: [quote] For time-dependent problems, the time-stepping algorithm must know if a problem is complex valued. If your model uses a complex-valued initial solution, COMSOL Multiphysics detects this and classifies the problem accordingly. If the problem is complex-valued because of a complex-valued PDE coefficient or other material property, go to the Solver Parameters dialog box, find the General page, and select the Allow complex numbers check box. [/quote] This solution works perfectly - I wish I had read this yesterday lunch time ;-) Regards, Tom

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 4 nov 2009, 07:57 CET
Hi

Yes one on the subtilities with COMSOL is that you have to THINK a bit more than with other "out-of the box" programmes ;)
Mainly because you are solving so many different cases that you must really think over exactly what you are doing or asking COMSOL to do for you, there are seveal of these "trappes" with multiphysics simulations.

It's hard work, but much more fun !
Good luck
Ivar
Hi Yes one on the subtilities with COMSOL is that you have to THINK a bit more than with other "out-of the box" programmes ;) Mainly because you are solving so many different cases that you must really think over exactly what you are doing or asking COMSOL to do for you, there are seveal of these "trappes" with multiphysics simulations. It's hard work, but much more fun ! Good luck Ivar

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.