Hi sfepy expert,
I tried 1 hexa analysis with the attached file, but encountered the error below. The error seems due to unmatched load shape. Coud you give me an instruction? Best regards,
Takuo
$python linear_elastic_1hexa.py f Material:f constant_names: set() datas: dict with keys: [] extra_args: dict with keys: [] flags: dict with keys: [] function: ConstantFunction:get_constants_val is_constant: True kind: time-dependent mode: None name: f special_names: set() sfepy: saving regions as groups... sfepy: Omega sfepy: origin sfepy: xyz010 sfepy: xyz001 sfepy: xyz011 sfepy: xyz100 sfepy: x1 sfepy: ...done sfepy: updating variables... sfepy: ...done sfepy: setting up dof connectivities... sfepy: ...done in 0.00 s sfepy: matrix shape: (71, 71) sfepy: assembling matrix graph... sfepy: ...done in 0.00 s sfepy: matrix structural nonzeros: 5041 (1.00e+00% fill) sfepy: updating variables... sfepy: ...done sfepy: updating materials... sfepy: m sfepy: f sfepy: ...done in 0.00 s sfepy: allowed argument shapes for term "-1.0 * dw_point_load.0.x1(f.val, v)": sfepy: [{'material': '.: N', 'virtual': ('N', None)}] sfepy: actual argument shapes: sfepy: {"material:('f', 'val')": (0, 0, 0, 0), 'virtual:v': (3,)} sfepy: giving up! Traceback (most recent call last): File "linear_elastic_1hexa.py", line 93, in <module> state = pb.solve(status=status) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/problem.py", line 1414, in solve status=status) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/solvers/ts_solvers.py", line 34, in _standard_ts_call status=status, **kwargs) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/solvers/ts_solvers.py", line 73, in __call__ vec = nls(vec0) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/solvers/nls.py", line 257, in __call__ vec_r = fun(vec_x) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/evaluate.py", line 73, in eval_residual vec_r = self.problem.equations.eval_residuals(vec) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/equations.py", line 701, in eval_residuals self.evaluate(mode='weak', dw_mode='vector', asm_obj=out) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/equations.py", line 634, in evaluate term_mode=term_mode, asm_obj=asm_obj) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/equations.py", line 853, in evaluate ret_status=True) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/terms/terms.py", line 1436, in evaluate self.check_shapes(*args) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/terms/terms.py", line 1274, in check_shapes % term_str) ValueError: wrong arguments shapes for "-1.0 * dw_point_load.0.x1(f.val, v)" term! (see above) $
Hi Takuo,
you need to define the point load "material" as follows:
f = Material('f', values={'.val' : [0.25, 0, 0]})
Also increase the elastic term quadrature order to be 2 times the approximation order:
integral1 = Integral('i1', order=4)
Then the example should work.
r.
On 8/31/20 3:57 PM, Takuo Fujita wrote:
Hi sfepy expert,
I tried 1 hexa analysis with the attached file, but encountered the error below. The error seems due to unmatched load shape. Coud you give me an instruction? Best regards,
Takuo
$python linear_elastic_1hexa.py f Material:f constant_names: set() datas: dict with keys: [] extra_args: dict with keys: [] flags: dict with keys: [] function: ConstantFunction:get_constants_val is_constant: True kind: time-dependent mode: None name: f special_names: set() sfepy: saving regions as groups... sfepy: Omega sfepy: origin sfepy: xyz010 sfepy: xyz001 sfepy: xyz011 sfepy: xyz100 sfepy: x1 sfepy: ...done sfepy: updating variables... sfepy: ...done sfepy: setting up dof connectivities... sfepy: ...done in 0.00 s sfepy: matrix shape: (71, 71) sfepy: assembling matrix graph... sfepy: ...done in 0.00 s sfepy: matrix structural nonzeros: 5041 (1.00e+00% fill) sfepy: updating variables... sfepy: ...done sfepy: updating materials... sfepy: m sfepy: f sfepy: ...done in 0.00 s sfepy: allowed argument shapes for term "-1.0 * dw_point_load.0.x1(f.val, v)": sfepy: [{'material': '.: N', 'virtual': ('N', None)}] sfepy: actual argument shapes: sfepy: {"material:('f', 'val')": (0, 0, 0, 0), 'virtual:v': (3,)} sfepy: giving up! Traceback (most recent call last): File "linear_elastic_1hexa.py", line 93, in <module> state = pb.solve(status=status) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/problem.py", line 1414, in solve status=status) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/solvers/ts_solvers.py", line 34, in _standard_ts_call status=status, **kwargs) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/solvers/ts_solvers.py", line 73, in __call__ vec = nls(vec0) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/solvers/nls.py", line 257, in __call__ vec_r = fun(vec_x) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/evaluate.py", line 73, in eval_residual vec_r = self.problem.equations.eval_residuals(vec) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/equations.py", line 701, in eval_residuals self.evaluate(mode='weak', dw_mode='vector', asm_obj=out) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/equations.py", line 634, in evaluate term_mode=term_mode, asm_obj=asm_obj) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/discrete/equations.py", line 853, in evaluate ret_status=True) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/terms/terms.py", line 1436, in evaluate self.check_shapes(*args) File "/home/pyontaku14/anaconda3/lib/python3.7/site-packages/sfepy/terms/terms.py", line 1274, in check_shapes % term_str) ValueError: wrong arguments shapes for "-1.0 * dw_point_load.0.x1(f.val, v)" term! (see above) $
SfePy mailing list -- sfepy@python.org To unsubscribe send an email to sfepy-leave@python.org https://mail.python.org/mailman3/lists/sfepy.python.org/ Member address: cimrman3@ntc.zcu.cz