Mathematica Asked on July 2, 2021
I am relatively new to Mathematica, but I know that it is a powerful tool. I am looking to solve a nonlinear equation that could be seen in nonlinear optics. I have tried in MATLAB, but was struggling with numerical methods and convergence issues. Really, this is a PDE, but I believe it can be approximated as a ODE.The equation is:
$frac{partial^2 E(z)}{partial z^2}+frac{omega^2}{c^2}epsilon(z)E(z)=0$
Where ϵ(z)=ϵ[1+iγ|E(z)|^2]. This is the "nonlinear" part where the imaginary part of the permittivity (ϵ) is dependent on the intensity of the field ( |E(z)|^2). The coefficient γ can be considered the Loss Coefficient. With low γ the intensity dependent term is negligible and the solution is that of a linear wave equation (exponential), but with high intensities or higher γ then it becomes lossy/dampened. I am using the numerical outputs from another simulation to give the field (E(0)) and the value of it’s derivative (E'(0)) for initial conditions. The equation can then be re-written as:
$frac{partial^2 E(z)}{partial z^2}=-k^2E(z)-igamma k^2E(z)|E(z)|^2$
In Mathimatica, I have tried:
Where y=E and x=z. I am assuming K(1),K(2),c1,and c2 are constants, but I am also looking for clarification here. So with this, I tried to use initial conditions by setting y(0)=1 and y'(0)=1 and got the error: Supplied equations are not differential or integral equations.
Then I learned about NDsolve and tried the same equation with similar boundary conditions got the error: The number of constraints (0) (initial conditions) is not equal to the total differential order of the system plus the number of discrete variables (2). Even with the proper syntax, I am recieving this error. This was altered by changing the y(x=0) to x=1, but then I will get False or True in the Output where the initial conditions were.
Any help or guidance with proper syntax or finding a solution to this problem will be greatly appreciated. Please let me know if more info is needed.
Update: After realizing some syntax errors and including proper constants and the numerical outputs for initial conditions (from another simulation) this is my current status:
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP