- **Main CFD Forum**
(*https://www.cfd-online.com/Forums/main/*)

- - **SWE
**
(*https://www.cfd-online.com/Forums/main/5412-swe.html*)

SWE
Hi everbody
I am trying to solve the shallow water equations with boundary and initial condition using the reaxation method. The boundary conditions are u(x=0,t)=0.5 and dh/dx=0 at x=0. Initial condition are u(x,t=0)=0 and h(x,t=0)=1. The numerical solutions of SWE for h is becoming is bigger than 1. (the graph is starting 1.5) I wondering it is correct or not. Sincerely... |

Re: SWE
Why not solve the problem using Riemann invariants to find out? This will also give you something to test your solution against.
You may want to look at your boundary conditions as well; u = 1/2 on x = 0 for t>=0 and u =0 at t=0 for x>=0 - what is the value of u at x=t=0 (0 or 1/2)? |

Re: SWE
Hi Tom,
Yhank you very much for your help. I would like to ask you an other qustion. I am trying to solve some equations with source terms. Equations are linear but the coefficients and source terms depend on the numerical solutions of SWE equations. Even if I use the smooth initial and boundary conditions , at the solutions of SWE occurs the discontinous. My question is how can I compute the derivative of the numerical solutions of SWE. Thank you very much in advance... |

Re: SWE
This depends crucially on how you solve SWE numerically.
If you use finite differences (or similar) and time march then your numeric code effectively stores these derivatives already (possibly as one-sided differences at the shock). If you use characteristics on the otherhand you will need to either convert the derivatives in your linear equation into derivatives along/normal to the characteristics or convert the derivatives along the characteristics into x,t. |

All times are GMT -4. The time now is 15:38. |