# Blasius velocity profile at inlet

**URL:** <https://pyfr.discourse.group/t/blasius-velocity-profile-at-inlet/1253>\
**Category:** Just Starting\
**Created:** [24 April 2025 15:25 UTC](https://pyfr.discourse.group/t/blasius-velocity-profile-at-inlet/1253 "2025-04-24T15:25:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iagyonwu](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/iagyonwu/32/711_2.png) [@iagyonwu](https://pyfr.discourse.group/u/iagyonwu)\
**Post date:** [24 April 2025 15:25 UTC](https://pyfr.discourse.group/t/blasius-velocity-profile-at-inlet/1253/1 "2025-04-24T15:25:05Z")

</div>

Hello,  
I want to simulate a boundary layer flow over a flat plate. The inlet is a Blasius profile, which can be calculated for the specific Re\_x needed. I tried to load the data from an external file for the .ini file, but it seems not possible. Does anyone how can I deal with this BC?

Best regards,  
Yongxiang

---

<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:** [24 April 2025 17:13 UTC](https://pyfr.discourse.group/t/blasius-velocity-profile-at-inlet/1253/2 "2025-04-24T17:13:54Z")

</div>

Boundary conditions need to be functions. For a Blasius profile this should not be a problem with accurate approximations to the analytic solution being readily available.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![iagyonwu](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/iagyonwu/32/711_2.png) [@iagyonwu](https://pyfr.discourse.group/u/iagyonwu)\
**Post date:** [24 April 2025 18:34 UTC](https://pyfr.discourse.group/t/blasius-velocity-profile-at-inlet/1253/3 "2025-04-24T18:34:30Z")

</div>

Hello Freddie,  
Thanks for your quick reply. As far as I understand, there are two ways to set up the Blasius profile at the inlet:

1. code the self-similarity solution at the soln-bcs-inlet section. But it needs an iterative operation. Is the Python code in the ini file allowed?
2. Pre-calculate the velocity profile and save it in an external file. But is loading data from external file in the ini file possible?

Best regards,  
Yongxiang

---

<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:** [24 April 2025 19:29 UTC](https://pyfr.discourse.group/t/blasius-velocity-profile-at-inlet/1253/4 "2025-04-24T19:29:39Z")

</div>

Take your pre-calculated data and fit an expression to it. Then use this expression.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![iagyonwu](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/iagyonwu/32/711_2.png) [@iagyonwu](https://pyfr.discourse.group/u/iagyonwu)\
**Post date:** [30 April 2025 13:37 UTC](https://pyfr.discourse.group/t/blasius-velocity-profile-at-inlet/1253/5 "2025-04-30T13:37:23Z")

</div>

Hello Freddie,  
Thanks very much for your suggestion. I have made my Blasius test case running. This is laminar boundary layer test case, so that I can fit my inlet profile and use the expression at the inlet BC. However, in the future, I may like to generate a turbulent inlet BC using one the synthetic eddy method. In this case, we can no longer use any explicit expression. In this case, how would I set the inlet BC?

Best regards,  
Yongxiang

---

<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:** [30 April 2025 14:10 UTC](https://pyfr.discourse.group/t/blasius-velocity-profile-at-inlet/1253/6 "2025-04-30T14:10:38Z")

</div>

If you want to generate inflow turbulence the recommended approach is to use the turbulence generation plugin. This has shown itself to be vastly superior to boundary condition based approaches.

Regards, Freddie.
