# Low Reynolds, Transonic, High AoA condition

Hi, i’m Sukyung

I’m using a compressible solver.
In my case, ILES is conducted on conditions with Re = 5,000~30,000 & M=0.1~0.9 & AoA= -15~+20(deg) to build aerodynamic database.

I will perform the Euler calculation and do additional calculations with the rk scheme.However, the NaN value occurs in the transonic, high angle of attack region and the analysis diverges in euler case. I tested in Re=25,000, M=0.8, AoA=10, 20(deg) conditions. Attached to the link below is the grid and setting I used. I changed the dt, added anti-aliasing, and performed the Euler calculation, but it failed.

Is this related to shock-capturing due to the occurrence of shock waves?
What additional methods can be considered to converge the simulation?

Additionally, How do you determine the appropriate pseudo-niter max value?
In other cases, the simulation does not diverge when it is max niter= 1 or 10, but I experienced divergence when it is 50. Is the results reliable when n=10?

When in the transonic regime there will be a shock on the suction surface of the wing. You’ll probably want to turn on the entropy filtering shock-capturing method.

If you’re using an implicit time integration method with dual time stepping then the best method I’ve found is to set the physical time step based on the temporal filter you want. Then you’ll want the pseudo dt to be an order of magnitude smaller, if you turn on the controller for the pseudo time stepper and p-multigrid you should get good convergence in a reasonable number of iterations. Generally, I set the minimum number of iterations to 3 and the max should be somewhere around 25 to 50.

What does temporal filter mean?

If you think of your solution in space-time, the dx limits the spatial resolution, ie it provides a spatial filter to the solution space. The dt limits the temporal resolution, ie it provides a temporal filter to the solution space.

So if you want to accurately resolve a feature with time period T, I would suggest using a dt of at least T/2.

When pseudo-dt was reduced to 1e-9 and dt was set to 1e-8, a huge amount of calculation time was predicted and the calculation diverged even though it was an Euler calculation.
So I used std without using dual time, but I couldn’t solve the problem.

Is controlling dt the best solution?

If you are running with a dt that small, then maybe try using just explicit time stepping.

But try using the entropy filter.

``````[solver]
system = navier-stokes ;compressible n-s
order = 1 ;order of polynomial solution basis
;anti-alias = flux
viscosity-correction = sutherland ;none
shock-capturing = entropy-filter ;artificial-viscosity ;none

[solver-entropy-filter]
d-min = 1e-6
p-min = 1e-6
e-tol = 1e-6
``````

