Comments (2)
Hi,
I think you are actually solving a different problem. The PDE class is suitable for
pure boundary value problems. However, the wave equation poses an initial value + boundary value problem. In addition to the the boundary conditions for x, you need two initial conditions. The first is for the u(t=0, x) and the second for \partial_t u(t=0, x). I wouldn't use the PDE class for this kind of problem, but instead derive an iterative scheme using the Stencil class (there will be an example on the docs pages, soon).
One other thing I noticed: the left boundary condition is a time dependent Dirichlet BC and the right one is a zero Dirichlet BC. This doesn't have the effect you want. You said you want to model a wave passing by. But in your case, the left BC is continuously pumping energy into the system sending out waves in both directions and the waves traveling along the positive x-axis will be reflected at the right bounday (u=0 there).
from findiff.
think you are actually solving a different problem. The PDE class is suitable for pure boundary value problems. However, the wave equation poses an initial value + boundary value problem. In addition to the the boundary conditions for x, you need two initial conditions. The first is for the u(t=0, x) and the second for \partial_t u(t=0, x). I wouldn't use the PDE class for this kind of problem, but instead derive an iterative scheme using the Stencil class (there will be an example on the docs pages, soon).
Looking forward for that!
One other thing I noticed: the left boundary condition is a time dependent Dirichlet BC and the right one is a zero Dirichlet BC. This doesn't have the effect you want. You said you want to model a wave passing by. But in your case, the left BC is continuously pumping energy into the system sending out waves in both directions and the waves traveling along the positive x-axis will be reflected at the right bounday (u=0 there).
Yes, my apologies, I forgot to mention that it should be a continuous wave starting from the left. However, it should be absorbed at the right boundary instead of getting reflected.
from findiff.
Related Issues (20)
- multi dimensional coordinates HOT 1
- Derivatives for a single point in a vector space HOT 1
- PDEs HOT 1
- Using findiff to solve the stationary Schrödinger equation HOT 2
- Allow the user to specify difference method HOT 2
- Problems with the stencil matrix HOT 4
- First Order Schemes HOT 1
- Replace math images by latex expressions HOT 2
- Analytic inversion of Vandermonde matrix HOT 5
- Outdated conda-forge builds HOT 2
- Higher accuracy derivatives in 3D HOT 3
- Accuracy HOT 2
- How are the higher order derivatives computed in your code? HOT 1
- integrals in boundary conditions? HOT 2
- DOC: Equations seem broken on documentation site HOT 1
- Input for non-uniform spacing HOT 2
- Single point derivative
- possible typo in theory section
- Numerical derivative?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from findiff.