CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

2D shallow water equations

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By liuzhw

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2005, 19:44
Default Has anyone written any code fo
  #1
New Member
 
david e. alexander
Join Date: Mar 2009
Location: North Vancouver, BC, Canada
Posts: 1
Rep Power: 0
dealexander is on a distinguished road
Has anyone written any code for the 2D shallow water equations? I have a dam-failure 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
3-Sigma Consulting Inc.
david@3sigma.ca
www.3sigma.ca
dealexander is offline   Reply With Quote

Old   November 8, 2005, 21:01
Default I have just finished the code
  #2
New Member
 
Liu Zhaowei
Join Date: Mar 2009
Posts: 9
Rep Power: 17
liuzhw is on a distinguished road
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 non-Uint. It is a little unsatisfied.
If you need, I will share it with you.
liuzhw is offline   Reply With Quote

Old   April 18, 2006, 04:35
Default I hope this thread is still on
  #3
New Member
 
Achmad Taufik
Join Date: Mar 2009
Posts: 2
Rep Power: 0
taufik is on a distinguished road
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.
taufik is offline   Reply With Quote

Old   January 3, 2007, 02:16
Default Hello! I have developed a dep
  #4
New Member
 
Liu Zhaowei
Join Date: Mar 2009
Posts: 9
Rep Power: 17
liuzhw is on a distinguished road
Hello!
I have developed a depth-averaged 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!
liuzhw is offline   Reply With Quote

Old   January 3, 2007, 02:20
Default Hello! I have developed a dep
  #5
New Member
 
Liu Zhaowei
Join Date: Mar 2009
Posts: 9
Rep Power: 17
liuzhw is on a distinguished road
Hello!
I have developed a depth-averaged 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!
liuzhw is offline   Reply With Quote

Old   January 3, 2007, 16:33
Default For shallow water equation, yo
  #6
liu
Senior Member
 
Xiaofeng Liu
Join Date: Mar 2009
Location: State College, PA, USA
Posts: 118
Rep Power: 17
liu is on a distinguished road
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!
__________________
Xiaofeng Liu, Ph.D., P.E.,
Assistant Professor
Department of Civil and Environmental Engineering
Penn State University
223B Sackett Building
University Park, PA 16802


Web: http://water.engr.psu.edu/liu/
liu is offline   Reply With Quote

Old   January 3, 2007, 20:51
Default Yes, I solve h with the water
  #7
New Member
 
Liu Zhaowei
Join Date: Mar 2009
Posts: 9
Rep Power: 17
liuzhw is on a distinguished road
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
zhaoshiyu likes this.
liuzhw is offline   Reply With Quote

Old   January 3, 2007, 21:33
Default Next, I plan to develop a thre
  #8
New Member
 
Liu Zhaowei
Join Date: Mar 2009
Posts: 9
Rep Power: 17
liuzhw is on a distinguished road
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!
liuzhw is offline   Reply With Quote

Old   April 8, 2009, 02:55
Default
  #9
New Member
 
Adityawan, Bagus
Join Date: Apr 2009
Posts: 2
Rep Power: 0
hahuhe is on a distinguished road
Quote:
Originally Posted by liuzhw View Post
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
it happens a lot to shallow water equation. especially when there are two waves from opposite direction. such as the incoming wave colliding with the reflected wave. the model is unable to handle the turbulence from that process. instead of adding and solving the turbulence term, i found that simple numerical filter such as Hansen (1962) really help. you can find the explanation in Kowalik's book (Numerical modeling of Ocean Dynamics vol.5)
hahuhe is offline   Reply With Quote

Old   November 13, 2016, 06:27
Default shallow water code
  #10
New Member
 
zhaoshiyu
Join Date: Nov 2016
Posts: 8
Rep Power: 10
zhaoshiyu is on a distinguished road
Hello. I am quite interested in your shallow water foam, I want to simulate a channel water flow from the top of slope, but it is quite difficult to use the original one in openFoam. I will appreciate it so much if you can share me with your shallow water foam code and case. Thanks.
zhaoshiyu is offline   Reply With Quote

Old   November 13, 2016, 06:29
Default
  #11
New Member
 
zhaoshiyu
Join Date: Nov 2016
Posts: 8
Rep Power: 10
zhaoshiyu is on a distinguished road
Hello. I am quite interested in your shallow water foam, I want to simulate a channel water flow from the top of slope, but it is quite difficult to use the original one in openFoam. I will appreciate it so much if you can share me with your shallow water foam code and case. Thanks.
zhaoshiyu is offline   Reply With Quote

Old   November 13, 2016, 06:30
Default
  #12
New Member
 
zhaoshiyu
Join Date: Nov 2016
Posts: 8
Rep Power: 10
zhaoshiyu is on a distinguished road
Quote:
Originally Posted by liuzhw View Post
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!




Hello. I am quite interested in your shallow water foam, I want to simulate a channel water flow from the top of slope, but it is quite difficult to use the original one in openFoam. I will appreciate it so much if you can share me with your shallow water foam code and case. Thanks.
zhaoshiyu is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
shallow water problem seeking help FLUENT 2 December 5, 2011 10:05
shallow water equations Nalan ANtar Main CFD Forum 2 February 28, 2011 06:03
Looking for stable integration scheme for 2D Shallow Water Equations maddhi OpenFOAM Running, Solving & CFD 1 August 23, 2008 07:24
shallow water k-epsilon equation Ali Main CFD Forum 0 January 5, 2006 16:56
shallow water VS deep water Paul Main CFD Forum 10 August 30, 2004 12:56


All times are GMT -4. The time now is 17:52.