Question #159192 on DOLFIN changed: https://answers.launchpad.net/dolfin/+question/159192
Martin Sandve Alnæs proposed the following answer: Sorry, that was too quick. Since u is scalar, that term is fine. Martin On 27 May 2011 08:20, Martin Sandve Alnæs <[email protected]> wrote: > Check your dot(A, grad(v)) term again. Can you write it with index notation? > > Martin > > Den 27. mai 2011 01.25 skrev "Graham Rowlands" > <[email protected]> følgende: >> New question #159192 on DOLFIN: >> https://answers.launchpad.net/dolfin/+question/159192 >> >> Greetings, >> >> I'm solving the Fokker-Planck equation in 2D just fine in the >> time-dependent case (Crank-Nicolson using dolfin in the usual manner I've >> seen around here.) I'm now trying to find the steady state solution without >> waiting for the dynamic simulation to converge. This is apparently much more >> difficult for me to wrap my head around. >> >> The equation (with implied summation over repeated indices): >> du/dt = d/dx_i (A_i * u) + d/dx_i (d/dx_j (B_ij * u ) )) >> >> maps to the following ufl code in weak form in the steady state: >> drift = -dot(A,grad(v))*u >> diffusion = -dot(dot(B,div(B)),grad(v))*u + >> 0.5*dot(dot(B*B.T,grad(u)),grad(v)) >> >> a = (drift + diffusion)*dx # bilinear >> L = f*v*dx # Linear, where f is set to 0.0 in the cpp code >> >> I seem to just get the trivial solution when trying the >> VariationalProblem(a,L,bcs) approach, and I guess I'm rather unsure how to >> work on relaxing this system in a similar way to that seen in the non-linear >> approach. >> >> Many thanks to all involved, >> Graham >> >> -- >> You received this question notification because you are a member of >> DOLFIN Team, which is an answer contact for DOLFIN. >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~dolfin >> Post to : [email protected] >> Unsubscribe : https://launchpad.net/~dolfin >> More help : https://help.launchpad.net/ListHelp > -- You received this question notification because you are a member of DOLFIN Team, which is an answer contact for DOLFIN. _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

