Вычисление правой части дискретного уравнения Гельмгольца


> restart;
> define(RHS, forall([i,j],
> RHS(i,j)=A[u](i-1/2,j) union
> A[u](i+1/2,j) union
> A[v](i,j+1/2) union
> A[v](i,j-1/2) union
> d[n](i,j) union
> d[n-1](i,j) union
> A[P](i,j) union
> A[P](i+1,j) union
> A[P](i-1,j) union
> A[P](i,j+1) union
> A[P](i,j-1) union
> P[n](i,j) union
> P[n](i+1,j) union
> P[n](i-1,j) union
> P[n](i,j+1) union
> P[n](i,j-1) union
> P[n-1](i,j) union
> P[n-1](i+1,j) union
> P[n-1](i-1,j) union
> P[n-1](i,j+1) union
> P[n-1](i,j-1)
> ));
> define(d[n], forall([i,j],
> d[n](i,j)=u[n](i-1/2,j) union
> u[n](i+1/2,j) union
> v[n](i,j-1/2) union
> v[n](i,j+1/2)
> ));
> define(d[n-1], forall([i,j],
> d[n-1](i,j)=u[n-1](i-1/2,j) union
> u[n-1](i+1/2,j) union
> v[n-1](i,j-1/2) union
> v[n-1](i,j+1/2)
> ));
> define(A[P], forall([i,j],
> A[P](i,j)=A[T](i,j) union
> A[p[s]](i,j)
> ));
> define(P[n], forall([i,j],
> P[n](i,j)=T[n](i,j) union
> pi[n](i,j)
> ));
> define(P[n-1], forall([i,j],
> P[n-1](i,j)=T[n-1](i,j) union
> pi[n-1](i,j)
> )); > define(A[u], forall([i,j],
> A[u](i,j)=alpha(i,j) union
> beta(i,j) union
> gamma(i,j) union
> delta(i,j) union
> epsilon(i+1/2,j) union
> epsilon(i-1/2,j) union
> V[n](i+1/2,j+1/2) union
> V[n](i-1/2,j+1/2) union
> U[n](i+1,j) union
> U[n](i-1,j) union
> pi[n](i-1/2,j) union
> pi[n](i+1/2,j) union
> w(i-1/2,j) union
> w(i+1/2,j) union
> u[n](i,j) union
> K(i+1/2,j) union
> K(i-1/2,j) union
> Phi(i+1/2,j) union
> Phi(i-1/2,j) union
> T[n](i-1/2,j) union
> T[n](i+1/2,j) union
> pi[n](i+1/2,j) union
> pi[n](i-1/2,j)
> ));
> define(A[v], forall([i,j],
> A[v](i,j)=gamma(i+1/2,j+1/2) union
> delta(i-1/2,j+1/2) union
> alpha(i-1/2,j-1/2) union
> beta(i+1/2,j-1/2) union
> phi(i,j+1/2) union
> phi(i,j-1/2) union
> U[n](i+1/2,j+1/2) union
> U[n](i-1/2,j+1/2) union
> U[n](i-1/2,j-1/2) union
> U[n](i+1/2,j-1/2) union
> V[n](i,j+1) union
> V[n](i,j-1) union
> pi[n](i,j-1/2) union
> pi[n](i,j+1/2) union
> w(i,j-1/2) union
> w(i,j+1/2) union
> v[n](i,j) union
> K(i,j+1/2) union
> K(i,j-1/2) union
> Phi(i,j+1/2) union
> Phi(i,j-1/2) union
> T[n](i,j-1/2) union
> T[n](i,j+1/2) union
> pi[n](i,j+1/2) union
> pi[n](i,j-1/2)
> ));
> define(A[T], forall([i,j],
> A[T](i,j)=pi[n](i,j) union
> U[n](i+1/2,j) union
> U[n](i-1/2,j) union
> V[n](i,j+1/2) union
> V[n](i,j-1/2) union
> T[n](i+1,j) union
> T[n](i,j) union
> T[n](i-1,j) union
> T[n](i,j+1) union
> T[n](i-1,j) union
> T[n](i,j-1) union
> w(i,j) union
> pi[n](i,j) union
> pi[n](i-1,j) union
> pi[n](i+1,j) union
> pi[n](i,j-1) union
> pi[n](i,j+1) union
> Phi(i,j) union
> Div(i,j)
> ));
> define(A[p[s]], forall([i,j],
> A[p[s]](i,j)=pi[n](i,j) union
> Div(i,j)
> ));
> define(Div, forall([i,j],
> Div(i,j)=U[n](i-1/2,j) union
> U[n](i+1/2,j) union
> V[n](i,j+1/2) union
> V[n](i,j-1/2)
> ));
> define(U[n], forall([i,j],
> U[n](i,j)=pi[n](i+1/2,j) union
> pi[n](i-1/2,j) union
> u[n](i,j)
> ));
> define(V[n], forall([i,j],
> V[n](i,j)=pi[n](i,j+1/2) union
> pi[n](i,j-1/2) union
> v[n](i,j)
> ));
> define(K, forall([i,j],
> K(i,j)=u[n](i-1/2,j) union
> u[n](i+1/2,j) union
> v[n](i,j-1/2) union
> v[n](i,j+1/2)
> ));
> define(Phi, forall([i,j],
> Phi(i,j)=T[n](i,j)
> ));
> define(alpha, forall([i,j],
> alpha(i,j)=q(i+1,j+1/2) union
> q(i,j+1/2) union
> q(i,j-1/2) union
> q(i+1,j-1/2)
> ));
> define(beta, forall([i,j],
> beta(i,j)=q(i,j+1/2) union
> q(i-1,j+1/2) union
> q(i-1,j-1/2) union
> q(i,j-1/2)
> ));
> define(gamma, forall([i,j],
> gamma(i,j)=q(i,j+1/2) union
> q(i-1,j+1/2) union
> q(i-1,j-1/2) union
> q(i,j-1/2)
> ));
> define(delta, forall([i,j],
> delta(i,j)=q(i+1,j+1/2) union
> q(i,j+1/2) union
> q(i,j-1/2) union
> q(i+1,j-1/2)
> ));
> define(epsilon, forall([i,j],
> epsilon(i,j)=q(i+1/2,j+1/2) union
> q(i-1/2,j+1/2) union
> q(i+1/2,j-1/2) union
> q(i-1/2,j-1/2)
> ));
> define(phi, forall([i,j],
> phi(i,j)=q(i+1/2,j+1/2) union
> q(i-1/2,j+1/2) union
> q(i+1/2,j-1/2) union
> q(i-1/2,j-1/2)
> ));
> define(q, forall([i,j],
> q(i,j)=zeta(i,j) union
> pi[n](i-1/2,j+1/2) union
> pi[n](i+1/2,j+1/2) union
> pi[n](i-1/2,j-1/2) union
> pi[n](i+1/2,j-1/2)
> ));
> define(zeta, forall([i,j],
> zeta(i,j)=v[n](i+1/2,j) union
> v[n](i-1/2,j) union
> u[n](i,j-1/2) union
> u[n](i,j+1/2)
> ));
> define(w, forall([i,j],
> w(i,j)=pi[n](i,j) union
> Div(i,j)
> ));
> op(RHS(i+1/2,j+1/2));
pi[n](i + 3/2, j - 3/2), u[n](i + 1, j - 3/2), v[n](i + 3/2, j - 1),
pi[n](i - 1/2, j - 3/2), v[n](i - 1/2, j - 1), u[n](i, j - 3/2),
pi[n](i + 5/2, j - 1/2), u[n](i + 2, j - 1/2), v[n](i + 5/2, j),
v[n](i + 5/2, j + 1), u[n](i + 2, j + 3/2),
pi[n](i + 5/2, j + 3/2), pi[n](i - 3/2, j - 1/2),
u[n](i - 1, j - 1/2), u[n](i - 1, j + 3/2),
pi[n](i - 3/2, j + 3/2), v[n](i - 3/2, j), v[n](i - 3/2, j + 1),
pi[n - 1](i + 1/2, j - 1/2), T[n - 1](i + 3/2, j + 1/2),
pi[n - 1](i + 3/2, j + 1/2), T[n - 1](i + 1/2, j - 1/2),
T[n - 1](i + 1/2, j + 3/2), pi[n - 1](i + 1/2, j + 3/2),
T[n - 1](i - 1/2, j + 1/2), pi[n - 1](i - 1/2, j + 1/2),
T[n](i + 1/2, j + 1/2), pi[n](i + 3/2, j - 1/2),
u[n](i + 1, j - 1/2), pi[n](i + 1/2, j - 3/2),
v[n](i + 1/2, j - 1), T[n](i + 3/2, j - 1/2),
T[n](i - 1/2, j - 1/2), T[n](i + 1/2, j - 3/2),
T[n - 1](i + 1/2, j + 1/2), pi[n - 1](i + 1/2, j + 1/2),
T[n](i + 1/2, j - 1/2), pi[n](i + 1/2, j + 3/2),
T[n](i + 1/2, j + 3/2), T[n](i - 1/2, j + 1/2),
pi[n](i + 3/2, j + 1/2), T[n](i + 3/2, j + 1/2),
u[n - 1](i + 1, j + 1/2), v[n - 1](i + 1/2, j),
v[n - 1](i + 1/2, j + 1), u[n - 1](i, j + 1/2),
pi[n](i + 5/2, j + 1/2), u[n](i + 2, j + 1/2),
u[n](i + 1, j + 1/2), v[n](i + 3/2, j + 1), v[n](i + 3/2, j),
T[n](i + 5/2, j + 1/2), pi[n](i - 3/2, j + 1/2),
u[n](i - 1, j + 1/2), v[n](i - 1/2, j + 1),
T[n](i - 3/2, j + 1/2), pi[n](i - 1/2, j + 5/2), u[n](i, j + 5/2),
v[n](i - 1/2, j + 2), pi[n](i - 1/2, j + 1/2),
pi[n](i + 1/2, j + 1/2), pi[n](i - 1/2, j - 1/2),
pi[n](i + 1/2, j - 1/2), v[n](i + 1/2, j), v[n](i - 1/2, j),
u[n](i, j - 1/2), u[n](i, j + 1/2), pi[n](i + 3/2, j + 3/2),
u[n](i + 1, j + 3/2), pi[n](i - 1/2, j + 3/2), u[n](i, j + 3/2),
pi[n](i + 1/2, j + 5/2), v[n](i + 1/2, j + 2),
v[n](i + 1/2, j + 1), T[n](i + 3/2, j + 3/2),
T[n](i - 1/2, j + 3/2), T[n](i + 1/2, j + 5/2),
pi[n](i + 3/2, j + 5/2), u[n](i + 1, j + 5/2),
v[n](i + 3/2, j + 2)
>

next up previous
Next:Решение дискретного уравнения Гельмгольца Up: Содержание Previous: Полунеявная схема интегрирования по времени

Валерий Глухов, Институт вычислительной математии РАН, gluhoff@inm.ras.ru