CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   cfd code using mac cormack scheme (https://www.cfd-online.com/Forums/main/254843-cfd-code-using-mac-cormack-scheme.html)

davidacker March 4, 2024 11:08

cfd code using mac cormack scheme
 
Hello,
I've written a cfd code. I used mac cormack scheme. But, the answers are not what I've expected.
When CFL=1, it should give exact solution. But, it's amplitude is damped and its charactristic lines changed their directions,by the way the initial condition is sin(pi(x)) when x is between 0 and 2 and 1 when x is between 2 and 5.

Do I miss any step? How can I get the exact solution I've expected?
Thanks in advance

geometry dash scratch


All times are GMT -4. The time now is 14:31.