0% found this document useful (0 votes)
5 views

numerical programming - - ap6

Uploaded by

nani chkhenkeli
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

numerical programming - - ap6

Uploaded by

nani chkhenkeli
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

For this AP,

1. I used Lorenz system with the following equations:

2. The TRBDF2 Method


main idea is to combine explicit and implicit integration steps to balance accuracy and stability. i
am using explicit Euler method to predict the next state. and solving nonlinear system implicitly
using Newton's method to correct the predicted state.

f(x) is the derivative of the system at the current state, delta t is time step size.
3. Lorenz system simulation
steps include derivative function (lorenz_deriv) computes derivatives of the system as a given
state. function trbdf2_step implements trbdf2 method, including prediction step ad solution of the
implicit system using newton's method. newton_method function solves implicit equation using
numerical Jacobian and iterative refinement. and the function simulate_lorenz_trbdf2 simulates
Lorenz system over time and generates plots of the output.
3d plot trajectory shows chaotic nature of system, spirals around the attractor. starting from initial
condition(1.0,1.0,1.0,1.0). parameters used (σ = 10.0, β = 2.6667, ρ = 28.0) are typical for the Lorenz
system, demonstrating the classic butterfly-shaped attractor.
logarithmic distance plot shows distance between trajectory and initial condition over time.
demonstrates exponential divergence of trajectories in chaotic system. early on, distance remains
small, but as time progresses, it increases rapidly. This exponential divergence is a manifestation of
sensitive dependence on initial conditions, a key feature of chaotic systems.

all in all, regarding toy model, I use the Lorenz system, a well-known toy model in chaos theory. it is a
simplified set of equations that describe atmospheric convection and chaotic behavior. This model is
chosen because of its ability to demonstrate the sensitive dependence on initial conditions, of chaotic
systems.

You might also like