Hi all,
Problem description file and error output below. I don't understand what
this error means or why I am getting it. At this point I'm still trying to
learn my way around sfepy and I'm not 100% comfortable with the underlying
math either. So this file might not make sense as far as what it appears to
be trying to model, and my error could be in the code or in the math itself.
I'm running the problem description file using simple.py from within a tmux
session on Ubuntu 14.04 in anaconda. The anaconda environment uses python
2.7 so that mayavi will also work.
Thanks in advance for any help.
-Yoni
Problem description:
filename_mesh = sfepy_dir + '/meshes/2d/square_quad.mesh'
regions = {
'Omega': 'all',
'Gamma_Top': ('vertices in (y == 0.4)', 'facet'),
'Gamma_Bottom': ('vertices in (y == -0.5)', 'facet'),
'Gamma_Left': ('vertices in (x == -0.5)', 'facet'),
'Gamma_Right': ('vertices in (x == 0.4)', 'facet')
}
fields = {
'head': ('real', 1, 'Omega', 1),
'reservoir_height': ('real', 1, 'Omega', 1)
}
variables = {
'u' : ('unknown field', 'head', 0, 1),
'l' : ('test field', 'head', 'u'),
'h' : ('unknown field', 'reservoir_height', 0, 1),
'l2' : ('test field', 'reservoir_height', 'h'),
}
ebcs = {
'u1' : ('Gamma_Left', {'u.0' : 2.0}),
'u2' : ('Gamma_Right', {'u.0' : -2.0}),
'u3' : ('Gamma_Top', {'u.0' : 5.0}),
'u4' : ('Gamma_Bottom', {'u.0' : 0.0})
}
integrals = {
'i' : 2
}
materials = {
'storativity' : ({'name': 'S',
'values': {'val' : 1.0}}),
'HParam': ({'name': 'hp',
'values': {'val' : 0.2}})
}
equations = {
'diffusion' :
"""
dw_volume_dot.i.Omega(S.val, l, du/dt)
= dw_electric_source.i.Omega(S.val, l2, h)
"""
}
solvers = {
'ts' : ('ts.simple', {
't0' : 0.0,
't1' : 10.0,
'dt' : None,
'n_step' : 11, # Has precedence over dt.
}),
'newton' : ('nls.newton', {
'i_max' : 1,
'eps_a' : 1e-10,
}),
'ls' : ('ls.scipy_direct', {}),
}
Error:
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/script/simple.py", line 184, in <module>
main()
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/script/simple.py", line 177, in main
app = PDESolverApp(conf, options, output_prefix)
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/applications/pde_solver_app.py", line 137, in __init__
self.problem = Problem.from_conf(conf, init_equations=is_eqs, **kwargs)
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/discrete/problem.py", line 173, in from_conf
obj.set_equations(conf.equations, user={'ts' : obj.ts})
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/discrete/problem.py", line 464, in set_equations
variables = Variables.from_conf(self.conf_variables, self.fields)
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/discrete/variables.py", line 156, in from_conf
var = Variable.from_conf(key, val, fields)
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/discrete/variables.py", line 847, in from_conf
special=special, key=key, history=history)
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/discrete/variables.py", line 1338, in __init__
special, flags, **kwargs)
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/discrete/variables.py", line 878, in __init__
self._set_kind(kind, order, primary_var_name, special=special)
File "/home/yoni/anaconda3/envs/mayavi_env/lib/python2.7/site-
packages/sfepy/discrete/variables.py", line 887, in _set_kind
raise ValueError('order %d already used!' % order)
ValueError: order 0 already used!