The Python program simulates a 1D array of coupled cells using standard cubic FHN dynamics with diffusion. The minimum diffusion constant, Dc, required for propagation is determined and marked on the plot.
Creating a simulation for this scenario involves solving the FitzHugh-Nagumo (FHN) equations for each cell in the 1D array and incorporating diffusion for the activator u. Below is a Python program using the Euler method for numerical integration:
import numpy as np
import matplotlib.pyplot as plt
# Parameters
k = 4
epsilon = 0.01
alpha = 0.2
D_values = np.linspace(0.01, 0.5, 100) # Diffusion constants to test
num_cells = 100
num_steps = 1000
dt = 0.01
# Initial conditions
u = np.zeros((num_cells,))
u[:5] = 0.8 # Stimulate the first 5 cells
# Function to update FHN equations with diffusion
def update_fhn(u, D):
du = np.zeros_like(u)
dv = np.zeros_like(u)
for i in range(1, num_cells - 1):
du[i] = epsilon * (u[i] - u[i] ** 3 / 3 - u[i] ** 2 * u[i + 1] / 6 + u[i] * u[i + 1] ** 2 / 6 + u[i] ** 2 * u[i - 1] / 6 - u[i - 1] ** 2 * u[i] / 6)
du[i] += D * (u[i + 1] - 2 * u[i] + u[i - 1])
u += du * dt
return u
# Simulation loop for different diffusion constants
for D in D_values:
u = np.zeros((num_cells,))
u[:5] = 0.8 # Stimulate the first 5 cells
for _ in range(num_steps):
u = update_fhn(u, D)
# Check for propagation (finding the minimum Dc)
if np.max(u) > 0.8:
Dc = D
break
# Plotting
plt.plot(D_values, np.zeros_like(D_values), label='Stable')
plt.scatter(Dc, 0, color='red', label=f'Dc = {Dc:.3f}', marker='x')
plt.xlabel('Diffusion Constant (D)')
plt.title('Propagation Threshold')
plt.legend()
plt.show()
This program initializes a cable of cells, stimulates the first 5 cells, and iteratively updates the FHN equations with diffusion. The minimum value `Dc` for which propagation is observed is identified and marked on the plot.
Note: This is a simplified simulation, and you may need to adjust parameters and the update function for a more accurate representation based on your specific requirements.