# Problem with boundary conditions

**URL:** <https://pyfr.discourse.group/t/problem-with-boundary-conditions/363>\
**Category:** General\
**Created:** [19 March 2021 10:32 UTC](https://pyfr.discourse.group/t/problem-with-boundary-conditions/363 "2021-03-19T10:32:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abertola](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@abertola](https://pyfr.discourse.group/u/abertola)\
**Post date:** [19 March 2021 10:32 UTC](https://pyfr.discourse.group/t/problem-with-boundary-conditions/363/1 "2021-03-19T10:32:46Z")

</div>

Hi all,

I tried to replicate the flow around a cylinder simulation of the paper “On the utility of GPU accelerated high-order methods for unsteady flow simulations A comparison with industry-standard tools”. The boundary conditions for inlet and outlet are:

[soln-bcs-outlet]  
type = char-riem-inv  
rho = 1  
u = 0.2366431913  
v = 0  
w = 0  
p = 1

[soln-bcs-inlet]  
type = char-riem-inv  
rho = 1  
u = 0.2366431913  
v = 0  
w = 0  
p = 1

After running the simulation, I tried to change them with:

[soln-bcs-outlet]  
type = sub-out-fp  
p = 1

[soln-bcs-inlet]  
type = sub-in-frv  
rho = 1  
u = 0.2366431913  
v = 0  
w = 0

but the simulation diverges, and I get NaN values. Why?

Thank you for your help,  
Andrea

---

<div class="post-metadata">

**Author:** ![GonzaloS](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@GonzaloS](https://pyfr.discourse.group/u/GonzaloS)\
**Post date:** [19 March 2021 15:00 UTC](https://pyfr.discourse.group/t/problem-with-boundary-conditions/363/2 "2021-03-19T15:00:01Z")

</div>

I don’t think that the description of your issue is sufficiently detailed to understand the root cause…

However, I suppose that changing your outlet BCs from _non-reflecting_ to `pressure outlet` might cause numerical instabilities.

To better diagnose your problem, you should try to output the field solution at an instant close to when NaN occur. The visualization of such solution should give you enough clues to better understand where is the issue coming from. Moreover, you could also try to tune in the time-integrator parameters to try to stabilize your simulations.

Gonzalo

---

<div class="post-metadata">

**Author:** ![bvermeir](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@bvermeir](https://pyfr.discourse.group/u/bvermeir)\
**Post date:** [22 March 2021 14:03 UTC](https://pyfr.discourse.group/t/problem-with-boundary-conditions/363/3 "2021-03-22T14:03:41Z")

</div>

Hi Andrea,

You should be able to download the mesh and input file for these cases as supplementary material from the paper online.

This will show you how to setup the boundary conditions, initial conditions, etc. and a .msh file is also there for you to inspect.

Please note this was run with an older version of PyFR, so some of the input file settings/names make have changed in newer versions.

Thanks,

---

<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:** [23 May 2021 21:59 UTC](https://pyfr.discourse.group/t/problem-with-boundary-conditions/363/4 "2021-05-23T21:59:14Z")

</div>


