Class WaveEquation1D
- java.lang.Object
-
- dev.nm.analysis.differentialequation.pde.finitedifference.hyperbolic.dim1.WaveEquation1D
-
- All Implemented Interfaces:
PDE
public class WaveEquation1D extends Object implements PDE
A one-dimensional wave equation is a hyperbolic PDE that takes the following form. \[ \frac{\partial^2 u}{\partial t^2} = \beta \frac{\partial^2 u}{\partial x^2} \] with both boundary ends fixed at 0, that is, \[ u(t, 0) = u(t, a) = 0 \] and two initial conditions, namely u and its first time derivative ut: \[ u(0, x) = f(x), 0 < x < a \\ u_t(0, x) = g(x), 0 < x < a \]- See Also:
- Wikipedia: Wave equation
-
-
Constructor Summary
Constructors Constructor Description WaveEquation1D(double beta, double T, double a, UnivariateRealFunction f, UnivariateRealFunction g)
Constructs an one-dimensional wave equation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
a()
Gets the size of the one-dimensional space, that is, the range of x, (0 < x < a).double
beta()
Gets the value of the wave coefficient βdouble
f(double x)
Gets the value of the initial condition of u at x.double
g(double x)
Gets the value of the initial condition of the time derivative of u at x.double
T()
Gets the time period of interest, that is, the range of t, (0 < t < T).
-
-
-
Constructor Detail
-
WaveEquation1D
public WaveEquation1D(double beta, double T, double a, UnivariateRealFunction f, UnivariateRealFunction g)
Constructs an one-dimensional wave equation.- Parameters:
beta
- the wave coefficient β in the equationT
- the time period of interest (0, T)a
- the region of interest (0, a)f
- the initial condition of u, i.e., u(0, x)g
- the initial condition of the time-derivative of u, i.e., ut(0,x)
-
-
Method Detail
-
beta
public double beta()
Gets the value of the wave coefficient β- Returns:
- the wave coefficient β
-
T
public double T()
Gets the time period of interest, that is, the range of t, (0 < t < T).- Returns:
- the time period of interest
-
a
public double a()
Gets the size of the one-dimensional space, that is, the range of x, (0 < x < a).- Returns:
- the size of the space
-
f
public double f(double x)
Gets the value of the initial condition of u at x.- Parameters:
x
- the position- Returns:
- f(x) = u(0, x)
-
g
public double g(double x)
Gets the value of the initial condition of the time derivative of u at x.- Parameters:
x
- the position- Returns:
- g(x) = ut(0, x)
-
-