Wolfram Cloud
Resource Object
Example Resource
Solve a Wave Equation with Absorbing Boundary Conditions
Source Notebook
Solve a Wave Equation with Absorbing Boundary Conditions
Examples
Example Notebook
Open in Cloud
Download Notebook
Solve a 1D wave equation with absorbing boundary conditions.
Specify a wave equation with absorbing boundary conditions. Note that the Neumann value is for the first time derivative of
u
:
I
n
[
1
]
:
=
e
q
n
=
D
[
u
[
t
,
x
]
,
{
t
,
2
}
]
D
[
u
[
t
,
x
]
,
{
x
,
2
}
]
+
N
e
u
m
a
n
n
V
a
l
u
e
[
-
D
e
r
i
v
a
t
i
v
e
[
1
,
0
]
[
u
]
[
t
,
x
]
,
x
0
|
|
x
1
]
;
Specify initial conditions for the wave equation:
I
n
[
2
]
:
=
u
0
[
x
_
]
:
=
E
v
a
l
u
a
t
e
[
D
[
0
.
1
2
5
E
r
f
[
(
x
-
0
.
5
)
/
0
.
1
2
5
]
,
x
]
]
;
i
c
=
{
u
[
0
,
x
]
u
0
[
x
]
,
D
e
r
i
v
a
t
i
v
e
[
1
,
0
]
[
u
]
[
0
,
x
]
0
}
;
Solve the equation using the finite element method:
I
n
[
3
]
:
=
u
f
u
n
=
N
D
S
o
l
v
e
V
a
l
u
e
[
{
e
q
n
,
i
c
}
,
u
,
{
t
,
0
,
1
}
,
{
x
,
0
,
1
}
,
M
e
t
h
o
d
{
"
M
e
t
h
o
d
O
f
L
i
n
e
s
"
,
"
S
p
a
t
i
a
l
D
i
s
c
r
e
t
i
z
a
t
i
o
n
"
{
"
F
i
n
i
t
e
E
l
e
m
e
n
t
"
}
}
]
;
Visualize the wave equation with absorbing boundary conditions:
I
n
[
4
]
:
=
l
i
s
t
=
T
a
b
l
e
[
P
l
o
t
[
u
f
u
n
[
t
,
x
]
,
{
x
,
0
,
1
}
,
P
l
o
t
R
a
n
g
e
{
-
0
.
1
,
1
.
3
}
]
,
{
t
,
0
,
1
,
0
.
1
}
]
;
L
i
s
t
A
n
i
m
a
t
e
[
l
i
s
t
]
a
b
s
o
r
b
i
n
g
_
c
o
n
d
i
t
i
o
n
s
.
s
w
f
"
"
Source Metadata
Publisher Information
Contributed By:
Wolfram Staff