When applying entropy filter with reference to [ Gradients without writing to disk - #8 by tdzanic. ], i got error like below.

``````(pyfr) sk@sk-comsik:~/python3.10/pyfr/airfoil/clf5605_DB/Re25000_M08/aoa10/p1_euler\$ mpirun -np 4 pyfr run -b cuda -p grid1.pyfrm Re25000_M08_euler.ini
Traceback (most recent call last):
File "/home/sk/python3.10/pyfr/bin/pyfr", line 8, in <module>
sys.exit(main())
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/__main__.py", line 118, in main
args.process(args)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/__main__.py", line 251, in process_run
_process_common(
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/__main__.py", line 236, in _process_common
solver = get_solver(backend, rallocs, mesh, soln, cfg)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/solvers/__init__.py", line 16, in get_solver
return get_integrator(backend, systemcls, rallocs, mesh, initsoln, cfg)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/integrators/__init__.py", line 36, in get_integrator
return integrator(backend, systemcls, rallocs, mesh, initsoln, cfg)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/integrators/dual/phys/controllers.py", line 8, in __init__
super().__init__(*args, **kwargs)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/integrators/dual/phys/steppers.py", line 16, in __init__
super().__init__(*args, **kwargs)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/integrators/dual/phys/base.py", line 16, in __init__
self.pseudointegrator = get_pseudo_integrator(
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/integrators/dual/pseudo/__init__.py", line 76, in get_pseudo_integrator
return pseudointegrator(backend, systemcls, rallocs, mesh,
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/integrators/dual/pseudo/pseudocontrollers.py", line 11, in __init__
super().__init__(*args, **kwargs)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/integrators/dual/pseudo/base.py", line 51, in __init__
self.system = systemcls(backend, rallocs, mesh, initsoln,
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/solvers/base/system.py", line 35, in __init__
eles, elemap = self._load_eles(rallocs, mesh, initsoln, nregs, nonce)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/solvers/base/system.py", line 122, in _load_eles
ele.set_backend(self.backend, nregs, nonce, linoff)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/solvers/navstokes/elements.py", line 34, in set_backend
super().set_backend(*args, **kwargs)
File "/home/sk/python3.10/pyfr/lib/python3.10/site-packages/pyfr/solvers/baseadvecdiff/elements.py", line 147, in set_backend
raise ValueError('Invalid shock capturing scheme')
ValueError: Invalid shock capturing scheme
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 1 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------

``````

Do I need a version or action to use entropy filters? I’ve only used the artificial viscosity method.

The entropy filter is only available in the latest develop version of PyFR.

Regards, Freddie.

I couldn’t check because the file on github was different from the one using pip install.
The latest release version of github was installed using setup.py .

The conversion of the .msh file to the .pyfrm file was successful. However, the following error occurs during the partition process. Currently I’m using pointwise to export a grid in the form of a gmsh solver. (p=4)

``````(pyfr) sk@sk-comsik:~/test/pyfr/airfoil/p1_euler\$ pyfr partition 4 grid1.pyfrm .Traceback (most recent call last):
File "/home/sk/test/pyfr/bin/pyfr", line 33, in <module>
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/__main__.py", line 125, in main
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/__main__.py", line 171, in process_partition
ValueError: Missing element weights for: pri, hex

``````

In addition, when the analysis was performed using a grid that previously successfully performed the calculation by applying the artificial viscosity method, the following error occurs.

``````(pyfr) sk@sk-comsik:~/test/pyfr/airfoil/p1_euler\$ mpirun -np 4 pyfr run -b cuda -p grid1.pyfrm Re25000_M08_euler.ini
Traceback (most recent call last):
File "/home/sk/test/pyfr/bin/pyfr", line 33, in <module>
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/__main__.py", line 125, in main
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/__main__.py", line 269, in process_run
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/__main__.py", line 254, in _process_common
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/__init__.py", line 14, in get_solver
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/__init__.py", line 34, in get_integrator
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/dual/phys/controllers.py", line 6, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/dual/phys/steppers.py", line 14, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/dual/phys/base.py", line 14, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/dual/pseudo/__init__.py", line 74, in get_pseudo_integrator
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/dual/pseudo/pseudocontrollers.py", line 9, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/dual/pseudo/base.py", line 49, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/base/system.py", line 34, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/base/system.py", line 123, in _load_eles
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/navstokes/elements.py", line 32, in set_backend
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/euler/elements.py", line 98, in set_backend
ValueError: Entropy filter requires flux points to be a subset of solution points or a convex combination thereof.
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 1 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
``````

In the 2d shock tube example, it was confirmed that this problem did not occur. What can i do for this situation?

``````(pyfr) sk@sk-comsik:~/test/pyfr/PyFR-Test-Cases-main/2d-viscous-shock-tube\$ pyfr import viscous-shock-tube.msh viscous-shock-tube.pyfrm
(pyfr) sk@sk-comsik:~/test/pyfr/PyFR-Test-Cases-main/2d-viscous-shock-tube\$ pyfr partition 2 viscous-shock-tube.pyfrm .
(pyfr) sk@sk-comsik:~/test/pyfr/PyFR-Test-Cases-main/2d-viscous-shock-tube\$
``````

A new feature that was added in the current version of the develop branch is that now when you partition you have to be explicit about the weighting given to each element type. This is done with the `-e` flag. You can also use the `-e balanced` which used a default balanced weighting.

Thank you for the new information. Referring to the performance tuning section of the documentation, the grid was divided as following command.

``````(pyfr) sk@sk-comsik:~/test/pyfr/airfoil/p1_euler\$ pyfr import grid_ex3.msh grid_ex3.pyfrm && pyfr partition -e hex:3 -e pri:2 4 grid_ex3.pyfrm .
``````

But,the following error message still occurs.

``````(pyfr) sk@sk-comsik:~/test/pyfr/airfoil/p1_euler\$ mpirun -np 4 pyfr run -b cuda -p grid_ex3.pyfrm entropy.ini
Traceback (most recent call last):
File "/home/sk/test/pyfr/bin/pyfr", line 33, in <module>
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/__main__.py", line 125, in main
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/__main__.py", line 269, in process_run
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/__main__.py", line 254, in _process_common
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/__init__.py", line 14, in get_solver
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/__init__.py", line 34, in get_integrator
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/std/controllers.py", line 11, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/integrators/std/base.py", line 19, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/base/system.py", line 34, in __init__
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/base/system.py", line 123, in _load_eles
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/navstokes/elements.py", line 32, in set_backend
File "/home/sk/test/pyfr/lib/python3.10/site-packages/pyfr-1.15.0-py3.10.egg/pyfr/solvers/euler/elements.py", line 98, in set_backend
ValueError: Entropy filter requires flux points to be a subset of solution points or a convex combination thereof.
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
(pyfr) sk@sk-comsik:~/test/pyfr/airfoil/p1_euler\$

``````
``````            # Check to see if running collocated solution/flux points
m0 = self.basis.m0
mrowsum = np.max(np.abs(np.sum(m0, axis=1) - 1.0))
if np.min(m0) < -1e-8 or mrowsum > 1e-8:
raise ValueError('Entropy filter requires flux points to be a '
'subset of solution points or a convex '
'combination thereof.')
``````

I attach the grid file and the setting file that I used. A grid was created and exported using “fidelity pointwise 2022.2”. What steps should be taken to address these issues?
As the example file is calculated, it seems that there is a problem in post-processing of my grid.

grid_ex3.pw

entropy.ini

I think the error message is pretty informative about what the issue is: “Entropy filter requires flux points to be a subset of solution points or a convex combination thereof”

So for a quad element with line interfaces the natural choice is Gauss–Legendre–Lobatto points for both.

I applied Gauss-legendre-lobato to the guad element as you suggested. However, the same error as " ValueError: Entropy filter requires flux points to be a subset of solution points or a convex combination thereof. " occurs.

I share my grid_ex3.msh file and entropy2.ini file additionally. Can you check if my entropy2.ini runs on your computer?

I still don’t know what the problem is. I’m just sorry to bother you.

``````[solver-interfaces]
riemann-solver = hllc
ldg-beta = 0.5
ldg-tau = 0.1

[solver-interfaces-line]
flux-pts = gauss-legendre-lobatto

[solver-interfaces-tri]
flux-pts = williams-shunn

flux-pts = gauss-legendre-lobatto

[solver-elements-tri]
flux-pts = williams-shunn

flux-pts = gauss-legendre-lobatto

[solver-elements-hex]
soln-pts = gauss-legendre-lobatto

[solver-elements-tet]
soln-pts = shunn-ham

[solver-elements-pri]
soln-pts = williams-shunn~gauss-legendre-lobatto

[solver-elements-pyr]
soln-pts = gauss-legendre-lobatto
``````

### entropy2.ini

The error message is telling you that you still have point sets that don’t satisfy that condition. In your case, this is caused by the Williams–Shunn quadrature. Instead, you should try the `alpha-opt` point set.

Do you mean α-objects? and how can it be tried?

For example:

``````[solver-elements-tri]
flux-pts = alpha-opt
``````

I applied it as

``````[solver-elements-tri]
flux-pts = alpha-opt ;williams-shunn
I applied ` flux-pts = alpha-opt` to tri, tet, and pri in the same way, but the same error occurs.