Solving the laplace equation in only one direction while in a 2 or 3D domain #199
Answered
by
david-zwicker
Tobias-Dwyer
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
david-zwicker
Jan 19, 2022
Replies: 1 comment 1 reply
-
Yes, this is possible, although it is currently not very well exposed in the general framework. Here is an example that should get you started: from pde.grids.operators.cartesian import _make_derivative, _make_derivative2
make_derivative_x = functools.partial(_make_derivative, axis=0)
pde.CartesianGrid.register_operator('derivative_x', make_derivative_x)
make_laplace_x = functools.partial(_make_derivative2, axis=0)
pde.CartesianGrid.register_operator('laplace_x', make_laplace_x)
eq = pde.PDE({'u': 'derivative_x(g/D*derivative_x(u))'}) The example defines two new operators, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Tobias-Dwyer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, this is possible, although it is currently not very well exposed in the general framework. Here is an example that should get you started:
The example defines two new operators,
derivative_x
andlaplace_x
, that can be used in the expressions of thePDE
class. They evaluate the first and secon…