Blowing and suction on wall boundary conditions

Hello,

I would like to simulate with PyFR the flow around a cylinder with blowing and suction on the wall. I saw that in the user guide of PyFR, for the wall boundary conditions, it was only possible to specify the velocity with a float.

Thus, is there a way to specify blowing/suction conditions on the wall which could depend on the position and the time ?

Kind regards,
Anthony Larroque

Hi Anthony,

Yes. Expressions, which can be functions of space and time, are
permitted in boundary conditions in addition to floats.

Regards, Freddie.

Dear Freddie,

Thank you very much for your answer.

However, it does not seem to work with my setup.

I am using the last version of PyFR that I found on: https://github.com/vincentlab/PyFR and run the example of the cylinder with simply adding in the inc_cylinder_2d.ini the velocities u = 0.1x and v=0.1x in the [soln-bcs-wall] to try an expression that depends on space.

When I set a constant for the velocities like u = 0.1 and v = 0.1, I do not have a problem to run the simulation. However, with the expressions mentioned before, I have the following error message:

Traceback (most recent call last):
File "/home/anthony/anaconda3/bin/pyfr", line 11, in <module>
load_entry_point('pyfr==1.8.0', 'console_scripts', 'pyfr')()
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/__main__.py", line 110, in main
args.process(args)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/__main__.py", line 235, in process_run
args, NativeReader(args.mesh), None, Inifile.load(args.cfg)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/__main__.py", line 216, in _process_common
solver = get_solver(backend, rallocs, mesh, soln, cfg)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/solvers/__init__.py", line 16, in get_solver
return get_integrator(backend, systemcls, rallocs, mesh, initsoln, cfg)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/__init__.py", line 36, in get_integrator
return integrator(backend, systemcls, rallocs, mesh, initsoln, cfg)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/phys/controllers.py", line 8, in __init__
super().__init__(*args, **kwargs)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/phys/steppers.py", line 8, in __init__
super().__init__(*args, **kwargs)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/phys/base.py", line 19, in __init__
initsoln, cfg, self._stepper_coeffs, self._dt
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/pseudo/__init__.py", line 16, in get_pseudo_integrator
initsoln, cfg, tcoeffs, dt)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/pseudo/multip.py", line 112, in __init__
initsoln, cfg, tcoeffs, dt)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/pseudo/pseudocontrollers.py", line 98, in __init__
super().__init__(*args, **kwargs)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/pseudo/pseudocontrollers.py", line 12, in __init__
super().__init__(*args, **kwargs)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/pseudo/pseudosteppers.py", line 231, in __init__
super().__init__(*args, **kwargs)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/pseudo/pseudosteppers.py", line 190, in __init__
super().__init__(*args, **kwargs)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/integrators/dual/pseudo/base.py", line 51, in __init__
nregs=self.nregs, cfg=cfg)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/solvers/base/system.py", line 60, in __init__
bc_inters = self._load_bc_inters(rallocs, mesh, elemap)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/solvers/base/system.py", line 157, in _load_bc_inters
self.cfg)
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/solvers/acnavstokes/inters.py", line 98, in __init__
self._tpl_c['v'] = self._eval_opts('uvw'[:self.ndims], default='0')
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/solvers/baseadvec/inters.py", line 96, in _eval_opts
return [npeval(cfg.getexpr(sect, k, default), cc) for k in opts]
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/solvers/baseadvec/inters.py", line 96, in <listcomp>
return [npeval(cfg.getexpr(sect, k, default), cc) for k in opts]
File "/home/anthony/anaconda3/lib/python3.6/site-packages/pyfr/nputil.py", line 81, in npeval
return eval(expr, _npeval_syms, locals)
File "<string>", line 1, in <module>
TypeError: 'NoneType' object is not subscriptable

Am I doing something wrong ? Do the expressions depending on space and time work with all the types of wall boundary conditions or with only a few of them ?

Kind regards,
Anthony Larroque

Hi Anthony,

Thank you very much for your answer.

However, it does not seem to work with my setup.

I am using the last version of PyFR that I found on:
GitHub - PyFR/PyFR: PyFR and run the example of the cylinder
with simply adding in the inc_cylinder_2d.ini the velocities u = 0.1*x
and v=0.1*x in the [soln-bcs-wall] to try an expression that depends on
space.

When I set a constant for the velocities like u = 0.1 and v = 0.1, I do
not have a problem to run the simulation. However, with the expressions

So looking through the code it appears as if the no-slp-wall boundary
condition for the incompressible Navier-Stokes solver has not yet been
updated to include support for expressions.

This should not be too difficult to fix and I will see if I can get it
into the next release.

For the moment your best bet is to switch to the compressible solver
which does support this.

Regards, Freddie.

Hi Freddie,

Thank you very much for your answer.

Indeed, it works well with the compressible solver.

Regards,
Anthony Larroque