Hi guys
Playing around with the dw_lin_elastic_th term. Unfortunately, no examples for this one. I've pasted my code at [1]. I'm assuming the material parameter H is similar to that for an isotropic material D. I'm getting a 'history error' as shown below. Any ideas?
Thx
[1] http://paste.pocoo.org/show/306024/
[grassy@myhost sfepy]$ ~/sfepy/simple.py nits.py sfepy: left over: ['disp', 'verbose', '__builtins__', '_filename', '__file__', '__name__', 'stress_strain', 'youngpoisson_to_lame', 'young', '__package__', 'mesh_file', 'Mesh', 'stiffness_tensor_youngpoisson', 'poisson', '__doc__'] sfepy: reading mesh (/home/grassy/sfepy.wiki/msh/its2D.mesh)... sfepy: ...done in 0.00 s sfepy: setting up domain edges... sfepy: ...done in 0.00 s sfepy: creating regions... sfepy: Top sfepy: Bottom sfepy: Omega sfepy: Left sfepy: ...done in 0.01 s sfepy: equation "equilibrium": sfepy: dw_lin_elastic_iso.2.Omega(asphalt.lam,asphalt.mu,v,u)+ dw_lin_elastic_th.2.Omega(ts,asphalt.D,v,du/dt)=0
sfepy: setting up dof connectivities... sfepy: ...done in 0.00 s sfepy: using solvers: ts: ts nls: newton ls: ls sfepy: ====== time 0.000000e+00 (step 1 of 10) ===== sfepy: updating variables... sfepy: ...done
Displacement: -0.111111111111 sfepy: updating materials... sfepy: asphalt sfepy: ...done in 0.00 s sfepy: matrix shape: (93, 93) sfepy: assembling matrix graph... sfepy: ...done in 0.00 s sfepy: matrix structural nonzeros: 1063 (1.23e-01% fill) sfepy: nls: iter: 0, residual: 1.015969e+02 (rel: 1.000000e+00) sfepy: rezidual: 0.00 [s] sfepy: solve: 0.00 [s] sfepy: matrix: 0.01 [s] sfepy: nls: iter: 1, residual: 7.768306e-14 (rel: 7.646202e-16) sfepy: equation "tmp": sfepy: de_cauchy_strain.2.Omega(u) sfepy: equation "tmp": sfepy: de_cauchy_stress.2.Omega(asphalt.D,u) sfepy: ====== time 1.111111e-01 (step 2 of 10) ===== sfepy: updating variables... sfepy: ...done
Displacement: -0.222222222222 sfepy: updating materials... sfepy: asphalt sfepy: ...done in 0.00 s history update! Traceback (most recent call last): File "/home/grassy/sfepy/simple.py", line 120, in <module> main() File "/home/grassy/sfepy/simple.py", line 117, in main app() File "/home/grassy/sfepy/sfepy/applications/application.py", line 29, in call_basic return self.call( **kwargs ) File "/home/grassy/sfepy/sfepy/applications/simple_app.py", line 112, in call post_process_hook_final=self.post_process_hook_final) File "/home/grassy/sfepy/sfepy/solvers/generic.py", line 216, in solve_direct nls_status=nls_status) File "/home/grassy/sfepy/sfepy/solvers/generic.py", line 138, in solve_evolutionary_op for ts, state in time_solver( state0 ): File "/home/grassy/sfepy/sfepy/solvers/ts.py", line 118, in __call__ state = step_fun( self.ts, state0, *step_args ) File "/home/grassy/sfepy/sfepy/solvers/generic.py", line 116, in time_step_function state = problem.solve(state0=state0) File "/home/grassy/sfepy/sfepy/fem/problemDef.py", line 799, in solve vec = solvers.nls(vec0) File "/home/grassy/sfepy/sfepy/solvers/nls.py", line 183, in __call__ vec_r = fun( vec_x ) File "/home/grassy/sfepy/sfepy/fem/evaluate.py", line 25, in eval_residual vec_r = pb.equations.eval_residuals(vec) File "/home/grassy/sfepy/sfepy/fem/equations.py", line 510, in eval_residuals self.evaluate(mode='weak', dw_mode='vector', asm_obj=residual) File "/home/grassy/sfepy/sfepy/fem/equations.py", line 495, in evaluate asm_obj=asm_obj) File "/home/grassy/sfepy/sfepy/fem/equations.py", line 674, in evaluate ret_status=True) File "/home/grassy/sfepy/sfepy/terms/terms.py", line 1258, in evaluate **kwargs): File "/home/grassy/sfepy/sfepy/terms/terms_base.py", line 81, in _call for ii, fargs in iter_kernel(): File "/home/grassy/sfepy/sfepy/terms/termsLinElasticity.py", line 179, in iter_kernel state=state, get_vector=self.get_vector) File "/home/grassy/sfepy/sfepy/terms/cache.py", line 233, in __call__ out = self._call(key, term, ih, **kwargs) File "/home/grassy/sfepy/sfepy/terms/cache.py", line 215, in _call self.update(key, term, ih, **kwargs) File "/home/grassy/sfepy/sfepy/terms/cachesBasic.py", line 92, in update print kwargs['history'] KeyError: 'history'
-- Andre
participants (2)
-
Andre Smit
-
Robert Cimrman