Has anyone written any code fo
Has anyone written any code for the 2D shallow water equations? I have a damfailure problem I would like to simulate using a finite volume technique. I've never used OpenFOAM, but it looks like if might be fun. Any advice
regards David E. Alexander M.Sc. P.Eng 3Sigma Consulting Inc. david@3sigma.ca www.3sigma.ca 
I have just finished the code
I have just finished the code for the 2D shallow water equations. but it is tested only by a simple uniform channel flow. To following the rule of dimensionSet, I have the whole water depth as nonUint. It is a little unsatisfied.
If you need, I will share it with you. 
I hope this thread is still on
I hope this thread is still on. I am also in the initial phase of developing solver for shallow water. Would appreciate if you could share the code to me as well.

Hello!
I have developed a dep
Hello!
I have developed a depthaveraged shallow water equation model based on Foam. It is a two dimensional problem and the top and bottom suface is spesified as emptyFvPatch. however, the velocity along the z direction, U.z(), will sometime increase to a large magnitude in the computation. it is not what I expected. now, I have to limte U.z() to zero after iteratation each time step. any advices for this problem are grateful! best regard! 
Hello!
I have developed a dep
Hello!
I have developed a depthaveraged shallow water equation model based on Foam. It is a two dimensional problem and the top and bottom suface is spesified as emptyFvPatch. however, the velocity along the z direction, U.z(), will sometime increase to a large magnitude in the computation. it is not what I expected. now, I have to limte U.z() to zero after iteratation each time step. any advices for this problem are grateful! best regard! 
For shallow water equation, yo
For shallow water equation, you need to solve h (water depth), u and v (velocity in x and y direction). Do you solve them together or seperately? Or is it coupled?
For the current version of Foam, I don't think it is easy to solve shallow water equations. Another thing is you need to implement Godunov schemes and flux routines. Good luck! 
Yes, I solve h with the water
Yes, I solve h with the water surface equation modified from continuity equation. the governing equations are solved with the PISO iterating method just like the turbForm solvers in Foam.
Now it runs well except the problem of the increasing magnitude of U.z(). although the problem does not affect the result, it is not nice. Thanks 
Next, I plan to develop a thre
Next, I plan to develop a three dimensinal model for shallow water equations using sigma coordinate along the verticle direction. since the mesh of each layer is same, there are two mesh system to be chosen. one is 2D mesh and the other is a true 3D mesh.
for 2D mesh, the code will be simple but with a complicated data structure of velocity, the data structure like List<volvectorfield> will be used. more ever, it is not easy to expand a real 3D model for 3D mesh, it will like a solver of most of foam. but the solution to water surface needs 2D mesh, which is a problem to be overcome. any advices for this problem are grateful! best regard! 
Quote:

All times are GMT 4. The time now is 20:36. 