3D Navier Stokes inlet/outlet problem

This example clearly illustrated a simple application of sfepy with Navier Stokes problem.
http://sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html
The inlet/outlet definition:
region_1 = { 'name' : 'Inlet', 'select' : 'vertices by cinc0', # In 'kind' : 'facet',}region_2 = { 'name' : 'Outlet', 'select' : 'vertices by cinc1', # Out 'kind' : 'facet',} ebc_1 = { 'name' : 'Walls', 'region' : 'Walls', 'dofs' : {'u.all' : 0.0},}ebc_2 = { 'name' : 'Inlet', 'region' : 'Inlet', 'dofs' : {'u.1' : 1.0, 'u.[0,2]' : 0.0},}
This only allows the velocity inlet normal to y axis. If I have an inlet plane that is arbitrary, let say with normal fluid inlet velocity (ux,uy,uz), how should I define the inlet boundary condition?
Moreover, is there any documentation to help me understanding following functions? the syntax is quite different from the typical python one.
functions = { 'cinc0' : (lambda coors, domain=None: cinc(coors, 0),), 'cinc1' : (lambda coors, domain=None: cinc(coors, 1),),}

Hi,
look at http://sfepy.org/doc-devel/examples/large_deformation/hyperelastic.html, there is the example with the user defined function for boundary conditions.
ebcs = { 'r' : ('Right', {'u.0' : 0.0, 'u.[1,2]' : 'rotate_yz'}), }
It defines the boundary condition applied to region 'Right', where u_x=0 and u_y, u_z are given by the user function 'rotate_yx':
def rotate_yz(ts, coor, **kwargs): from sfepy.linalg import rotation_matrix2d
vec = coor[:,1:3] - centre
angle = 10.0 * ts.step
print 'angle:', angle
mtx = rotation_matrix2d( angle )
vec_rotated = nm.dot( vec, mtx )
displacement = vec_rotated - vec
return displacement.T.flat
SfePy calls this with two arguments: 'ts'= time step (not needed now) and 'coor'= coordinates of the region in which you define your own values.
Regards Vladimir
On 2015-12-09 14:43, Jacky Ko wrote:
This example clearly illustrated a simple application of sfepy with Navier Stokes problem.
http://sfepy.org/doc-devel/examples/navier_stokes/navier_stokes.html
The inlet/outlet definition:
region_1 = { 'name' : 'Inlet', 'select' : 'vertices by cinc0', # In 'kind' : 'facet', } region_2 = { 'name' : 'Outlet', 'select' : 'vertices by cinc1', # Out 'kind' : 'facet', }
ebc_1 = { 'name' : 'Walls', 'region' : 'Walls', 'dofs' : {'u.all' : 0.0}, } ebc_2 = { 'name' : 'Inlet', 'region' : 'Inlet', 'dofs' : {'u.1' : 1.0, 'u.[0,2]' : 0.0}, }
This only allows the velocity inlet normal to y axis. If I have an inlet plane that is arbitrary, let say with normal fluid inlet velocity (ux,uy,uz), how should I define the inlet boundary condition?
Moreover, is there any documentation to help me understanding following functions? the syntax is quite different from the typical python one.
functions = { 'cinc0' : (lambda coors, domain=None: cinc(coors, 0),), 'cinc1' : (lambda coors, domain=None: cinc(coors, 1),), }
-- You received this message because you are subscribed to the Google Groups "sfepy-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sfepy-devel...@googlegroups.com <mailto:sfepy-devel...@googlegroups.com>. To post to this group, send email to sfepy...@googlegroups.com <mailto:sfepy...@googlegroups.com>. Visit this group at http://groups.google.com/group/sfepy-devel.
participants (2)
-
Jacky Ko
-
Vladimír Lukeš