This example demonstrates the use of sequenced equations in time-dependent problems.
The variable U is given a source consistent with the desired solution of
The variable V has a source equal to -U. The analytic solution to this equation is
V = A*(x^2+y^2)/4 - (x^4+y^4)/12
The variable V therefore depends strongly on U, but U is unaffected by V.
In this case, we can separate the equations and solve for V in a THEN clause.
title 'Sequenced equations in time-dependent systems'
k = 1
! analytic solutions
u0 = (a-x^2-y^2)
v0 = (a*(x^2+y^2)/4-(x^4+y^4)/12)
u: div(K*grad(u)) + 4 = dt(u)
v: div(K*grad(v)) - u = dt(v)
! ramp the boundary values, so that the initial BV's are consistent with the initial interior values.
line to (1,-1) to (1,1) to (-1,1) to close
time 0 to 100
elevation(u,div(K*grad(v))) from(-1,0) to (1,0)
history(u,v) at (0,0)