How to set the initial condition?

Dear all,

I’m trying to solve supersonic cavity flow case at Mach 2.0 using PyFR 1.6.0. The attached files are mesh files and case setup file for the simulation. I would like to set zero velocity inside cavity region (Y <= 0), and uniform velocity (2.366431913, 0) with smooth velocity transition from non-slip wall in upper cavity region (Y > 0).

How can we set the velocity distribution in [soln-ics] section of ini file?

Best regards,
Junichi

cavity_2d_170515.msh (620 KB)

cavity_2d_170515.pyfrm (830 KB)

cavity_2d.ini (1.93 KB)

Hi Junichi,

The initial conditions can be a function of the spatial coordinates. In
order to create a smooth step you can use a hyperbolic tangent.

Regards, Freddie.

1 Like

Hi Freddie,

Thank you for your advice.

I set the initial velocity distribution using hyperbolic tangent function, and could run the case.

Current issues are shock wave generation from bottom of inlet as shown in the attached figure and termination of simulation job with an error message “RuntimeError: Minimum sized time step rejected”. I’m trying to solve the issue.

Thanks and regards,
Junichi

2017年5月15日月曜日 23時07分32秒 UTC+9 Freddie Witherden:

cavity_2d.ini (2.03 KB)

Hi Junichi,

Thanks for trying out PyFR.

I set the initial velocity distribution using hyperbolic tangent function, and could run the case.

Great!

Current issues are shock wave generation from bottom of inlet as shown in the attached figure and termination of simulation job with an error message “RuntimeError: Minimum sized time step rejected”. I’m trying to solve the issue.

May require some tuning of the artificial viscosity parameters - which can be a bit fiddly.

Cheers

Peter

Dear Peter,

I apologize for the late reply.

I could extend total simulation time by adjusting the artificial viscosity parameter, velocity distribution of initial condition and inlet boundary condition, although I have still got the same error message “RuntimeError: Minimum sized time step rejected”. It seems that unphysical pressure or density distribution at the bottom right corner of cavity at the last time step is cause of the error. I will try to make the mesh at the region finer.

Best regards,
Junichi

2017年5月16日火曜日 23時44分29秒 UTC+9 Vincent, Peter E:

cavity_2d_density.mp4 (2.33 MB)

cavity_2d_velocity.mp4 (1.57 MB)

cavity_2d.ini (2.15 KB)

cavity_2d.log (46.4 KB)

cavity_2d_170515.pyfrm (830 KB)

2 posts were split to a new topic: Setting the initial condition from a file?