implementation of upwind scheme in MATLAB

조회 수: 30 (최근 30일)
nathan blanc
nathan blanc 2021년 12월 21일
More of a CFD or numerical analysis question than a proper MATLAB question but I will try my luck.
I am trying to implement an upwind scheme in MATLAB, in order to solve a 1D compressible navier stokes equation, with a periodic boundary condition:
I am trying to perform the spatial diffrentiation using an upwind scheme, see the attahced file "upWindDiffv2". the scheme should be TVD or numericaly stable but it isn't, I get substantial numerical oscilations and the code diverges. see the attached file "main", it includes a "video" of the solution where the solution clearly diverges.
I am performing the temporal integration using eulers method. I tried other temporal integration methods and they did not work either. note that the CFL criterion is more than satisfied.
I am not sure what I am doing wrong. would be thankfull for any assistance.
Nathan

답변 (0개)

카테고리

Help CenterFile Exchange에서 Computational Fluid Dynamics (CFD)에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by