On 07/17/2014 06:21 AM, Ouyang wrote:
Hi there,
My previous message might not be straight.
The point-load-cube model is shown in the attached figure in https://groups.google.com/forum/#!topic/sfepy-devel/lBFi4LvHXZY
The Simulation started with "simple.py" works with the definition: materials = {'Load' : ({'.val' : [0.0,0.0, -100000.0]},),} equations = {'eq_1' : """dw_lin_elastic_iso.2.Omega( m.lam, m.mu, v, u ) = dw_point_load.0.Topload(Load.val, v)""",}
I have answered in the previous e-mail - just note the '.' in '.val' (special material parameter). The interactive use is under-documented in this respect.
r.
But Something is wrong when I follow the interactive example at: http://sfepy.org/doc-devel/tutorial.html#interactive-example-linear-elastici... with definition for the point load:
# point load is appled at vertex 4 topload= domain.create_region('Topload', 'vertex 4', 'vertex') f = Material('f', val= [[0.0],[0.0], [-100000.0]]) integral0 = Integral('i0', order=0)
t3 = Term.new('dw_point_load(f.val, v)', integral0, topload, f=f, v=v) ....
I dig into sfepy/terms/terms.py and do not see any error from the staticmethod new() in class Term for creating "dw_point_load" object.
Any suggestions would be appreciated very much.
Thanks a lot in advance.
Ouyang
On Wednesday, July 16, 2014 11:15:41 AM UTC+8, Ouyang wrote:
Hi there,
I followed the interactive example in sfepy tutorial and wrote my custom simulation script for the block domain with body force (t2 term). That works. But for the point loaded block model (t3 term), I can't make it work. The script stopped at "assert_(mat.shape[-1]==virtual.dim)" of terms_point.py with IndexError: tuple index out of range. Searching the web does not find help information for this.
The reason I write the attached custom simulation script is that I failed doing the things below: the "non-custom" script for a point loaded block running with "simple.py" works and gmsh can mesh different geometries. I would like to finish those two things together in python like "os.system('gmsh ........')", and "os.system('simple.py examples/myscript.py") but errors to import config in simple.py got me there since "path" settings for import in simple.py seems a little complicated for me. The custom simulation script might be easier to setup import "path" for me.
Thanks for your help.
ouyang