Examples





If you are new to xmds then we recommend first to work through the examples supplied in both the documentation, and here on this page.

Physics and Mathematics:

Engineeering:

Finance and Economics:

  • Black-Scholes Equation

Biology:

Chemistry:

Weather modelling:

Don't see your field or discipline here? Tell us about it! Just email xmds-user@lists.sourceforge.net with information about your field and how you use differential equations to model systems of interest to you. Then we can put your examples up on this web page!




Physics and Mathematics:
Nonlinear Schrödinger Equation


The famous nonlinear Schrödinger equation (NLSE) in one transverse dimension. This equation permits sech2 soliton solutions, but the script supplied here uses a Gaussian initial field to create a pulsating or ``breathing'' soliton.
Script: nlse.xmds

Non-degenerate Parametric Interaction



Here we have a non-degenerate parametric interaction in two transverse dimensions. Note the field has three components. The script supplied is actually a simulation of an all-optical AND gate.
Script: ndparamp.xmds

Kubo Oscillator


The Kubo oscillator is a great example of a stochastic ODE. The argument of a unit complex vector is "blown" about by a real Gaussian noise, xi. Integrating such an equation is a highly involved process, but xmds makes it seem so simple.
Script: kubo.xmds

Quantum Optic Field


Stochastic noises can also appear in PDEs. This is example borrowed from quantum optics, the numerical solution of which is rather complicated. Again xmds does all the hard work for you.
Script: fibre.xmds

Electro-Atomic Coupling


Finally, this is a more unusual problem where there are three components, but one of which propagates in a transverse dimension rather than in the main propagation dimension. This equation is modelling the propagation of an optical pulse through a field of atoms having a transition frequency tuned to that of the optical pulse centre frequency.
Script: tla.xmds




Having mastered these we have a selection of additional examples not necessarily covered in the documentation:


Advection Equation


Solves the advection equation for an initial cosine-modulated Gaussian pulse. This is an example simulation used in the documentation.
Script: advection.xmds

Diffusion (Heat) Equation


Solves the diffusion equation for an initial Gaussian pulse. This is an example simulation used in the documentation.
Script: diffusion.xmds

Lorenz Equations


Solves the Lorenz equations for a simple chaotic system. This is an example simulation used in the documentation.
Script: lorenz.xmds

Finite amplitude pendulum


Finite amplitude pendulum simulation
Script: pendulum.xmds

Lane-Emden Equations


Example simulation of the Lane-Emden equation in astrophysics. This model can be used to determine the effective size of polytropes.
Script: lane_emden.xmds

Vibrating string


Waves on a vibrating string
Script: vibstring.xmds


Here are some more simulations to whet your appetite further:
File Description Stochastic?
atomlaser.xmds Solves Schrödinger's equation (linear) in one dimension with a linear potential. No
soliton.xmds Solves coupled nonlinear Schrödinger equation (NLSE) in one dimension. No
fullpos3D.xmds Quantum dynamical Bose Einstein Condensate simulation with ``superchemistry'' between atomic and molecular fields. This one will test your processor! Yes
gaugeatomlaser.xmds Stochastic atom laser simulation Yes
highdim.xmds Stochastic superchemistry simulation (uses MPI) Yes
sine.xmds Coupled two-component ODE No
kubo_tutorial.xmds Kubo oscillator tutorial script as discussed in the documentation. This is a slighly more general script to the other Kubo oscillator script given above. No
lane_emden.xmds Example simulation of the Lane-Emden equation in astrophysics. This model can be used to determine the effective size of polytropes. No
paraxial_wave.xmds Example simulation of the paraxial wave equation in optics. This equation is used to determine the paraxial, far-field intensity pattern given an initial intensity distribution at the input. No
duffing.xmds Example simulation of Duffing's equation which describes the motion of a mechanical system in a twin-well potential. No

Engineering:
File Description Stochastic?
van_der_pol.xmds Example simulation of a van der Pol oscillator. This is a model of oscillations in electrical circuits. No
ring_modulator.xmds Simulation of a ring modulator circuit in electrical analysis. The simulation describes the behaviour of the ring modulator, which, given a low-frequency signal, and a high frequency signal produces a mixed signal output. No

Finance and Economics:

Biology:
File Description Stochastic?
hires.xmds This problem originates from plant physiology and refers to "High Irradiance RESponse" of photomorphogenesis on the basis of phytochrome, by means of a chemical reaction involving eight reactants. No
fisher_reaction_diffusion.xmds Example simulation of the reaction-diffusion equation of Fisher (1937). This equation can be interpreted as describing the frequency of a focal allele as a function of one-dimensional space in a biallelic diploid population of constant size. No

Chemistry:
File Description Stochastic?
lotka_volterra.xmds The Lotka-Volterra system, used to model undamped oscillations in autocatalytic chemical reactions. No
branch.xmds Branching reaction example of reaction between hydrogen and oxygen No
catcycle.xmds An example of a catalytic cycle of reactions. No
chemkin.xmds Example simulation of the chemical kinetics of a reversible biomolecular reaction. No
krebs.xmds Simulation of a simplification of the Krebs cycle of biochemical reactions. No
brusselator.xmds Simulation of the Brusselator model of oscillating chemical reactions. No
oregonator.xmds Simulation of the Oregonator model of oscillating chemical reactions. No
thermkin.xmds Example simulation of thermokinetic reactions. No
chain.xmds Example simulation of a chain polymerisation reaction. No

Weather modelling: