|
[Sponsors] |
Periodic boundary conditions for compressible Euler equations |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 9, 2017, 23:49 |
Periodic boundary conditions for compressible Euler equations
|
#1 |
Senior Member
Selig
Join Date: Jul 2016
Posts: 213
Rep Power: 10 |
Hi,
I am currently building up a 2D hydrodynamics code. Specifically, I am numerically solving the 2D Euler equations in order to simulate Kelvin-Helmholtz instability. The boundary conditions are periodic, however I am running into issues when enforcing such conditions. Given the governing equations I define Q to be the left-hand side of the system of PDEs. As such in discrete form its a (nx,ny,4) array. Given we have periodic boundary conditions I set Q(1,1:ny,1:4) = Q(nx,1:ny,1:4) (Q(1) = Q(n) in x) Q(1:nx,1,1:4) = Q(1:nx,ny,1:4) (Q(1) = Q(n) in y) With this implementation I am not getting the desired effects of the Kelvin-Helmholtz. I conclude the error is at the boundary due to the plot. I start my arrays at 1 so my boundaries are at 1 and nx. Code:
subroutine BC (Q_out) implicit none real, dimension(nx,ny,4), intent(inout) :: Q_out Q_out(1,:,:) = Q_out(nx,:,:) Q_out(:,1,:) = Q_out(:,ny,:) return end subroutine NOTE 1: I can post my Fortran code if it will help. NOTE 2: I have tested this code on various 2D Riemann problems and I get correct results. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 13:55 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 06:20 |
Problem with SIMPLEC-like finite volume channel flow boundary conditions | ghobold | Main CFD Forum | 3 | June 15, 2015 11:14 |
PEMFC module + multiple periodic boundary conditions | vkrastev | FLUENT | 2 | December 22, 2014 04:15 |
periodic boundary conditions fro pressure | Salem | Main CFD Forum | 21 | April 10, 2013 00:44 |