Skip to content

lijemutu/SplitStepFourierMethodPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Split Stepo Fourier Method

This project is using SSFM implementation by: Algorithm-Archive on Python 3.7.5 64bit

It adds initialization variables and a cool graphics for analyze different views

Getting Started

You just need to copy the project to your machine for testing

Prerequisites

Just type as following:

pip install numpy
pip install matplotlib

Execution

The default equation is

with initial condition:

Equation changing

You can change equations by defining your Linear and nonlinear part In this case:

Linear part

And is located on this line, where $k^2$ is the fourier transformation of the derivative

opr.K = np.exp(-0.5 * (par.k ** 2) * par.dt * 1j)

If you want to compute:

The new nonlinear part will be:

And the changes must be like

opr.K = np.exp(-0.5 * (par.k ** 2 - 1j*par.k) * par.dt * 1j)

Nonlinear Part

Nonlinear changes are of the form:

and its implementation is located on

opr.V = 0.5 * (par.x - voffset) ** 2

If you want to compute:

you just need to change:

opr.V =   np.abs((opr.wfc)) ** 2

Visualization

Two panel will show the solution allowing to see it on different perspectives

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Project to solve differential equations using Split step Fourier method 1D (SSFM) with added graph visualization

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages