Changes

Jump to navigation Jump to search

Fem-fenics

9 bytes added, 01:35, 5 October 2013
# eq = (1/k)*inner(u - u0, v)*dx + inner(grad(u0)*u0, v)*dx \
# + nu*inner(grad(u), grad(v))*dx - inner(f, v)*dx
a1 = BilinearForm ('TentativeVelocity', V, V, k);
# a = inner(grad(p), grad(q))*dx
# L = -(1/k)*div(u1)*q*dx
a2 = BilinearForm ('PressureUpdate', Q, Q);
# Velocity update
# a = inner(u, v)*dx
# L = inner(u1, v)*dx - k*inner(grad(p1), v)*dx
a3 = BilinearForm ('VelocityUpdate', V, V);
# Assemble matrices
60

edits

Navigation menu