|
[Sponsors] |
Difficulty with basic boundary value problem with RK4 time march |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 25, 2018, 21:01 |
Difficulty with basic boundary value problem with RK4 time march
|
#1 |
New Member
Join Date: Oct 2018
Posts: 1
Rep Power: 0 |
Hello everyone,
I am currently studying in a class for CFD and am having a lot of difficulty with getting the code (written in Matlab) for a problem to give answers that make sense. The problem is as follows: "Write a computer program to solve the one-dimensional linear convection equation with inflow-outflow boundary conditions and a=1 on the domain 0<=x<=1. Let u(0,t) = sin(wt) with w=10pi. Run until a periodic steady state is reached which is independent of the initial condition and plot your solution compared with the exact solution. Use 2nd-order centered differences in space with a 1st-order backward difference at the outflow boundary together with 4th-order Runge-Kutta time marching." I have written, and attached, a code that should be able to plot the solution. However, I am getting a diverging mess of curves in the shape of a sinusoidal wave. Is there something about the RK4 method that I am interpreting incorrectly or is there some sort of anomaly in my code? Thanks for your help in advance. |
|
Tags |
linear convection, runge-kutta |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 19:02 |
Problem with an old Simulation | FrankW | CFX | 3 | February 8, 2016 05:28 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 14:58 |