Explicit dependence on coordinates in class method #81
Unanswered
Divyoj-Singh
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Unfortunately, I do not have the time to help people with implementing specific PDEs. However, I'm happy to help with specific questions considering the package. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to implement the following equations:
pdes.pdf
This is the code I wrote, mainly modifying the brusselator code:
The theta from the equation has been changed to variable z and is periodic in 2pi.
`import numba as nb
import numpy as np
import pde
import math as math
from pde import FieldCollection, PDEBase, PlotTracker, ScalarField, UnitGrid
class polarityPDE(PDEBase):
""" Cell polarity """
initialize state
T = 500.0;
L=2;
grid = pde.CartesianGrid([[0,L], [0, L],[0,2*math.pi]], [30, 30, 50],[False,False,True]) # generate grid
eq = polarityPDE(diffusion_constant=0.2)
state = eq.get_initial_state(grid)
simulate the pde
tracker = PlotTracker(interval=1, plot_args={"vmin": 0, "vmax": 2})
sol = eq.solve(state, t_range=T, dt=1e-2, tracker=tracker)
finally i want to plot the the value of a and b in x and y and z..`
but I can't understand how to access the value of a at x, y and z and thus write the second term. Also, I am still searching how to get only the z component of laplace at the last term.
Can I please get help in this ?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions