
Hello!
I want to set a user defined function as a boundary condition. For example,
ebc_1 = { 'ebc_inlet' : ('inlet', {'u.[0,2]' : 0, 'u.1' : myfunc}, }
myfunc(ts, coors, **kwargs): ...
what type of an object is coors? how can I write the x, y and z coordinates in terms of the variable coors?
Best regards, Nikhil

Hi Nikhil,
On 09/15/2016 02:41 PM, Nikhil Vaidya wrote:
Hello!
I want to set a user defined function as a boundary condition. For example,
ebc_1 = { 'ebc_inlet' : ('inlet', {'u.[0,2]' : 0, 'u.1' : myfunc}, }
myfunc(ts, coors, **kwargs): ...
what type of an object is coors? how can I write the x, y and z coordinates in terms of the variable coors?
Check the examples in [1]. It is an array of the coordinates, the components can be obtained simply as:
x, y, z = coors[:, 0], coors[:, 1], coors[:, 2]
r.
[1] http://sfepy.org/doc-devel/users_guide.html#functions
Best regards, Nikhil
participants (2)
-
Nikhil Vaidya
-
Robert Cimrman