# Solving for linear sloshing phenomenon

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 2, 2015, 16:18 Solving for linear sloshing phenomenon #1 New Member   West Bengal Join Date: Dec 2014 Location: Kharagpur Posts: 4 Rep Power: 10 Hey guys, So here is the doubt. I have written a code for surface tracking of a potential flow in a rectangular container (2-d). I was using no-penetration boundary conditions on the side walls and bottom wall, and unsteady bernoulli equation as the boundary condition on the surface. I used the kinematic boundary condition of the surface to advect the interface once the velocities are know. So since i was solving it assuming a potential flow, i am basically solving a laplace equation with appropriate boundary and initial conditions as required. To get the solution of the velocity potential i am using jacobi iterations and for some reason my solution is blowing up. I have cross checked the mathematical model and the implementation in the code a hundred times, but cant seem to fixate on the problem. So can anyone here give some suggestions on how to debug my code? maybe through experience one might have idea about common errors made by newbies. Maybe some common pitfalls while solving a time-marched equation using jaboci iteration? Thanks a lot. __________________ Sachin Shivakumar B.Tech in Mechanical Engineering IIT Kharagpur

May 3, 2015, 07:12
#2
Member

shahrooz
Join Date: Aug 2011
Posts: 41
Rep Power: 13
Quote:
 Originally Posted by sachinsiitkgp Hey guys, So here is the doubt. I have written a code for surface tracking of a potential flow in a rectangular container (2-d). I was using no-penetration boundary conditions on the side walls and bottom wall, and unsteady bernoulli equation as the boundary condition on the surface. I used the kinematic boundary condition of the surface to advect the interface once the velocities are know. So since i was solving it assuming a potential flow, i am basically solving a laplace equation with appropriate boundary and initial conditions as required. To get the solution of the velocity potential i am using jacobi iterations and for some reason my solution is blowing up. I have cross checked the mathematical model and the implementation in the code a hundred times, but cant seem to fixate on the problem. So can anyone here give some suggestions on how to debug my code? maybe through experience one might have idea about common errors made by newbies. Maybe some common pitfalls while solving a time-marched equation using jaboci iteration? Thanks a lot.
best practice is to write your program in separate subroutines(if you are using Fortran) then try to validate each subroutine and find which part is faulty. another good practice in fortran debugging is using checkmate technology from silverfrost company which is free to use for personal use, it helps to find errors in your program not algorithm.

 Tags potential flow, sloshingtank2d, surface tracking

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20 Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20 mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 13:12 sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37 liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 18:07

All times are GMT -4. The time now is 22:37.