FirstOrderPDE

scalation.dynamics.FirstOrderPDE
class FirstOrderPDE(v: (Double, Double) => Double, dt: Double, dx: Double, xm: Double, ic: FunctionS2S, bc: (Double, Double))

The FirstOrderPDE class is used to solve First Order Partial Differential Equations like the Advection Equation. Let 'u(x, t)' = concentration in a fluid with velocity 'v' at position '0 <= x <= xm' and time 't' > 0. Numerically solve the

Advection Equation: u_t + v(x, t) * u_x = 0 with initial conditions u(x, 0) = ic(x) boundary conditions (u(0, t), u(xm, t)) = bc

Value parameters

bc

the boundary conditions as a 2-tuple for end-points 0 and 'xm'

dt

delta 't'

dx

delta 'x'

ic

the initial conditions as a function of position 'x'

v

the velocity field function v(x, t)

xm

the length of the column

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def solve(te: Double): VectorD

Solve for the concentration of the column at time t, returning the vector of concentration representing the concentration profile of column over its length. This method uses an Explicit Finite Difference technique to solve the PDE. L-W is the Lax-Wendroff scheme which has second-order accuracy.

Solve for the concentration of the column at time t, returning the vector of concentration representing the concentration profile of column over its length. This method uses an Explicit Finite Difference technique to solve the PDE. L-W is the Lax-Wendroff scheme which has second-order accuracy.

Value parameters

te

the time the solution is desired (t-end)

Attributes

See also

math.nju.edu.cn/~qzh/numPDE.pdf