Shallow Water DAE - Index may be greater than 1 ?
2 views (last 30 days)
Show older comments
Dear all,
I am trying to solve a DAE for the 1D nonlinear shallow water (SW) system of equations
where are the velocity and height field respectively.
The intial conditions are given by and in the spatial domain
. The boundary conditions are and .
The solution of this dam-break problem will produce a left-going rarefaction wave and a right-propagating shock wave.
In order to better capture the shock wave I want to solve simultaneously the SW system with a moving mesh PDE of equation , where ξ is a uniform computational mesh in [0,1] and is a density function.
By rewriting as function of I obtain the following DAE system of index 1
Now, I have discretized the system in space by finite difference method with the moving mesh in the space domain and fixed mesh in the computational domain for
I have in total a system of equations of this form
where and .
I am trying to use the MATLAB ode solver ode23t/ode15s for the system with a singular diagonal Mass matrix ( 0-th in the last N entries). Initially, the physical mesh is supposed to be uniform and v is consistent with the algebraic constraint.
After running the script I obtain the following error :
Error using daeic12 (line 76)
This DAE appears to be of index greater than 1.
Do you have idea why MATLAB does not recognize the system as index 1 ? Is it then more reasonable to write the system without the auxiliary variable v and changing the entries of the mass matrix (no longer diagonal) ?
I have also tried to solve the problem with an implicit solver ode15i by discarding the auxiliary variable v but I get the same error message when I call the decic operator for computing consistent initial conditions.
Thank you for your help.
6 Comments
Bill Greene
on 25 Nov 2019
Links to downloadable copies of the references for ode15s are at the bottom of the documentation page: ode15s.
If you post your updated m-code, I can run that and perhaps comment further.
If you describe your mesh-moving function in more detail, I might be able to say more about your approach.
I don't think that simply switching to a FVM or FEM will, by itself, improve the behavior of the solution. Looking at your FDM equations, it looks like you are using a central difference approximation to the spatial deriviatives. This is known to create spurious oscillations unless you have a very fine mesh. If you use a backward difference approximation instead (known as "upwind" in the literature) you will eliminate the oscillations but at a cost of excessive smoothing of the solution.
Answers (0)
See Also
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!