# Editing Fem-fenics

Jump to navigation
Jump to search

**Warning:** You are not logged in. Your IP address will be publicly visible if you make any edits. If you **log in** or **create an account**, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision | Your text | ||

Line 846: | Line 846: | ||

# eq = (1/k)*inner(u - u0, v)*dx + inner(grad(u0)*u0, v)*dx \ | # 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 | # + nu*inner(grad(u), grad(v))*dx - inner(f, v)*dx | ||

− | a1 = BilinearForm ('TentativeVelocity' | + | a1 = BilinearForm ('TentativeVelocity', V, k); |

Line 852: | Line 852: | ||

# a = inner(grad(p), grad(q))*dx | # a = inner(grad(p), grad(q))*dx | ||

# L = -(1/k)*div(u1)*q*dx | # L = -(1/k)*div(u1)*q*dx | ||

− | a2 = BilinearForm ('PressureUpdate' | + | a2 = BilinearForm ('PressureUpdate', Q); |

# Velocity update | # Velocity update | ||

# a = inner(u, v)*dx | # a = inner(u, v)*dx | ||

# L = inner(u1, v)*dx - k*inner(grad(p1), v)*dx | # L = inner(u1, v)*dx - k*inner(grad(p1), v)*dx | ||

− | a3 = BilinearForm ('VelocityUpdate' | + | a3 = BilinearForm ('VelocityUpdate', V); |

# Assemble matrices | # Assemble matrices |