UFL Specification and User Manual 0.3 - FEniCS Project
UFL Specification and User Manual 0.3 - FEniCS Project
UFL Specification and User Manual 0.3 - FEniCS Project
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>UFL</strong> <strong>Specification</strong> <strong>and</strong> <strong>User</strong> <strong>Manual</strong> <strong>0.3</strong>Martin S. Alnæs, Anders Loggor like this:a = 0.25*(v[j].dx(i) + v[i].dx(j))* \(u[j].dx(i) + u[i].dx(j))*dxThis example is implemented in the file elasticity.ufl in the collection ofdemonstration forms included with the <strong>UFL</strong> source distribution.3.5 The nonlinear term of Navier–StokesThe bilinear form for fixed-point iteration on the nonlinear term of the incompressibleNavier–Stokes equations,∫a(v,u;w) = (w·∇u)·vdx, (3.8)Ωwith w the frozen velocity from a previous iteration, can be implemented asfollows:element = VectorElement("Lagrange", tetrahedron, 1)v = TestFunction(element)u = TrialFunction(element)w = Function(element)a = dot(grad(u)*w, v)*dxalternatively using index notation like this:a = v[i]*w[j]*Dx(u[i], j)*dxor like this:65