# Synthetic turbulence

**URL:** <https://pyfr.discourse.group/t/synthetic-turbulence/973>\
**Category:** General\
**Tags:** plugins\
**Created:** [3 November 2023 14:57 UTC](https://pyfr.discourse.group/t/synthetic-turbulence/973 "2023-11-03T14:57:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amirshau](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@Amirshau](https://pyfr.discourse.group/u/Amirshau)\
**Post date:** [3 November 2023 14:57 UTC](https://pyfr.discourse.group/t/synthetic-turbulence/973/1 "2023-11-03T14:57:04Z")

</div>

Hello everyone,

are there any news regarding synthetic turbulence generation as an official pyfr feature and that works with v1.15? or with a new version of PyFR?

Best regards,  
Amir

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [3 November 2023 15:02 UTC](https://pyfr.discourse.group/t/synthetic-turbulence/973/2 "2023-11-03T15:02:31Z")

</div>

This feature is now merged into the develop branch on git. We are working on finalising the new features before making a new PyFR release, but the develop branch is stable and you can use that.

---

<div class="post-metadata">

**Author:** ![Amirshau](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@Amirshau](https://pyfr.discourse.group/u/Amirshau)\
**Post date:** [4 November 2023 10:02 UTC](https://pyfr.discourse.group/t/synthetic-turbulence/973/3 "2023-11-04T10:02:26Z")

</div>

Thanks Will.  
I’ve modified all the ‘Turbulent inflow plugin’ files from github, but the following massage is occur after typing a commend:

```python
Traceback (most recent call last):
  File "/home/anaconda3/envs/pyfr-venv/bin/pyfr", line 5, in <module>
    from pyfr. __main__ import main
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/ __main__.py", line 20, in <module>
    from pyfr.solvers import get_solver
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/solvers/ __init__.py", line 3, in <module>
    from pyfr.integrators import get_integrator
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/integrators/ __init__.py", line 5, in <module>
    from pyfr.integrators.dual.phys import BaseDualController, BaseDualStepper
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/integrators/dual/phys/ __init__.py", line 3, in <module>
    from pyfr.integrators.dual.phys.controllers import BaseDualController
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/integrators/dual/phys/controllers.py", line 3, in <module>
    from pyfr.integrators.dual.phys.base import BaseDualIntegrator
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/integrators/dual/phys/base.py", line 5, in <module>
    from pyfr.integrators.base import BaseIntegrator
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/integrators/base.py", line 13, in <module>
    from pyfr.plugins import get_plugin
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/plugins/ __init__.py", line 1, in <module>
    from pyfr.plugins.ascent import AscentPlugin
  File "/home/anaconda3/envs/pyfr-venv/lib/python3.9/site-packages/pyfr/plugins/ascent.py", line 71
    match value:
          ^
SyntaxError: invalid syntax

```

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [5 November 2023 13:26 UTC](https://pyfr.discourse.group/t/synthetic-turbulence/973/4 "2023-11-05T13:26:29Z")

</div>

The current develop version of PyFR requires Python 3.10 or newer.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![Amirshau](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@Amirshau](https://pyfr.discourse.group/u/Amirshau)\
**Post date:** [7 November 2023 14:18 UTC](https://pyfr.discourse.group/t/synthetic-turbulence/973/5 "2023-11-07T14:18:52Z")

</div>

Hello Freddie,

After performing all the required modifications, I keep getting the following error (I also tried different meshes but I’m getting the same error):

```python
Traceback (most recent call last):
  File "/home/anaconda3/envs/pyfr-venv1/bin/pyfr", line 8, in <module>
    sys.exit(main())
  File "/home/csp/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/ __main__.py", line 125, in main
    args.process(args)
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/ __main__.py", line 272, in process_run
    _process_common(
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/ __main__.py", line 257, in _process_common
    solver = get_solver(backend, rallocs, mesh, soln, cfg)
  File "/home/csp/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/solvers/ __init__.py", line 14, in get_solver
    return get_integrator(backend, systemcls, rallocs, mesh, initsoln, cfg)
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/integrators/ __init__.py", line 34, in get_integrator
    return integrator(backend, systemcls, rallocs, mesh, initsoln, cfg)
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/integrators/dual/phys/controllers.py", line 6, in __init__
    super(). __init__ (*args, **kwargs)
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/integrators/dual/phys/steppers.py", line 14, in __init__
    super(). __init__ (*args, **kwargs)
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/integrators/dual/phys/base.py", line 14, in __init__
    self.pseudointegrator = get_pseudo_integrator(
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/integrators/dual/pseudo/ __init__.py", line 27, in get_pseudo_integrator
    return DualMultiPIntegrator(backend, systemcls, rallocs, mesh,
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/integrators/dual/pseudo/multip.py", line 111, in __init__
    self.pintgs[l] = lpsint(
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/integrators/dual/pseudo/pseudocontrollers.py", line 87, in __init__
    super(). __init__ (*args, **kwargs)
  File "/home/anaconda3/envs/pyfr-venv1/lib/python3.10/site-packages/pyfr/integrators/dual/pseudo/pseudocontrollers.py", line 12, in __init__
    self.system.elementscls.validate_formulation(self)
TypeError: BaseElements.validate_formulation() missing 2 required positional arguments: 'intg' and 'cfg'

```

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [7 November 2023 20:38 UTC](https://pyfr.discourse.group/t/synthetic-turbulence/973/6 "2023-11-07T20:38:20Z")

</div>

Please switch to develop version of PyFR proper. The plugin depends on a lot of extra functionality that was added to the core codebase since 1.15.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [27 November 2023 14:30 UTC](https://pyfr.discourse.group/t/synthetic-turbulence/973/7 "2023-11-27T14:30:38Z")

</div>

A post was split to a new topic: [Synthetic turbulence: unknown type name ‘uint32\_t’](https://pyfr.discourse.group/t/synthetic-turbulence-unknown-type-name-uint32-t/1005)
