UFL Exception : Found argument in Power(...)
My question is as following : What does this error message tell me? (Error message has been added after the code.)
I was trying to solve the nonlinear Falkner-Skan equation through the following code :
"""
We solve the non-linear differential equation :
f''' + f*f'' + beta*(1 - (f')^2) = 0,
beta = 2*m/(1+m)
with the boundary conditions :
f'(0) = f(0) = 0, f'(inf) = 1,
also known as the Falkner-Skan equation.
This is a generalization of the Blasius boundary layer f,g
by considering a wedge at an angle of attack beta from
uniform velocity U.
The outer flow is of the form :
u_e(x) = U(x/L)^m
"""
from dolfin import *
N = 50
beta = Constant(2)
n = Constant(7) # value of "infinity"
mesh = UnitInterval(N)
V = FunctionSpace(
VV = V*V
gh = TrialFunction(VV)
g,h = split(gh)
vg,vh = TestFunctions(VV)
def left(x,
return on_boundary and near(x[0],0)
def right(x,
return on_boundary and near(x[0],1)
bc0 = DirichletBC(
bc1 = DirichletBC(
bc2 = DirichletBC(
bcs = [bc0,bc1,bc2]
gh_ = Function(VV)
a = (-h.dx(0)*vh - n*n*h*g*vh + n*n*beta*(1 - h*h)*vg)*dx # Weak fomulation
L = Constant(0)*vg*dx
A,b = assemble_
The final line produces the following error message :
$ python falk_skan_solver.py
Traceback (most recent call last):
File "falk_skan_
A,b = Assemble(a,L,bcs)
NameError: name 'Assemble' is not defined
crackhead@
Calling FFC just-in-time (JIT) compiler, this may take some time.
Found Argument in Power(Indexed(
Traceback (most recent call last):
File "falk_skan_
A,b = assemble_
File "/usr/lib/
subdomains, form_compiler_
File "/usr/lib/
common_cell)
File "/usr/lib/
return local_jit(*args, **kwargs)
File "/usr/lib/
return jit_compile(form, parameters=p, common_
File "/usr/lib/
return jit_form(
File "/usr/lib/
common_
File "/usr/lib/
analysis = analyze_
File "/usr/lib/
common_cell) for form in forms)
File "/usr/lib/
common_cell) for form in forms)
File "/usr/lib/
ffc_
File "/usr/lib/
parts = compute_
File "/usr/lib/
res = transform_
File "/usr/lib/
integrand = transform(
File "/usr/lib/
e, provides = pe.visit(e)
File "/usr/lib/
r = h(o)
File "/usr/lib/
part, term_provides = self.visit(term)
File "/usr/lib/
r = h(o, *map(self.visit, o.operands()))
File "/usr/lib/
r = h(o, *map(self.visit, o.operands()))
File "/usr/lib/
r = h(o)
File "/usr/lib/
part, term_provides = self.visit(term)
File "/usr/lib/
r = h(o, *map(self.visit, o.operands()))
File "/usr/lib/
r = h(o)
File "/usr/lib/
error("Found Argument in %s, this is an invalid expression." % repr(x))
File "/usr/lib/
raise self._exception
ufl.log.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- UFL Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Kristian B. Ølgaard
- Solved:
- Last query:
- Last reply: