I implemented the correction and there is still some problem:

sfepy: left over: ['verbose', '__builtins__', '__file__', 'absolute_import', '__name__', 'data_dir', '__package__', '_filename', '__doc__']
sfepy: reading mesh [line2, tri3, quad4, tetra4, hexa8] (/home/310246696/Work/sfepy_code/pipe_flow/test_p.mesh)...
sfepy: ...done in 0.01 s
sfepy: creating regions...
sfepy:     Omega
sfepy:     Outlet
sfepy:     Inlet
sfepy:     Walls
sfepy: ...done in 0.08 s
sfepy: equation "balance":
sfepy: + dw_div_grad.i2.Omega( fluid.viscosity, v, u )
       + dw_convect.i2.Omega( v, u )
       - dw_stokes.i1.Omega( v, p ) = 0
sfepy: equation "incompressibility":
sfepy: dw_stokes.i1.Omega( u, q ) = 0
sfepy: using solvers:
                ts: no ts
               nls: newton
                ls: ls
sfepy: updating variables...
sfepy: ...done
Traceback (most recent call last):
  File "/scratch/sfepy/simple.py", line 170, in <module>
    main()
  File "/scratch/sfepy/simple.py", line 167, in main
    app()
  File "/scratch/sfepy/sfepy/applications/application.py", line 29, in call_basic
    return self.call(**kwargs)
  File "/scratch/sfepy/sfepy/applications/pde_solver_app.py", line 217, in call
    time_solver.init_time(nls_status=nls_status)
  File "/scratch/sfepy/sfepy/solvers/ts_solvers.py", line 52, in init_time
    self.problem.time_update()
  File "/scratch/sfepy/sfepy/discrete/problem.py", line 629, in time_update
    functions, create_matrix, is_matrix)
  File "/scratch/sfepy/sfepy/discrete/problem.py", line 587, in update_equations
    active_only=ac)
  File "/scratch/sfepy/sfepy/discrete/equations.py", line 287, in time_update
    active_only=active_only)
  File "/scratch/sfepy/sfepy/discrete/variables.py", line 413, in equation_mapping
    problem=problem)
  File "/scratch/sfepy/sfepy/discrete/variables.py", line 1462, in equation_mapping
    problem=problem, warn=warn)
  File "/scratch/sfepy/sfepy/discrete/common/dof_info.py", line 351, in map_equations
    fun = get_condition_value(val, functions, 'EBC', bc.name)
  File "/scratch/sfepy/sfepy/discrete/conditions.py", line 24, in get_condition_value
    % (val, kind, name))
ValueError: unknown function 0 given for EBC Outlet!

I have tried some other values of pressure as well, and the same thing happens.


On Friday, September 2, 2016 at 1:28:03 PM UTC+2, Robert Cimrman wrote:
Hi Nikhil,

fix your pressure condition ebc_3 - use

'dofs' : {'p.0' : 0,},

- the component (.0 or .all) has to be specified even for scalar field variables.

r.

On 09/01/2016 04:51 PM, Nikhil Vaidya wrote:
> Hi,
>
> I am trying to solve a simple incompressible steady flow in a pipe.
> Attached are the setup file and mesh. I want to specify a inlet velocity
> and an outlet pressure. But I get the following error when I do so:
>
> sfepy: left over: ['verbose', '__builtins__', '__file__',
> 'absolute_import', '__name__', 'data_dir', '__package__', '_filename',
> '__doc__']
> sfepy: reading mesh [line2, tri3, quad4, tetra4, hexa8]
> (C:\Users\310246696\OneDrive -
> Philips\Thesis_Work\sfepy_testcase\pipe_flow_test\test_p.mesh)...
> sfepy: ...done in 0.01 s
> sfepy: creating regions...
> sfepy:     Omega
> sfepy:     Outlet
> sfepy:     Inlet
> sfepy:     Walls
> sfepy: ...done in 0.03 s
> sfepy: equation "balance":
> sfepy: + dw_div_grad.i2.Omega( fluid.viscosity, v, u )
>        + dw_convect.i2.Omega( v, u )
>        - dw_stokes.i1.Omega( v, p ) = 0
> sfepy: equation "incompressibility":
> sfepy: dw_stokes.i1.Omega( u, q ) = 0
> sfepy: using solvers:
>                 ts: no ts
>                nls: newton
>                 ls: ls
> sfepy: updating variables...
> sfepy: ...done
> Traceback (most recent call last):
>   File "C:\sfepy\simple.py", line 170, in <module>
>     main()
>   File "C:\sfepy\simple.py", line 167, in main
>     app()
>   File "C:\sfepy\sfepy\applications\application.py", line 29, in call_basic
>     return self.call(**kwargs)
>   File "C:\sfepy\sfepy\applications\pde_solver_app.py", line 217, in call
>     time_solver.init_time(nls_status=nls_status)
>   File "C:\sfepy\sfepy\solvers\ts_solvers.py", line 52, in init_time
>     self.problem.time_update()
>   File "C:\sfepy\sfepy\discrete\problem.py", line 629, in time_update
>     functions, create_matrix, is_matrix)
>   File "C:\sfepy\sfepy\discrete\problem.py", line 587, in update_equations
>     active_only=ac)
>   File "C:\sfepy\sfepy\discrete\equations.py", line 287, in time_update
>     active_only=active_only)
>   File "C:\sfepy\sfepy\discrete\variables.py", line 413, in equation_mapping
>     problem=problem)
>   File "C:\sfepy\sfepy\discrete\variables.py", line 1458, in
> equation_mapping
>     bcs.canonize_dof_names(self.dofs)
>   File "C:\sfepy\sfepy\discrete\conditions.py", line 129, in
> canonize_dof_names
>     cond.canonize_dof_names(dofs)
>   File "C:\sfepy\sfepy\discrete\conditions.py", line 190, in
> canonize_dof_names
>     self.dofs[0] = _canonize(self.dofs[0], dofs)
>   File "C:\sfepy\sfepy\discrete\conditions.py", line 150, in _canonize
>     vname, dd = dofs.split('.')
> ValueError: need more than 1 value to unpack
>
> Commercial simulation tools, e.g. Starccm+ allow the definition of velocity
> inlet and pressure outlet conditions simultaneously. I would like to do the
> same with SfePy. Is this possible?
>
> Best regards,
> Nikhil
>