Thanks Daniel, I will try the latter example. Sergio
Sergio Manzetti [ http://www.fjordforsk.no/logo_hr2.jpg ] [ http://www.fjordforsk.no/ | Fjordforsk AS ] [ http://www.fjordforsk.no/ | ] Midtun 6894 Vangsnes Norge Org.nr. 911 659 654 Tlf: +47 57695621 [ http://www.oekolab.com/ | Økolab ] | [ http://www.nanofact.no/ | Nanofactory ] | [ http://www.aq-lab.no/ | AQ-Lab ] | [ http://www.phap.no/ | FAP ] From: "Daniel Wheeler" <daniel.wheel...@gmail.com> To: "fipy" <fipy@nist.gov> Sent: Tuesday, May 23, 2017 4:03:32 PM Subject: Re: Complex conjugates in FiPY On Tue, May 23, 2017 at 8:05 AM, Sergio Manzetti <sergio.manze...@fjordforsk.no> wrote: > > Dear Daniel. In this example I was trying to find out a solution for the > complex differential equation: > > i dphi/dt + d²phi/dx^2 + |phi^2|phi = 0 > > However, I just learned from the fipy ring that complex conjugates are not > possible to include in Fipy. Right, FiPy knows nothing about complex numbers. > However, if I should calculate the given eqn without the complex conjugate: > > dphi/dt + d²phi/dx^2 + |phi^2|phi = 0 That is a strange equation because it induces counter diffusion, which probably won't solve. I'm not sure whether the source term does something to counter that, but you can try. > which example should I follow in the manuscript? There isn't an example that matches this equation exactly, but try http://www.ctcms.nist.gov/fipy/examples/diffusion/generated/examples.diffusion.mesh1D.html for the TransientTerm and DiffustionTerm and http://www.ctcms.nist.gov/fipy/examples/phase/generated/examples.phase.simple.html for the ImplicitSourceTerm. > I am not sure what the script does, when one sets a phi value before the > given PDE...when I thought that the phi value was found exactly by FipY? Setting the value before solving the PDEs provide the initial value if it's an initial value problem. Even a non-initial value problem needs to be start somewhere for the non-linear numerical iteration. -- Daniel Wheeler _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
_______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]