dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #20277
Re: [Question #135590]: formtransformations.py : Found basis function in %s, this is an invalid expression
Question #135590 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/135590
B. Emek Abali posted a new comment:
thanks to Garth and Marie, here is the solution (of a stationary, non-
newtonian fluid with pure dirichlet boundaries):
def sigma(v):
d = 0.5*(grad(v)+grad(v).T)
d2 = 0.5*inner(d,d)
mu = atan(sqrt(d2)/b)
return (2.0*mu*d)
w = TestFunction(V)
w2 = TestFunction(V)
v0 = Function(V)
v1 = TrialFunction(V)
#energy density, langrangian w/o body forces, w/o tractions
L = inner(sigma(v0),grad(w))*dx
#gain or Gateaux derivative in each iteration
G = derivative(L, v0, v1)
problem = VariationalProblem(G, L, bcs=bc, nonlinear=True)
problem.solve(v0)
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.